feat(dogfood): bootstrap .charter governance to score 80/100 on own audit#175
Conversation
…udit Fixes #159. Charter now passes its own governance audit at 80/100 (B grade), serving as a living reference implementation for adopters. Added: - .charter/patterns/adf-patterns.json — 2 active patterns: ADF mutation review and manifest pointer integrity (GOVERNANCE category) - .charter/patterns/oss-patterns.json — 2 active patterns: additive-only API contract and no-product-logic boundary (API + ARCHITECTURE categories) - .charter/patterns/testing-patterns.json — 1 active pattern: tests travel with public exports (TESTING category) - .charter/policies/governance-policy.md — covers all 4 required audit sections: Commit Trailers, Change Classification, Exception Path, and Escalation & Approval Audit result: 5/5 active patterns (pattern score: 100), 4/4 policy sections matched (policy score: 100), trailer coverage pending (resolves naturally as future commits adopt Governed-By trailers). Overall: 80/100. Governed-By: oss-additive-only-api Resolves-Request: #159 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Review finding (blocking): This PR currently fails Governance because adding
In CI this errors with:
So this branch is merge-blocked even though build-and-test is green. Suggested fix direction:
Once that invocation is corrected, this PR should be able to pass Governance consistently. |
npx charter fails in this monorepo context because the package is not installed globally in CI. Replace all npx charter calls in the governance job with node packages/cli/dist/bin.js (the build step runs before all governance steps, so the binary is always present). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed in b1379fe. Replaced all |
drift/extractRules() calls .matchAll() on antiPatternText and expects a string, not an array. Flatten each array to a period-separated sentence so the drift scanner can parse it without error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Second fix in 78e0bb9: |
Summary
Charter now passes its own
charter auditat 80/100 — meeting the ≥80 milestone gate for v0.13.adf-patterns.json: ADF mutation review + manifest pointer integrity (GOVERNANCE)oss-patterns.json: additive-only API contract + no-product-logic boundary (API/ARCHITECTURE)testing-patterns.json: tests travel with public exports (TESTING)governance-policy.mdcovers all 4 required audit sections — Commit Trailers, Change Classification, Exception Path, Escalation & ApprovalGoverned-By:trailers (this commit is the first)Closes #159.
Test plan
node packages/cli/dist/bin.js audit --format json | jq '.score.overall'returns80node packages/cli/dist/bin.js audit --format json | jq '.patterns.active'returns5node packages/cli/dist/bin.js audit --format json | jq '.policies.coveragePercent'returns100🤖 Generated with Claude Code