Repository navigation
[Documentation] Governance hardening: ADR system, canonical rule sourcing, template conformance, CI enforcement #64
Copy link
Copy link
Closed
Description
Summary
DART's documentation already functions as the project's constitution for AI-assisted development: AGENTS.md (operational law), docs/README.md (mandatory 8-section template), design-assumptions.md (load-bearing trade-offs), per-package contracts, and CHANGELOG.md. An audit of the current system against "constitution-grade" requirements — unambiguous authority, recorded decisions, machine-enforceable rules — found one structural gap and several drift items. This umbrella issue tracks the hardening work; each landing PR references it.
Findings (verified on main)
- A. No decision records. Contract-level decisions (e.g. the member-ID alphabet vs. epoch reframe, the shutdown safe-join contract, the minimalist-assumptions principle) live only in issue/PR discussions. Agents editing code later cannot discover why a rule exists, and rejected alternatives get re-proposed.
- B. Normative rules duplicated across audience files. The verification trio and the docs policy are restated in AGENTS.md, CONTRIBUTING.md, and docs/README.md with no canonical home and no arbitration rule; duplicated text drifts.
- C. Template conformance drift.
docs/registry.mdlacks the Concurrency and Stability Contract sections;docs/tracker.mdlacks Invariants & Guarantees;docs/dart.md(a cmd doc) has only 5 of 8 sections;docs/observability.mduses a two-package structure the template neither blesses nor forbids. (peer.md's "Wire form" covering Concepts is a reasonable heading variant.) - D. Exported-symbol gaps. Eleven exported identifiers are not named in their package docs: cluster
LearnPeer/Run/Self, chunkUnitSep/ErrInvalidConfig, fetchDefaultMaxFlight, engineNewMetrics, peer+registryServeHTTP, trackerJoinRequest, metricsErrInvalidName. (Test-list tables, by contrast, have zero drift.) - E. No enforcement. All of the above were found by one-off scripts; nothing runs them on CI.
Work plan (four sequential PRs)
- PR: ADR system —
docs/adr/(process README with trigger list T1–T5, template, lifecycle: accepted-on-merge, supersede-by-new-ADR with Binds audit surface, rejected-kept), three backfilled ADRs (minimalist assumptions as contract; visible-ASCII member IDs; shutdown safe-join), an AGENTS.md clause, index rows,Established by:links in design-assumptions.md. - PR: canonical rule sourcing — each normative rule gets exactly one canonical home; other files link; safety-critical duplicates (wire-protocol prohibitions in AGENTS.md) are kept but marked "verbatim copy — canonical: ..." with an edit-both reminder; a one-line arbitration clause in AGENTS.md and CONTRIBUTING.md.
- PR: template conformance + sanctioned variants + symbol gaps — fill the missing sections (registry, tracker, dart), amend docs/README.md to bless machine-readable sanctioned variants (cmd doc, multi-package doc, heading aliases), and document the 11 missing exported symbols.
- PR: enforcement —
scripts/check-docs.sh(index consistency, test-name existence, exported-symbol naming, required sections incl. variants read from the template, ADR integrity, canonical-copy drift), adocs-governanceCI job, a PR template, and one-line tool pointer files (CLAUDE.md etc. → AGENTS.md).
Notes
- Docs-only campaign; the standard trio still runs on every PR.
- The ADR trigger list deliberately excludes bug fixes, test additions, and internal refactors — bureaucracy resistance is a design goal.
- Check 3 (exported-symbol naming) is a floor check: it enforces naming, review keeps enforcing quality. No LLM in CI, by design.
Metadata
Metadata
Assignees
Labels
No labels
Activity
docs: establish the Architecture Decision Record system (+3 backfills…
docs: single-source normative rules with marked canonical copies (refs …
docs: template conformance, sanctioned shapes, exported-symbol covera…
ci+docs: enforce the documentation floor with check-docs.sh (refs #64) (
Coldwings commentedon Aug 31, 2026
All four PRs are merged and main's CI (including the new
docs governancejob) is green. Closing out the campaign.What landed
docs/adr/= frozen case law), T1–T5 triggers, proposed→accepted→superseded lifecycle, plus backfilled ADR-0001 (minimalist assumptions as contract, #22/#28), ADR-0002 (visible-ASCII member IDs, #21/#44), ADR-0003 (shutdown safe-join, #45/#48) — each with rejected alternatives andBindsaudit listsCANONICAL/CANONICAL-COPYmarker convention; verify-trio canonically in AGENTS.md (marked copies in CONTRIBUTING.md and docs/README.md); wire-protocol rules canonically in hashring.md §6 / chunk.md §6 (marked copies in AGENTS.md); "Authority and canonical sources" precedence clauseDOC-SHAPESmachine-readable block (package/cmd/multi shapes + heading aliases); all exported symbols now named in their package docs (verified bygo doc -allsweep)scripts/check-docs.sh(6 hard-fail floor checks: index↔files, test-name existence, exported-symbol naming, required sections parsed from DOC-SHAPES, ADR integrity, canonical-copy lockstep; + soft link warning),docs-governanceCI job, PR template with ADR checklist line, CLAUDE.md/.cursorrules pointers to AGENTS.mdFindings A–E — status
Honest residual limits
Coldwings commentedon Aug 31, 2026
Campaign complete: all four PRs merged, main CI green.