fix(workflow-primer): scope CLI ban to mutating commands, document read-only guard surface - #102
Merged
utx0 merged 35 commits intoAug 26, 2026
Conversation
…record instruction emission
…ntent Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…record instruction emission
…tories Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…ix stories field format Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…ix US-6 field format Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…record instruction emission
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…record instruction emission
…ynthesize research Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…record instruction emission
…esign Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…eword stub references in design Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…record instruction emission
…asks Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…record instruction emission
…ad-only surface Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…ad-only surface Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…mplementation summary Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…omplete implementation
…erged review Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…erification results Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…omplete verification
…archive and finalize
…AT run record Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
…regenerate docs from finalize Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK
utx0
deleted the
metta/fix-generated-workflow-primer-contradicts-bash-guard-blanket
branch
August 26, 2026 05:53
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.
Summary
The workflow primer generated by
metta refreshclaimed a blanket ban on directmettaCLI calls while themetta-guard-bashPreToolUse hook actually permits a read-only query surface. Consumer sessions treated the primer as authoritative, never discovered the permitted commands, and hand-computed wrong answers (zeus session, 2026-08-26). Resolves issuegenerated-workflow-primer-contradicts-the-bash-guard-blanket(major).src/delivery/workflow-primer.ts— scopedMANDATE(state-mutating commands require skills; namesmetta-guard-bashas enforcement authority; fail-closed framing), newREAD_ONLY_POINTER(short variant) and### Read-only queries (permitted directly)subsection (long variant) enumerating the hook's single-word/two-word/bare allow surface with generation-time qualifier, bare-mettadiscovery pointer, and attempt-it fail-closed guidance; Forbidden bullet now enumerates the full blocked surface (incl.verify,backlog migrate,milestone/roadmapmutating forms,release cut).metta-guard-bash.mjscopies — comment-only SYNC annotations above all five list declarations; byte-identical; zero behavioral change (all four guard suites pass unchanged).docs/workflows/README.mdand metta's ownCLAUDE.mdregion (regenerated byte-exact frombuildWorkflowSection()) — same scoped wording; "CLAUDE.md wins" note, doc-only-exceptions line, and stub-prohibition sentence preserved.tests/delivery.test.ts/tests/refresh.test.ts— mandate byte-identity pin, retired-wording negative assertions, and a primer↔hook seam test (ADR-4 pin pattern) that regex-extracts the hook's allow/block lists and fails CI on drift.Review & verification
tsc --noEmit+ lint clean; spec coverage 15/15 scenarios evidenced; full suite green (2812 passed / 2 skipped; loaded-machine reruns confirmed flakes were environmental).UAT results
Result: 28 pass / 0 fail / 7 skip (of 35 steps) — PASS
Run: 2026-08-26 · record committed as
docs(fix-generated-workflow-primer-contradicts-bash-guard-blanket): UAT run record(1980a4b) ·spec/archive/2026-08-26-fix-generated-workflow-primer-contradicts-bash-guard-blanket/UAT.mdSkipped — needs manual acceptance
metta refreshin a consumer project (mutating command forbidden to UAT runner)metta refreshover a hand-edited region (same restriction)metta milestone show🤖 Generated with Claude Code
https://claude.ai/code/session_01AA8wwFpob25iYZFCBBEtKK