Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
docs(doctrine): draft the six quality rules for approval
Corey Olsona89785afdfa2
diff --git a/DOCTRINE.md b/DOCTRINE.mdindex 89257844..fc3b7484 100644--- a/DOCTRINE.md+++ b/DOCTRINE.md@@ -20,6 +20,8 @@ Statuses: approved = in force · draft = proposed · wont = considered and decli- C6 [draft, aim] Functions under 60 lines and files under 1,000. | gate: review- C9 [approved, must] Source and test files stay under 1500 lines; existing excess can only fall. Why: bounded files keep changes and reviews manageable. | gate: check node bin/checks/file-size.js | count: 54- C8 [approved, must] No bare empty catch hides a failure; existing cases can only fall. Why: failures need handling or an explicit reason to ignore them. | gate: check node bin/checks/empty-catch.js | count: 13+- C10 [draft, must] No silent catch or fallback: each one logs a specific line that names its subject. Rigor names each catch clause and .catch handler a change adds to a source file that neither throws nor writes a line; a fallback written with a default operator is review. | gate: check node bin/pullboard.js rigor quality --rule silent-catch | count: 0 | source: rigor-quality:silent-catch+- C11 [draft, must] A file over the 1500-line cap, or a change that grows code past its 400-line budget, is named. Rigor names each changed source file that ends over 1500 lines and grew, and a change whose non-test code grows by more than 400 lines net, or the board's rigor.budget setting, at the file that grew most. | gate: check node bin/pullboard.js rigor quality --rule size-budget | count: 0 | source: rigor-quality:size-budget## T · Tests- T1 [approved, must] Tests use node:test against real git repos and a real SQLite file, not mocks. | gate: review@@ -28,6 +30,10 @@ Statuses: approved = in force · draft = proposed · wont = considered and decli- T4 [draft, must] A check that guards a rule is shown failing on a broken copy before anyone trusts it. | gate: review- T5 [approved, must] Every test name cites the spec rows it proves; existing omissions can only fall. Why: a passing test must name the requirement it checks. | gate: check node bin/checks/test-names.js | count: 15- T6 [approved, must] Tests declare the source files they read; existing omissions can only fall. Why: affected-test selection must see those dependencies. | gate: check node bin/checks/test-inputs.js | count: 19+- T7 [draft, must] A fix ships with a test that reproduces the original failure. Rigor names each fix commit that changes no test file, at the first line it changes; whether the test reproduces the failure is the root-cause-control rule. | gate: check node bin/pullboard.js rigor quality --rule fix-test | count: 0 | source: rigor-quality:fix-test+- T8 [draft, must] A new gate or check has a test that fails closed when it has no data. Rigor names a new file under checks/ or gates/, or named *-check or *-gate, that no test changed in the same change names; whether that test feeds it no data and expects a refusal is review, since no command can read what a test asserts. | gate: check node bin/pullboard.js rigor quality --rule fails-closed | count: 0 | source: rigor-quality:fails-closed+- T9 [draft, must] A guard test fails when the guard is deleted. Rigor turns each throw a change adds to a source file into a no-op, one at a time, and runs the test files the change touches; a guard they still pass without is named. | gate: check node bin/pullboard.js rigor quality --rule guard-mutation | count: 0 | source: rigor-quality:guard-mutation+- T10 [draft, must] A root cause is proven by a control that would have come out differently before the fix lands. Rigor runs each fix commit's changed test files on the fix's parent, where they must fail, and at the fix, where they must pass; a cause argued only in prose is review. | gate: check node bin/pullboard.js rigor quality --rule root-cause-control | count: 0 | source: rigor-quality:root-cause-control## G · Git and the gate- G1 [approved, must] `npm run gate` (spec check and tests) passes before every push. | gate: pre-push hook