docs(contracts): machine triggers for defect-shape blocks and verification rules (refs #5753) #5754
All Vouch review confidence checks passed
Residual risk 0.35 = Change Risk (0.48) × (1 − Review Confidence (0.26)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 555 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 37% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.378
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #5754"
general
weight: 0.35
coderabbitai[bot]
Summary
Every
<important if="…">block indocs/defect-shapes.mdnow carries a machine trigger line (path globs and/or a diff regex), and a governance test refuses a block without a readable one. The contract lines for items 3 to 6 of #5753 land where each role reads its rules. Refs #5753.Notes for the reviewer
<important>tag against a JSON comment line directly after the opener. The comment wins:agents-governance.test.tsanchors^<important if="[^"]">$, so attributes would loosen an anchored guard and need escaped quotes; the comment leaves the opener alone and parses with one regex plusJSON.parse.pathsordiff(a regex over each added line) applies the block when either matches;{"always": true}applies it to every change. Globs come from the files each block's shapes name, not from titles. Block 3 also matchescatchbecause shapes 31 and 75 govern any runtime catch.alwaysalone orpaths/diff, and refuses an unknown key and a glob that matches no file.Change outline
Proof and checks
Tests
Failure list, written first: no trigger line; bad JSON; unknown key;
alwaysnot alone or not true; none of paths, diff, always; empty paths; dead glob; non-compiling diff.Red-first,
tests/config/agents-governance.test.tson master'sdocs/defect-shapes.md:Green: that file 11 passed; with four sibling governance files 102 passed.
gov-check.shexit 0:Test Files 226 passed;Tests 4730 passed | 5 skipped. CI must confirm the full Unit tests lane.Mutations
| mutation | result |
| --- | --- |
| docs: glob misspelled | 1 failed: glob matches no file |
| docs: leading quote dropped from JSON | 1 failed: JSON does not parse |
| docs: key renamed from paths to path | 1 failed: unknown trigger key |
| docs: always set to "yes" | 1 failed: always is true alone |
| docs: unbalanced paren in a diff | 1 failed: does not compile |
| test: dead-glob check off | 1 failed: planted-line case |
| test: unknown-key check off | 1 failed: planted-line case |
| test: empty paths allowed | 1 failed: planted-line case |
Class sweep
Class: a loaded block with no machine trigger.
grep -rlE '<important if=' --include=.md .finds the catalog (fixed here) plusAGENTS.md(14 blocks),docs/invariants/*.md(6 files) anddocs/pi-lens-release.md(1). Stay specific: #5753 item 1 scopes the catalog, the host loads AGENTS.md whole, and the other blocks need globs derived from their own entries. The orchestrator decides whether to extend the gate.Alignment: none: docs and a governance test touch no tool family.
Observability
none: contract prose and a test-only gate; no runtime failure path.
Fold check
None has its acceptance met here, so none is folded:
🤖 Generated with Claude Code