Use when adding a new stack or framework track to the convention files (a new CLAUDE-<TRACK>.md), or when auditing an existing track for missing wiring. Triggers on "add a stack track", "add conventions for <language or framework>", "wire up CLAUDE-<TRACK>.md", or a rules/ symlink, session-types row, or manifest entry found missing for a track.
Install
npx skillscat add nullvoidundefined/agent-governance/codex-skills-add-stack-track Install via the SkillsCat registry.
Add Stack Track
Wire one stack or framework track into the convention stack in one pass:
convention file, rules symlink, detection rows, enforcer analogs, structure
gate, repo docs, verification, ports and hash manifest, publish. Complete every
step; the invariant test in step 7 rejects a track with any of the first three
missing.
Announce at start: "I'm using the add-stack-track skill to wire the track end to end."
Inputs
- The track name in upper case for the file (
PYTHON,FRONTEND-VUE) and lower case for the symlink (python,frontend-vue). - The parity target: the existing convention file whose section outline the new file mirrors (
CLAUDE-BACKEND.mdfor a server stack,CLAUDE-FRONTEND-NEXT.mdfor a frontend framework file,CLAUDE-FRONTEND-REACT.mdfor a frontend core file). - The
paths:globs that identify the track's files (an extension such as**/*.vue, a directory such as**/app/pages/**, a config file such as**/nuxt.config.*).
Checklist
Work through each step in order. Run the invariant test (step 7) and the translator check (step 8) before opening the PR.
Step 1: Write the convention file
Create claude/CLAUDE-<TRACK>.md in the agent-governance repo. The first lines are the frontmatter:
---
paths:
- "**/*.<ext>"
- "**/<dir>/**"
---Copy the parity target's ## and ### headings in order and fill each with the track's analog. Keep every section the parity target has; where the track has no analog, keep the heading with a one-line reason. Cite each rule ID the parity target cites.
Step 2: Add the rules symlink
ln -s ../CLAUDE-<TRACK>.md claude/rules/<track>.md
git add claude/rules/<track>.mdThe symlink is a tracked file; sync.sh copies it as a symlink.
Step 3: Register detection
claude/rules/session-types.md: add a row to the stack-detection table (a new root marker) or extend the Read cell of the row whose marker the track shares (package.jsonfor a JavaScript framework).claude/CLAUDE-FRONTEND.md, when the track is a frontend framework: add a row to the Framework Files dispatch table.claude/CLAUDE.md: name the track in the Convention files section's stack-detection sentence.
Step 4: Add enforcer analogs
For every rule in claude/enforce/manifest.json whose enforcer is stack-specific (eslint:, ruff:, rubocop:, golangci:, or a hook keyed on a file extension), do one of:
- Add the analog for the new track (a linter rule in the track's bundled config, a glob or extension added to the hook) and a fixture test in
claude/enforce/tests/orclaude/hooks/tests/. - Record the gap as a manifest
noteon that rule naming the track and the reason (R-516).
Every new enforcer ships its fixture test in the same commit.
Step 5: Extend the structure gate
claude/hooks/structure-gate.sh: add the track's root trigger and directory vocabulary as a separate conditional block; never edit an existing stack's condition.claude/skills/structure-conventions/SKILL.md: add the track's vocabulary to R-304 or R-305 and update the description line.claude/hooks/tests/structure-gate.test.sh: one denied case and one allowed case for the track, and the existing cases unchanged.
Step 6: Update the repo docs
README.md: add the file to the convention-files table.claude/enforce/README.md: name any new fixture test under Components.
Step 7: Verify
bash claude/enforce/tests/convention-track-invariants.test.sh
bash claude/enforce/tests/run-tests.sh
bash claude/hooks/tests/run-tests.shAll three must print PASS with no FAIL line.
Step 8: Regenerate the ports, the hash manifest, and publish
node translate/codex.mjs --write
CLAUDE_INTEGRITY_ROOT="$PWD/claude" bash claude/hooks/hook-integrity-check.sh --update
node translate/codex.mjs --check
git diff origin/mainCommit the regenerated codex port, claude/enforce/hook-hashes.txt, and the change together. Review the diff for secrets, local filesystem paths, and client-identifying content before pushing (R-106). After merge, run ./sync.sh from a checkout at the merged commit.
Refusal conditions
- The parity target does not exist or is itself thinner than the track needs: write or extend the parity target first.
- A stack-specific enforcer has no feasible analog and no manifest note: the PR is not complete until the note exists.