Probe AGENTS.md for skill routing; resolve GSTACK_ROOT in team-init - #2500
Open
gamerey43 wants to merge 2 commits into
Open
Probe AGENTS.md for skill routing; resolve GSTACK_ROOT in team-init#2500gamerey43 wants to merge 2 commits into
gamerey43 wants to merge 2 commits into
Conversation
added 2 commits
August 9, 2026 20:31
…r routing gstack-team-init now resolves GSTACK_ROOT the way skill preambles do (env -> ~/.codex/skills/gstack -> ~/.gstack/repos/gstack -> legacy ~/.claude/skills/ gstack) so required-mode enforcement stops false-blocking on installs that keep the repo at ~/.gstack/repos/gstack. Install instructions point at the canonical global location throughout. The preamble HAS_ROUTING probe now checks AGENTS.md as well as CLAUDE.md, so non-Claude hosts that route via AGENTS.md report routing detected instead of prompting to create CLAUDE.md. All skill docs regenerated.
test/routing-probe.test.ts extracts the live probe block from a generated skill (review/SKILL.md) and executes it across the three routing scenarios — both CLAUDE.md and AGENTS.md routed, AGENTS.md-only, and neither — plus a structural guard that the probe references AGENTS.md. The AGENTS-only case fails against the old CLAUDE.md-only probe, so a generator edit that breaks AGENTS.md detection is caught even when the regeneration is clean.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two small fixes to how gstack locates itself and detects routing, plus a regression test:
The preamble's
HAS_ROUTINGprobe now checksAGENTS.mdas well asCLAUDE.md. Every skill's preamble runs:Non-Claude hosts (Codex, Cursor, generic agent harnesses) route skills via
AGENTS.md— the de-facto cross-harness convention file. Today a repo withAGENTS.mdrouting but noCLAUDE.mdreportsHAS_ROUTING: noand gets nagged to createCLAUDE.md. This fixes that, and the routing-injection prompt stops firing for repos that already route viaAGENTS.md.gstack-team-initresolvesGSTACK_ROOTinstead of hardcoding~/.claude/skills/gstack. Required-mode enforcement (the CLAUDE.md verification line and the generated.claude/hooks/check-gstack.sh) now resolves the install the same way skill preambles do:$GSTACK_ROOTenv →~/.codex/skills/gstack→~/.gstack/repos/gstack→ legacy~/.claude/skills/gstack. Install instructions point at the canonical global location throughout. This stops required mode from false-blocking on installs that keep the repo at~/.gstack/repos/gstack(the layout the setup produces on non-Claude hosts).Regression test for the probe (
test/routing-probe.test.ts): extracts the live generated block fromreview/SKILL.mdand executes it across the three scenarios — both files routed,AGENTS.md-only, neither — plus a structural guard that the probe referencesAGENTS.md. TheAGENTS.md-only case fails against the old probe, so a generator edit that breaksAGENTS.mddetection is caught even when regeneration is clean.Why
AGENTS.mdshould be treated as routed, not prompted to addCLAUDE.md.Testing
bun test test/routing-probe.test.ts— 4 pass.noon an AGENTS-only repo, which the new test fails on.gstack-team-init requiredexercised in a throwaway repo: hook emits{}(allow) with the patched resolution on a global install,denywith a fake emptyHOME.bun run gen:skill-docs(default +--host codex).