You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: guard tracked agent guidance against model and vendor names #78
Model and vendor names in tracked agent guidance are a recurring class, not an instance: #71 introduced them and #76 removes them at rung 3 (guidance) only. By CONTRIBUTING.md's "Correct the class, not the instance" rule, the next step is a guard that stops new instances before cleanup is ever needed again.
Outcome
pr-gate fails when a tracked guidance file names a specific model, a vendor's routing, or a paused vendor. Tool entrypoint file names (CLAUDE.md, .github/copilot-instructions.md, .agents/rules/*) are allowed because they name where a tool reads instructions, not which model runs.
Scope
A small script under scripts/ (or a step in .github/workflows/pr-gate.yml) that greps the guidance set — AGENTS.md, CONTRIBUTING.md, docs/workflow.md, docs/development.md, .agents/, .github/ISSUE_TEMPLATE/, .github/PULL_REQUEST_TEMPLATE.md, the tool shims — for a maintained pattern list (model families and IDs, vendor route names) with an explicit allowlist for entrypoint file names, and exits non-zero with path:line on a hit.
A negative control in the PR: a scratch commit that reintroduces one name must fail the step.
CONTRIBUTING.md names the guard as rung 2 for this class.
Out of scope: content changes to the guidance itself (#76), and anything model-specific (machine-local by design).
Acceptance
The guard runs in pr-gate and locally by one documented command.
A deliberately reintroduced name fails it (receipt preserved); the current tree passes.
The pattern list and allowlist live in one place with a comment on how to extend them.
Base.#79 is still open, so this branch (ci/78-guidance-name-guard) is stacked on docs/76-role-based-guidance at 41e305c. The guard only passes on a tree that already has #79's cleanup, so the PR stays unopened until #79 merges. After that I rebase onto main and open it. Until then the hosted check runs on the pushed branch through workflow_dispatch.
Decision (recorded): use a standalone script, not an inline workflow step. The acceptance needs one documented local command and one place for the lists, and CONTRIBUTING.md treats duplicate paths as defects. The script is POSIX sh with git grep and awk, with no system grep in the pipeline, so local and hosted runs behave the same. pr-gate runs it as the first step after checkout, so it fails in seconds.
Correction-ladder rung: 2 (a repository guard the gates run). No ADR: this enforces the existing rule from #76 and adds no product behavior.
#
Node
Owner role
Depends on
Acceptance (how it is decided)
State
1
scripts/check-guidance-names.sh: the scanned set, the pattern list and the entrypoint allowlist in one place. Allowlisted tokens are stripped from a hit line and the line is re-tested, so no file is skipped. The guard fails closed if a listed path matches no tracked file, and on a hit it exits non-zero with path:line.
implementer
—
Command: the tree passes, and four dirty-tree controls give the expected result
todo
2
pr-gate.yml step; CONTRIBUTING.md command and rung-2 mention; docs/development.md source-map line for scripts/
worker
1
Command: git diff --check, plus the script passes on the tree
todo
3
Independent review of the exact candidate SHA
reviewer
1, 2
Judgment: findings resolved or answered
todo
4
Full CONTRIBUTING gate sequence on the frozen candidate (system Chrome for e2e), plus a guard pass on the tree and a fail on a scratch commit that reintroduces one name
verifier
3
Command: receipts with SHA-256
todo
5
Push, hosted pr-gate run, PR after #79 merges, automated-review threads
Note on the pattern list. The script's pattern list necessarily contains the family and vendor names it guards against. It is data, not guidance, it sits outside the scanned set, and its comments name no model.
Next action: the implementer builds node 1 from a fixed spec.
State (integrator), 2026-10-08: candidate 8317340 verified; the PR waits for #79
Branch ci/78-guidance-name-guard is pushed. It sits on 41e305c, PR #79's head, with three commits:
b82424a adds the guard, the pr-gate step, the CONTRIBUTING rung-2 mention, and the docs/development.md map line.
0708a70 and 8317340 fold in the independent review.
#
Node
Owner role
State
Evidence
1
scripts/check-guidance-names.sh
implementer
done
Controls at 8317340, each run on a dirty tree. The current tree passes. These fail: a reintroduced name in CLAUDE.md:6; a prose vendor name; IDs joined to digits or _; a name inside a file git treats as binary; a nested web/AGENTS.md. A line holding only an entrypoint file name passes. Fail-closed cases exit 2: a missing scanned entry, a removed root entrypoint, a git grep error, an awk error. shellcheck is clean. Exit codes match across four awks and three POSIX shells.
2
pr-gate step (first, after checkout), CONTRIBUTING sequence and rung-2 paragraph, docs/development.md
worker
done
git diff --check clean; YAML step order checked
3
Independent review
reviewer
done
Two rounds. Round 1, on b82424a, found four gaps: IDs joined to digits or _, binary-attribute skip, nested entrypoints, awk status ambiguity. Round 2, on 0708a70, found two: root entrypoints no longer required, and an allowlist-boundary mismatch. All were fixed in 0708a70 and 8317340. Accepted as policy: ordinary English words that collide with a pattern are flagged; a NUL byte placed directly before a name is out of class.
4
Full local gate sequence on 8317340
verifier
done
All exit 0: guard, npm ci/check/build, fmt, clippy, cargo test --workspace, cargo build -p consolebook-server, e2e with system Chrome 155, not the Playwright download (56 passed), and git diff --check. Negative control: scratch commit cd57e1c on the candidate, never pushed; the guard exits 1 with CLAUDE.md:6. Receipts are archived locally; manifest sha256 9060b3e2….
5
Hosted pr-gate
integrator
done for 8317340
run 37698835855, started through workflow_dispatch because there is no PR yet: success. The Guidance names step printed ok (11 files scanned).
"Lists in one place with an extension comment": met.
Scope note: the scanned set is the set listed in this issue, plus nested AGENTS.md/CLAUDE.md at any depth. Other per-tool instruction locations are not scanned, deliberately, until one exists in the tree.
Next action: when #79 merges, rebase ci/78-guidance-name-guard onto main (git rebase --onto origin/main 41e305c if #79 is squash-merged, since 41e305c will not be on main). Re-run the guard and its negative control, plus the gates if the base changed beyond #79. Then open the PR with Closes #78 and answer automated-review threads. Merge is the maintainer's call.
The guard's pattern list is accepted as the one tracked place that holds vendor and model-family names. It is data the guard needs, not guidance, and it sits outside the scanned set.
The local negative-control receipt is sufficient; no hosted red run will be recorded. Hosted run 37698835855 already proved the step runs first on the runner, and a non-zero exit from a run: step failing the job is standard Actions behavior.
Activity
TusanHomichi commentedon Oct 7, 2026
Plan (integrator), 2026-10-08
Base. #79 is still open, so this branch (
ci/78-guidance-name-guard) is stacked ondocs/76-role-based-guidanceat41e305c. The guard only passes on a tree that already has #79's cleanup, so the PR stays unopened until #79 merges. After that I rebase ontomainand open it. Until then the hosted check runs on the pushed branch throughworkflow_dispatch.Decision (recorded): use a standalone script, not an inline workflow step. The acceptance needs one documented local command and one place for the lists, and
CONTRIBUTING.mdtreats duplicate paths as defects. The script is POSIXshwithgit grepandawk, with no systemgrepin the pipeline, so local and hosted runs behave the same.pr-gateruns it as the first step after checkout, so it fails in seconds.Correction-ladder rung: 2 (a repository guard the gates run). No ADR: this enforces the existing rule from #76 and adds no product behavior.
scripts/check-guidance-names.sh: the scanned set, the pattern list and the entrypoint allowlist in one place. Allowlisted tokens are stripped from a hit line and the line is re-tested, so no file is skipped. The guard fails closed if a listed path matches no tracked file, and on a hit it exits non-zero withpath:line.pr-gate.ymlstep;CONTRIBUTING.mdcommand and rung-2 mention;docs/development.mdsource-map line forscripts/git diff --check, plus the script passes on the treepr-gaterun, PR after #79 merges, automated-review threadsNote on the pattern list. The script's pattern list necessarily contains the family and vendor names it guards against. It is data, not guidance, it sits outside the scanned set, and its comments name no model.
Next action: the implementer builds node 1 from a fixed spec.
TusanHomichi commentedon Oct 7, 2026
State (integrator), 2026-10-08: candidate
8317340verified; the PR waits for #79Branch
ci/78-guidance-name-guardis pushed. It sits on41e305c, PR #79's head, with three commits:b82424aadds the guard, the pr-gate step, the CONTRIBUTING rung-2 mention, and thedocs/development.mdmap line.0708a70and8317340fold in the independent review.scripts/check-guidance-names.sh8317340, each run on a dirty tree. The current tree passes. These fail: a reintroduced name inCLAUDE.md:6; a prose vendor name; IDs joined to digits or_; a name inside a file git treats as binary; a nestedweb/AGENTS.md. A line holding only an entrypoint file name passes. Fail-closed cases exit 2: a missing scanned entry, a removed root entrypoint, a git grep error, an awk error. shellcheck is clean. Exit codes match across four awks and three POSIX shells.docs/development.mdgit diff --checkclean; YAML step order checkedb82424a, found four gaps: IDs joined to digits or_, binary-attribute skip, nested entrypoints, awk status ambiguity. Round 2, on0708a70, found two: root entrypoints no longer required, and an allowlist-boundary mismatch. All were fixed in0708a70and8317340. Accepted as policy: ordinary English words that collide with a pattern are flagged; a NUL byte placed directly before a name is out of class.8317340npm ci/check/build, fmt, clippy,cargo test --workspace,cargo build -p consolebook-server, e2e with system Chrome 155, not the Playwright download (56 passed), andgit diff --check. Negative control: scratch commitcd57e1con the candidate, never pushed; the guard exits 1 withCLAUDE.md:6. Receipts are archived locally; manifest sha2569060b3e2….8317340workflow_dispatchbecause there is no PR yet: success. TheGuidance namesstep printedok (11 files scanned).Acceptance status:
Scope note: the scanned set is the set listed in this issue, plus nested
AGENTS.md/CLAUDE.mdat any depth. Other per-tool instruction locations are not scanned, deliberately, until one exists in the tree.Next action: when #79 merges, rebase
ci/78-guidance-name-guardontomain(git rebase --onto origin/main 41e305cif #79 is squash-merged, since41e305cwill not be onmain). Re-run the guard and its negative control, plus the gates if the base changed beyond #79. Then open the PR withCloses #78and answer automated-review threads. Merge is the maintainer's call.TusanHomichi commentedon Oct 7, 2026
Owner decisions, 2026-10-08:
run:step failing the job is standard Actions behavior.ci: guard tracked agent guidance against model names
fix(ci): close guard gaps found in review
fix(ci): keep root entrypoints required and align allowlist boundary
fix(ci): require scanned files on disk and exact allowlist tokens
fix(ci): fail closed on unreadable or non-regular scanned files
fix(ci): require a leading boundary for allowlisted names
fix(ci): scan staged guidance as well as the working tree
fix(ci): list the delimiters that may follow an allowlisted name
fix(ci): ignore a trailing carriage return when re-testing lines