Formalize enforcement tiers + add opt-in shell helpers (Tier 0)
Problemโ
Surfaced during the PR #25 (proposals flow) review cycle on 2026-05-29. The validate-policies.mjs validator existed only at the PR-CI layer; PR #24 (capability index) added new fields to every policy YAML without updating the schema, master shipped broken, and PR #25 paid the cost โ its CI failed on schema violations it didn't introduce.
The bigger pattern: we have hooks at Tier 2 (pre-commit) mirrored to Tier 4 (PR CI), per ai-engineering-strategy.md ยง16. That's good, but it doesn't say anything about earlier tiers โ command-time interception (Tier 0) or editor-time feedback (Tier 1). Branch naming is the obvious example: branch-name-check.sh fires on the first commit, by which point the developer has already created the branch and probably has files staged. Renaming + re-committing is pure roundtrip.
The principle we're missing: every check should be evaluated for fit at Tier 0 / Tier 1, because some classes of mistake can only be prevented before state is created.
Proposalโ
Three deliverables, all in one PR (matches the "implement, then present" working mode):
-
docs/methodology/enforcement-tiers.mdโ formalize the 5-tier ladder (Tier 0โ5), with a table mapping every current check to the tier(s) it runs at. Make the gaps visible. -
templates/shell-helpers/โ new opt-in directory holding shell functions developers can source from~/.zshrc/~/.bashrc. First helper:git-branch-interceptor.shโ wrapsgit checkout -b/git switch -c, validates the proposed branch name against the same lenient regexbranch-name-check.shuses, prompts with auto-derived valid options when the name is invalid. Includes aREADME.mdwith install instructions and a contributor guide for adding new helpers. -
Reference from the methodology doc to the helpers directory + back, so devs reading the architecture know where to install Tier 0 and devs in the helpers directory know what the broader picture is.
Explicitly opt-in. We do not override anyone's shell without consent, and Tier 0 is never a requirement โ the mandatory gates remain Tier 2 (hooks) and Tier 4 (CI).
Why now / Why usโ
- The PR #25 friction was a concrete data point. Without formalization, the same gap will recur the next time someone adds metadata to YAML.
- This is platform / process work โ squarely in our lane. No cross-team coordination needed.
- The "opt-in shell helper" pattern is already proven (Ariel used the equivalent at his previous company). Porting it costs ~50 lines of bash; benefit accumulates per-dev forever.
What shippedโ
| File | Purpose |
|---|---|
docs/methodology/enforcement-tiers.md | Formal tier ladder + map of current checks |
templates/shell-helpers/README.md | Install guide, contributor guide |
templates/shell-helpers/git-branch-interceptor.sh | First Tier 0 helper โ intercepts git checkout -b / git switch -c |
docs/proposals/index.md | Index updated โ this proposal moved to Done |
Out of scope (follow-ups)โ
active-gates-awareness.shSessionStart hook โ parallel tocapability-awareness.sh, tells Claude to mention to the user which gates will fire given the files they're touching. Mentioned at the bottom ofenforcement-tiers.mdas a planned follow-up. Worth its own proposal when we get there.- Tier 1 (editor) coverage โ the methodology doc lists
tsc LSPandeslint-on-savebut they depend on each dev's editor setup. Could ship per-repo.vscode/settings.jsontemplates as a future Tier 1 push. - More Tier 0 helpers โ anything that fires at PR CI today and has a repeatable command-time mistake-mode is a candidate. Add one per PR as they prove useful.
Relatedโ
- Proposal: BE Datadog tagging from X-App-Version โ the seed proposal that landed alongside the proposals system itself.
- bewith-docs PR #25 โ added the proposals flow + the
policy-schema-check.shhook that fixed the gap which prompted this proposal.
Triage notesโ
Self-triaged 2026-05-29 by the author. Category process, effort M, no cluster (no overlapping proposals at time of triage). Implemented and shipped in the same session per the working-mode preference of "implement, then present, iterate on review feedback."