The acceptance-matrix hook — one Bash call

The acceptance-matrix hook — one Bash call A workflow diagram generated by Archify. 01 / Every Bash call 02 / Find the matrix 03 / Gate in-scope rows EX / Blocked (exit 2) Agent runs Bash · PreToolUse hook fires · Every Bash call Agent runs Bash PreToolUse hook fires Declares done? · gh pr create · [forge-done] · Every Bash call Declares done? gh pr create · [forge-done] Allow (exit 0) · not a done command · Every Bash call Allow (exit 0) not a done command Locate the matrix · env → .forge/spec.md → *.md · Find the matrix Locate the matrix env → .forge/spec.md → *.md Live matrix found? · template-marked files skipped · Find the matrix Live matrix found? template-marked files skipped Allow + notice (exit 0) · FORGE_REQUIRE_MATRIX=1 blocks · Find the matrix Allow + notice (exit 0) FORGE_REQUIRE_MATRIX=1 blocks Parse in-scope rows · built · evidence · verified-by · Gate in-scope rows Parse in-scope rows built · evidence · verified-by Every row traced? · verified-by ≠ executor · Gate in-scope rows Every row traced? verified-by ≠ executor Allow (exit 0) · matrix COMPLETE · Gate in-scope rows Allow (exit 0) matrix COMPLETE Block (exit 2) · offending req-ids on stderr · Blocked (exit 2) Block (exit 2) offending req-ids on stderr no none yes Legend Agent logic Policy External system