@adia-ai/adia-ui-forge 0.1.3 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +4 -7
- package/CHANGELOG.md +35 -34
- package/README.md +35 -40
- package/agents/a2ui-engineer.md +22 -53
- package/agents/component-author.md +29 -0
- package/agents/framework-verifier.md +26 -0
- package/agents/release-engineer.md +21 -81
- package/agents/routing-corpus.json +293 -64
- package/bin/demo-postwrite-pattern-gate +94 -0
- package/bin/forge-lint +17 -2
- package/bin/sidecar-prewrite-guard +104 -0
- package/commands/deploy.md +9 -0
- package/commands/dogfood.md +10 -0
- package/commands/gen-review.md +9 -0
- package/commands/release.md +10 -0
- package/hooks/hooks.json +15 -0
- package/package.json +3 -6
- package/references/contracts/a2ui-mcp-surface.md +35 -0
- package/references/contracts/migration-guide-format.md +34 -0
- package/references/shared/content-trust.md +19 -74
- package/skills/adia-a2ui/SKILL.md +99 -0
- package/skills/{adia-ui-a2ui → adia-a2ui}/evals/routing-corpus.json +10 -10
- package/skills/adia-a2ui/references/anti-patterns.md +27 -0
- package/skills/adia-a2ui/references/chunk-authoring.md +71 -0
- package/skills/adia-a2ui/references/corpus-discipline.md +68 -0
- package/skills/adia-a2ui/references/eval-diagnostics.md +86 -0
- package/skills/adia-a2ui/references/format-extension-decisions.md +66 -0
- package/skills/adia-a2ui/references/leverage-rules.md +52 -0
- package/skills/adia-a2ui/references/mcp-pipeline-ops.md +83 -0
- package/skills/adia-a2ui/references/mcp-tool-reference.md +59 -0
- package/skills/adia-a2ui/references/pipeline-overview.md +115 -0
- package/skills/adia-a2ui/references/semantic-fail-lifting.md +74 -0
- package/skills/adia-a2ui/references/strategy-engines.md +109 -0
- package/skills/adia-a2ui/references/zettel-calibration.md +104 -0
- package/skills/adia-author/SKILL.md +112 -0
- package/skills/adia-author/evals/routing-corpus.json +222 -0
- package/skills/{adia-ui-authoring → adia-author}/references/anti-patterns.md +33 -4
- package/skills/{adia-ui-authoring → adia-author}/references/authoring-cycle.md +9 -11
- package/skills/adia-author/references/canonical-pattern-index.md +243 -0
- package/skills/{adia-ui-authoring → adia-author}/references/code-style.md +19 -21
- package/skills/adia-author/references/common-gotchas.md +129 -0
- package/skills/adia-author/references/composite-demo-protocol.md +271 -0
- package/skills/{adia-ui-authoring → adia-author}/references/css-patterns.md +19 -6
- package/skills/{adia-ui-authoring → adia-author}/references/lifecycle-patterns.md +1 -0
- package/skills/{adia-ui-authoring → adia-author}/references/llm-bridge.md +3 -5
- package/skills/{adia-ui-authoring → adia-author}/references/module-promotion.md +20 -38
- package/skills/{adia-ui-authoring → adia-author}/references/primitive-audit.md +2 -4
- package/skills/{adia-ui-authoring → adia-author}/references/shell-patterns.md +12 -18
- package/skills/{adia-ui-authoring → adia-author}/references/token-contract.md +5 -7
- package/skills/{adia-ui-authoring → adia-author}/references/worked-example.md +3 -3
- package/skills/{adia-ui-authoring → adia-author}/references/yaml-contract.md +3 -3
- package/skills/{adia-ui-authoring → adia-author}/scripts/build-canonical-pattern-index.mjs +3 -3
- package/skills/adia-deploy/SKILL.md +128 -0
- package/skills/{adia-ui-ops → adia-deploy}/references/deploy-playbooks.md +47 -30
- package/skills/adia-dogfood/SKILL.md +124 -0
- package/skills/adia-dogfood/references/admin-shell-anatomy.md +77 -0
- package/skills/adia-dogfood/references/app-shell-pitfalls.md +66 -0
- package/skills/adia-dogfood/references/card-anatomy-sweep.md +66 -0
- package/skills/adia-dogfood/references/html-attr-sweep.md +63 -0
- package/skills/adia-dogfood/references/native-leak-annotations.md +73 -0
- package/skills/adia-dogfood/references/visual-probe-triage.md +80 -0
- package/skills/{adia-ui-dogfood → adia-dogfood}/scripts/analyze.mjs +30 -14
- package/skills/adia-gen-review/SKILL.md +127 -0
- package/skills/adia-gen-review/references/corpus-html-patterns.md +279 -0
- package/skills/adia-gen-review/references/loop-protocol.md +216 -0
- package/skills/adia-gen-review/references/rubric-cosmetic.md +100 -0
- package/skills/adia-gen-review/references/rubric-decompose.md +101 -0
- package/skills/adia-gen-review/references/rubric-score.md +214 -0
- package/skills/{adia-ui-gen-review → adia-gen-review}/references/scores.schema.json +2 -2
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-coverage-audit.mjs +4 -4
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-decompose.mjs +10 -6
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-status.mjs +5 -5
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/validate-cycle-scores.mjs +5 -5
- package/skills/adia-llm-internals/SKILL.md +77 -0
- package/skills/{adia-ui-llm → adia-llm-internals}/references/adapter-contract.md +4 -2
- package/skills/{adia-ui-llm → adia-llm-internals}/references/add-a-provider.md +4 -5
- package/skills/{adia-ui-llm → adia-llm-internals}/references/bridge-facade.md +10 -3
- package/skills/{adia-ui-llm → adia-llm-internals}/references/browser-proxy-boundary.md +1 -1
- package/skills/{adia-ui-llm → adia-llm-internals}/references/model-registry.md +5 -3
- package/skills/{adia-ui-llm → adia-llm-internals}/references/streaming-sse.md +2 -2
- package/skills/adia-release/SKILL.md +72 -0
- package/skills/adia-release/references/changelog-discipline.md +119 -0
- package/skills/adia-release/references/cut-procedure.md +247 -0
- package/skills/adia-release/references/gates-catalog.md +222 -0
- package/skills/adia-release/references/independent-package-release.md +52 -0
- package/skills/adia-release/references/migration-guide-authoring.md +86 -0
- package/skills/adia-release/references/notes-authoring.md +90 -0
- package/skills/adia-release/references/recovery-paths.md +106 -0
- package/skills/{adia-ui-release → adia-release}/scripts/bump.mjs +28 -3
- package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +10 -7
- package/skills/{adia-ui-release → adia-release}/scripts/insert-stub.mjs +1 -1
- package/skills/{adia-ui-release → adia-release}/scripts/package-paths.mjs +6 -0
- package/skills/{adia-ui-release → adia-release}/scripts/promote-unreleased.mjs +1 -1
- package/skills/{adia-ui-release → adia-release}/scripts/release-pack.mjs +38 -31
- package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +7 -3
- package/skills/adia-site-docs/SKILL.md +68 -0
- package/skills/adia-site-docs/evals/audit-report.md +30 -0
- package/skills/adia-site-docs/evals/routing-corpus.json +176 -0
- package/skills/adia-site-docs/intent.md +72 -0
- package/agents/README.md +0 -209
- package/agents/author.md +0 -56
- package/agents/repo-steward.md +0 -56
- package/agents/spec-architect.md +0 -53
- package/agents/tech-lead.md +0 -57
- package/agents/verifier.md +0 -55
- package/bin/lib/audit-axes.mjs +0 -555
- package/bin/lib/dry-run-irreversible.mjs +0 -236
- package/bin/lib/run-skill-evals.mjs +0 -487
- package/bin/lib/teach-router.mjs +0 -250
- package/commands/adia-forge-a2ui.md +0 -10
- package/commands/adia-forge-author.md +0 -10
- package/commands/adia-forge-dogfood.md +0 -8
- package/commands/adia-forge-llm.md +0 -8
- package/commands/adia-forge-orient.md +0 -10
- package/commands/adia-forge-release.md +0 -8
- package/commands/adia-forge-review.md +0 -10
- package/references/shared/pev-rationale.md +0 -64
- package/references/shared/skill-conventions.md +0 -133
- package/skills/adia-ui-a2ui/CHANGELOG.md +0 -32
- package/skills/adia-ui-a2ui/SKILL.md +0 -243
- package/skills/adia-ui-a2ui/evals/adversarial-corpus.json +0 -75
- package/skills/adia-ui-a2ui/evals/teach-routing-cases.json +0 -100
- package/skills/adia-ui-a2ui/references/anti-patterns.md +0 -24
- package/skills/adia-ui-a2ui/references/chunk-authoring.md +0 -88
- package/skills/adia-ui-a2ui/references/corpus-discipline.md +0 -56
- package/skills/adia-ui-a2ui/references/eval-diagnostics.md +0 -127
- package/skills/adia-ui-a2ui/references/fragment-graph.md +0 -91
- package/skills/adia-ui-a2ui/references/mcp-pipeline-ops.md +0 -106
- package/skills/adia-ui-a2ui/references/mcp-tool-reference.md +0 -398
- package/skills/adia-ui-a2ui/references/pipeline-overview.md +0 -175
- package/skills/adia-ui-a2ui/references/semantic-fail-lifting.md +0 -120
- package/skills/adia-ui-a2ui/references/strategy-engines.md +0 -111
- package/skills/adia-ui-a2ui/references/teach-protocol.md +0 -220
- package/skills/adia-ui-a2ui/references/zettel-calibration.md +0 -93
- package/skills/adia-ui-a2ui/scripts/audit-a2ui-roster.mjs +0 -96
- package/skills/adia-ui-a2ui/scripts/teach-route.mjs +0 -157
- package/skills/adia-ui-a2ui/skill.json +0 -38
- package/skills/adia-ui-authoring/CHANGELOG.md +0 -32
- package/skills/adia-ui-authoring/SKILL.md +0 -256
- package/skills/adia-ui-authoring/assets/case-studies/admin-shell-decomposition.md +0 -101
- package/skills/adia-ui-authoring/assets/case-studies/maxtokens-32768-discovery.md +0 -109
- package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +0 -113
- package/skills/adia-ui-authoring/evals/adversarial-design-plan-gates.json +0 -138
- package/skills/adia-ui-authoring/evals/routing-corpus.json +0 -245
- package/skills/adia-ui-authoring/references/canonical-pattern-index.md +0 -179
- package/skills/adia-ui-authoring/references/common-gotchas.md +0 -93
- package/skills/adia-ui-authoring/references/composite-demo-protocol.md +0 -1084
- package/skills/adia-ui-authoring/references/teach-protocol.md +0 -428
- package/skills/adia-ui-authoring/scripts/audit-authoring-roster.mjs +0 -148
- package/skills/adia-ui-authoring/skill.json +0 -45
- package/skills/adia-ui-dogfood/CHANGELOG.md +0 -17
- package/skills/adia-ui-dogfood/README.md +0 -62
- package/skills/adia-ui-dogfood/SKILL.md +0 -866
- package/skills/adia-ui-dogfood/skill.json +0 -40
- package/skills/adia-ui-forge/SKILL.md +0 -88
- package/skills/adia-ui-forge/evals/routing-corpus.json +0 -30
- package/skills/adia-ui-gen-review/CHANGELOG.md +0 -108
- package/skills/adia-ui-gen-review/SKILL.md +0 -266
- package/skills/adia-ui-gen-review/references/loop-protocol.md +0 -712
- package/skills/adia-ui-gen-review/references/rubric-cosmetic.md +0 -144
- package/skills/adia-ui-gen-review/references/rubric-decompose.md +0 -117
- package/skills/adia-ui-gen-review/references/rubric-score.md +0 -249
- package/skills/adia-ui-gen-review/references/teach-protocol.md +0 -214
- package/skills/adia-ui-gen-review/skill.json +0 -23
- package/skills/adia-ui-llm/CHANGELOG.md +0 -25
- package/skills/adia-ui-llm/SKILL.md +0 -165
- package/skills/adia-ui-llm/evals/adversarial-corpus.json +0 -75
- package/skills/adia-ui-llm/evals/routing-corpus.json +0 -30
- package/skills/adia-ui-llm/evals/teach-routing-cases.json +0 -73
- package/skills/adia-ui-llm/references/teach-protocol.md +0 -78
- package/skills/adia-ui-llm/scripts/audit-llm-roster.mjs +0 -93
- package/skills/adia-ui-llm/scripts/teach-route.mjs +0 -119
- package/skills/adia-ui-llm/skill.json +0 -33
- package/skills/adia-ui-ops/CHANGELOG.md +0 -291
- package/skills/adia-ui-ops/SKILL.md +0 -401
- package/skills/adia-ui-ops/references/INDEX.md +0 -158
- package/skills/adia-ui-ops/references/audit-cadence.md +0 -263
- package/skills/adia-ui-ops/references/audit-patterns/archive-link-sweep.md +0 -96
- package/skills/adia-ui-ops/references/audit-patterns/audit-history-ledger.md +0 -162
- package/skills/adia-ui-ops/references/audit-patterns/browser-bundle-node-imports.md +0 -154
- package/skills/adia-ui-ops/references/audit-patterns/changelog-unreleased-bloat.md +0 -75
- package/skills/adia-ui-ops/references/audit-patterns/coverage-gaps.md +0 -187
- package/skills/adia-ui-ops/references/audit-patterns/entry-file-coverage.md +0 -122
- package/skills/adia-ui-ops/references/audit-patterns/format-hygiene.md +0 -217
- package/skills/adia-ui-ops/references/audit-patterns/lockstep-versioning.md +0 -113
- package/skills/adia-ui-ops/references/audit-patterns/memory-fragmentation.md +0 -180
- package/skills/adia-ui-ops/references/audit-patterns/orphan-detection.md +0 -202
- package/skills/adia-ui-ops/references/audit-patterns/pointer-validation.md +0 -180
- package/skills/adia-ui-ops/references/audit-patterns/redundancy-detection.md +0 -210
- package/skills/adia-ui-ops/references/audit-patterns/spec-dating-sweep.md +0 -91
- package/skills/adia-ui-ops/references/audit-patterns/stale-content.md +0 -182
- package/skills/adia-ui-ops/references/audit-patterns/staleness-tooling.md +0 -156
- package/skills/adia-ui-ops/references/audit-patterns/token-waste-detection.md +0 -196
- package/skills/adia-ui-ops/references/doc-types/adr-pattern.md +0 -210
- package/skills/adia-ui-ops/references/doc-types/architecture-md.md +0 -190
- package/skills/adia-ui-ops/references/doc-types/changelog.md +0 -183
- package/skills/adia-ui-ops/references/doc-types/decisions-log.md +0 -146
- package/skills/adia-ui-ops/references/doc-types/plan-roadmap.md +0 -182
- package/skills/adia-ui-ops/references/doc-types/postmortem-pattern.md +0 -206
- package/skills/adia-ui-ops/references/genres/prose-and-writing.md +0 -149
- package/skills/adia-ui-ops/references/guidance/context-budget.md +0 -137
- package/skills/adia-ui-ops/references/guidance/llm-doc-writing.md +0 -116
- package/skills/adia-ui-ops/references/guidance/reliability-dial.md +0 -186
- package/skills/adia-ui-ops/references/recipes/adr-introduction.md +0 -211
- package/skills/adia-ui-ops/references/recipes/audit-existing-repo.md +0 -234
- package/skills/adia-ui-ops/references/recipes/cold-start-harvest.md +0 -263
- package/skills/adia-ui-ops/references/recipes/concurrent-learnings-merge.md +0 -158
- package/skills/adia-ui-ops/references/recipes/continuous-learning-loop.md +0 -169
- package/skills/adia-ui-ops/references/recipes/external-reference-verification.md +0 -158
- package/skills/adia-ui-ops/references/recipes/findings-index-readout.md +0 -126
- package/skills/adia-ui-ops/references/recipes/greenfield-setup.md +0 -252
- package/skills/adia-ui-ops/references/recipes/harvest-repo-brain.md +0 -169
- package/skills/adia-ui-ops/references/recipes/import-repo-brain-harvest.md +0 -153
- package/skills/adia-ui-ops/references/recipes/memory-organization.md +0 -182
- package/skills/adia-ui-ops/references/recipes/recommend-then-validate.md +0 -199
- package/skills/adia-ui-ops/references/recipes/self-healing-hooks.md +0 -366
- package/skills/adia-ui-ops/references/recipes/skill-stewardship-loop.md +0 -113
- package/skills/adia-ui-ops/references/standards/agents-md-spec.md +0 -138
- package/skills/adia-ui-ops/references/standards/claude-md-convention.md +0 -123
- package/skills/adia-ui-ops/references/standards/cross-tool-matrix.md +0 -85
- package/skills/adia-ui-ops/references/standards/readme-conventions.md +0 -232
- package/skills/adia-ui-ops/references/teach-protocol.md +0 -215
- package/skills/adia-ui-ops/scripts/audit-ops-roster.mjs +0 -104
- package/skills/adia-ui-ops/skill.json +0 -65
- package/skills/adia-ui-release/CHANGELOG.md +0 -66
- package/skills/adia-ui-release/SKILL.md +0 -323
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-batch-push-v0.6.14-v0.6.15.md +0 -144
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md +0 -155
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-version-skip-correction-v0.6.12.md +0 -114
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md +0 -139
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-feedback37-retraction-v0.6.21.md +0 -124
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md +0 -125
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-stale-test-detection-v0.6.20.md +0 -142
- package/skills/adia-ui-release/assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md +0 -97
- package/skills/adia-ui-release/assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md +0 -147
- package/skills/adia-ui-release/assets/templates/stub-changelog.template.md +0 -22
- package/skills/adia-ui-release/evals/evals.json +0 -164
- package/skills/adia-ui-release/references/changelog-discipline.md +0 -250
- package/skills/adia-ui-release/references/cycle-happy-path.md +0 -520
- package/skills/adia-ui-release/references/exe-deploy.md +0 -149
- package/skills/adia-ui-release/references/gates-catalog.md +0 -778
- package/skills/adia-ui-release/references/independent-package-release.md +0 -129
- package/skills/adia-ui-release/references/ledger-discipline.md +0 -232
- package/skills/adia-ui-release/references/migration-guide-authoring.md +0 -174
- package/skills/adia-ui-release/references/multi-agent-baseline.md +0 -207
- package/skills/adia-ui-release/references/notes-authoring.md +0 -212
- package/skills/adia-ui-release/references/recovery-paths.md +0 -262
- package/skills/adia-ui-release/references/rollup-notes.md +0 -208
- package/skills/adia-ui-release/references/teach-protocol.md +0 -468
- package/skills/adia-ui-release/scripts/audit-gate-roster.mjs +0 -196
- package/skills/adia-ui-release/scripts/make-ledger.mjs +0 -200
- package/skills/adia-ui-release/skill.json +0 -77
- package/skills/dogfood-sweep/CHANGELOG.md +0 -37
- package/skills/dogfood-sweep/README.md +0 -105
- package/skills/dogfood-sweep/SKILL.md +0 -1000
- package/skills/dogfood-sweep/analyze.mjs +0 -600
- package/skills/dogfood-sweep/skill.json +0 -31
- /package/skills/{adia-ui-authoring → adia-author}/references/api-contract.md +0 -0
- /package/skills/{adia-ui-release → adia-release}/scripts/assert-monorepo-root.mjs +0 -0
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
date: 2026-04-27
|
|
3
|
-
coverage: canonical
|
|
4
|
-
peers:
|
|
5
|
-
- decisions-log.md
|
|
6
|
-
- architecture-md.md
|
|
7
|
-
- postmortem-pattern.md
|
|
8
|
-
primary_sources:
|
|
9
|
-
- Michael Nygard, "Documenting Architecture Decisions" (cognitect.com/blog/2011/11/15) — the original ADR essay
|
|
10
|
-
- https://adr.github.io — ADR organization (canonical hub)
|
|
11
|
-
- https://github.com/joelparkerhenderson/architecture-decision-record — Joel Parker Henderson's ADR catalog (most-cited examples library, actively maintained)
|
|
12
|
-
- https://adr.github.io/madr/ — MADR 4.0.0 (released 2024-09-17, "Markdown Any Decision Records")
|
|
13
|
-
- https://medium.com/olzzio/y-statements-10eb07b5a177 — Olaf Zimmermann, Y-statements (SATURN 2012)
|
|
14
|
-
- https://github.com/npryce/adr-tools — adr-tools CLI (lightly maintained)
|
|
15
|
-
- https://learn.microsoft.com/en-us/azure/well-architected/architect-role/architecture-decision-record — ADR / Decision Log canonical meaning
|
|
16
|
-
status: research-verified
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Architecture Decision Records (ADRs)
|
|
20
|
-
|
|
21
|
-
> **One ADR captures one architectural decision and its context — *immutably*.** Decisions don't get edited; they get superseded. The newest ADR wins; older ADRs remain as history.
|
|
22
|
-
|
|
23
|
-
## What an ADR is (and isn't)
|
|
24
|
-
|
|
25
|
-
An ADR is a **dated, numbered, status-bearing Markdown file** that captures:
|
|
26
|
-
|
|
27
|
-
- **Why** a decision was made (the problem and constraints)
|
|
28
|
-
- **What** was decided (the chosen path)
|
|
29
|
-
- **What was considered** (the alternatives and why they lost)
|
|
30
|
-
- **Consequences** (the trade-offs the team is signing up for)
|
|
31
|
-
|
|
32
|
-
An ADR is **not** a design doc, RFC, spec, or proposal. Those describe future work; an ADR records a *commitment that has been made*. Once accepted, it is rarely edited — instead, a new ADR supersedes it.
|
|
33
|
-
|
|
34
|
-
## File layout
|
|
35
|
-
|
|
36
|
-
Standard:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
.brain/adrs/
|
|
40
|
-
├── 0001-record-architecture-decisions.md
|
|
41
|
-
├── 0002-use-postgres-not-mysql.md
|
|
42
|
-
├── 0003-rest-not-graphql.md
|
|
43
|
-
├── 0004-deprecate-redis-cache.md
|
|
44
|
-
└── README.md
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Numbering is strictly sequential. Filename pattern: `NNNN-kebab-case-title.md`.
|
|
48
|
-
|
|
49
|
-
## The Nygard format (canonical, ~2011)
|
|
50
|
-
|
|
51
|
-
Michael Nygard's [original 2011 essay](https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions) gave the field its first standard:
|
|
52
|
-
|
|
53
|
-
```markdown
|
|
54
|
-
# 1. Record architecture decisions
|
|
55
|
-
|
|
56
|
-
Date: 2026-04-27
|
|
57
|
-
|
|
58
|
-
## Status
|
|
59
|
-
|
|
60
|
-
Accepted
|
|
61
|
-
|
|
62
|
-
## Context
|
|
63
|
-
|
|
64
|
-
What is the issue we're seeing that motivates this decision?
|
|
65
|
-
|
|
66
|
-
## Decision
|
|
67
|
-
|
|
68
|
-
What is the change we're making?
|
|
69
|
-
|
|
70
|
-
## Consequences
|
|
71
|
-
|
|
72
|
-
What becomes easier or harder because of this change?
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Five sections: Title, Date, Status, Context, Decision, Consequences. Short and disciplined.
|
|
76
|
-
|
|
77
|
-
## Status values
|
|
78
|
-
|
|
79
|
-
The set is small and load-bearing:
|
|
80
|
-
|
|
81
|
-
| Status | Meaning |
|
|
82
|
-
|---|---|
|
|
83
|
-
| `Proposed` | Drafted, under discussion, not yet accepted |
|
|
84
|
-
| `Accepted` | Decided. The team is committed. |
|
|
85
|
-
| `Rejected` | Considered and not adopted. Recorded so it doesn't get re-proposed without context. |
|
|
86
|
-
| `Deprecated` | No longer active but not yet replaced |
|
|
87
|
-
| `Superseded by ADR-NNNN` | Replaced by a newer decision |
|
|
88
|
-
|
|
89
|
-
## ADR vs Architecture Decision Log (ADL) — canonical meaning
|
|
90
|
-
|
|
91
|
-
The widely-cited industry view (Microsoft Azure Well-Architected Framework, AWS Prescriptive Guidance, adr.github.io):
|
|
92
|
-
|
|
93
|
-
> "An Architectural Decision Record (ADR) captures a single AD and its rationale; **the collection of ADRs constitutes the decision log.**"
|
|
94
|
-
|
|
95
|
-
So the canonical "decision log" is **the index of all ADRs** in `.brain/adrs/`, not a separate folder. Generate it from filenames + status fields, or maintain `.brain/adrs/README.md` as a hand-written index.
|
|
96
|
-
|
|
97
|
-
Some teams *additionally* maintain a lighter `.brain/decisions/` folder for non-architectural decisions (tooling picks, library swaps, day-to-day commitments). That's a **team convention, not industry standard** — but it's a useful split when ADRs feel too heavyweight for routine choices. The audit should detect both shapes and not flag either as wrong; just note which convention is in play.
|
|
98
|
-
|
|
99
|
-
## MADR 4.0.0 (Markdown Any Decision Records)
|
|
100
|
-
|
|
101
|
-
MADR ([adr.github.io/madr](https://adr.github.io/madr/)) is the current canonical structured variant. Released **4.0.0 on 2024-09-17** with a notable rename: the *A* now stands for *Any* (was *Architectural*) — explicitly broadening scope to non-architectural decisions. Templates: `adr-template.md`, `adr-template-minimal.md`, `adr-template-bare.md`. **YADR** (YAML ADRs) added March 2026.
|
|
102
|
-
|
|
103
|
-
MADR adds:
|
|
104
|
-
|
|
105
|
-
- `Deciders:` (who decided)
|
|
106
|
-
- `Consulted:` / `Informed:` (who else was looped in)
|
|
107
|
-
- More explicit "Considered Options" with pros/cons per option
|
|
108
|
-
|
|
109
|
-
```markdown
|
|
110
|
-
---
|
|
111
|
-
status: accepted
|
|
112
|
-
date: 2026-04-27
|
|
113
|
-
deciders: alice, bob
|
|
114
|
-
consulted: data-team
|
|
115
|
-
informed: engineering-all
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
# Use Postgres, not MySQL
|
|
119
|
-
|
|
120
|
-
## Context and Problem Statement
|
|
121
|
-
|
|
122
|
-
We need a relational database for the user-account service.
|
|
123
|
-
|
|
124
|
-
## Decision Drivers
|
|
125
|
-
|
|
126
|
-
- Mature JSONB support
|
|
127
|
-
- Strong concurrency story
|
|
128
|
-
- Existing team skills
|
|
129
|
-
|
|
130
|
-
## Considered Options
|
|
131
|
-
|
|
132
|
-
- Postgres
|
|
133
|
-
- MySQL
|
|
134
|
-
- SQLite
|
|
135
|
-
|
|
136
|
-
## Decision Outcome
|
|
137
|
-
|
|
138
|
-
Chosen: **Postgres**, because of JSONB + concurrency + team skills.
|
|
139
|
-
|
|
140
|
-
### Consequences
|
|
141
|
-
|
|
142
|
-
- Good: rich query power, strong type system
|
|
143
|
-
- Bad: ops overhead vs SQLite
|
|
144
|
-
|
|
145
|
-
## Pros and Cons of the Options
|
|
146
|
-
|
|
147
|
-
### Postgres
|
|
148
|
-
- Good: ...
|
|
149
|
-
- Bad: ...
|
|
150
|
-
|
|
151
|
-
### MySQL
|
|
152
|
-
- Good: ...
|
|
153
|
-
- Bad: ...
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
MADR's structure scales better to larger teams and audit trails. Nygard's brevity is right for smaller teams. Pick one and stick with it.
|
|
157
|
-
|
|
158
|
-
## Y-statements (Zimmermann)
|
|
159
|
-
|
|
160
|
-
A concise alternative format positioned by adr.github.io as current best practice. Single-sentence form:
|
|
161
|
-
|
|
162
|
-
> *"In the context of `<use case / user story>`, facing `<concern>` we decided for `<option>` and neglected `<other options>`, to achieve `<system qualities>` / `<desired consequences>`, accepting `<downside / undesired consequences>`."*
|
|
163
|
-
|
|
164
|
-
Origin: Olaf Zimmermann, SATURN 2012. Useful as a one-line summary line at the top of a longer ADR, or as the entire ADR for small reversible choices. Pairs well with MADR.
|
|
165
|
-
|
|
166
|
-
## Tooling (April 2026)
|
|
167
|
-
|
|
168
|
-
- **`adr-tools`** by Nat Pryce: https://github.com/npryce/adr-tools — Bash CLI; **lightly maintained** as of April 2026 (no recent releases; MADR-support PR #43 was rejected for maintenance burden). Still functional for the ADR-creation workflow it was built for.
|
|
169
|
-
- **`adr-log`**: generates a Markdown index from a folder of ADRs.
|
|
170
|
-
- **`log4brains`**: web-based ADR browser; check current maintenance state before adopting.
|
|
171
|
-
- **`adr-manager`**: web-UI ADR editor.
|
|
172
|
-
- **For new projects, no tool is required.** `mkdir -p .brain/adrs && cp ~/.adr-templates/madr-minimal.md .brain/adrs/0001-record-architecture-decisions.md` is enough. Tooling adds friction; many teams now skip it.
|
|
173
|
-
|
|
174
|
-
## How AGENTS.md should reference ADRs
|
|
175
|
-
|
|
176
|
-
In the `Where to find things` section:
|
|
177
|
-
|
|
178
|
-
```markdown
|
|
179
|
-
- **Architecture Decision Records:** `.brain/adrs/` — newest-first; read before making architectural changes
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
In the `Memory primitives` section:
|
|
183
|
-
|
|
184
|
-
```markdown
|
|
185
|
-
- **Before making architectural decisions**, read `.brain/adrs/` newest-first. If your proposed change conflicts with an `Accepted` ADR, write a new ADR superseding it; don't silently override.
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Common anti-patterns
|
|
189
|
-
|
|
190
|
-
- **No `.brain/adrs/` folder at all** — decisions live in random PR descriptions, Slack, code comments. Memory fragmentation.
|
|
191
|
-
- **ADRs as RFCs** — files marked `Proposed` that never get marked `Accepted` or `Rejected`. Status drift.
|
|
192
|
-
- **Editing accepted ADRs** — defeats the audit trail. Edits should be supersessions instead.
|
|
193
|
-
- **No `Status:` field** — readers can't tell what's current.
|
|
194
|
-
- **Mixed numbering schemes** — `001-foo.md`, `2-bar.md`, `0003-baz.md`. Pick `NNNN-` four-digit and stick with it.
|
|
195
|
-
- **No ADR for the introduction of ADRs themselves** — the first ADR (`0001`) should be "Record architecture decisions" so the practice itself is decided.
|
|
196
|
-
|
|
197
|
-
## Audit checks for ADRs
|
|
198
|
-
|
|
199
|
-
1. **Folder exists** at `.brain/adrs/` (or close — `.brain/architecture/decisions/`, `adrs/`, etc.).
|
|
200
|
-
2. **Numbering is consistent** (`NNNN-` four-digit, sequential).
|
|
201
|
-
3. **Each ADR has a `Status:` field**.
|
|
202
|
-
4. **No ADRs are in `Proposed` for >30 days** (probably abandoned — flag).
|
|
203
|
-
5. **`.brain/adrs/` is referenced from AGENTS.md**.
|
|
204
|
-
|
|
205
|
-
## Cross-references
|
|
206
|
-
|
|
207
|
-
- Decision log (looser): `decisions-log.md`
|
|
208
|
-
- Architecture overview: `architecture-md.md`
|
|
209
|
-
- Adding ADRs to existing repo: `../recipes/adr-introduction.md`
|
|
210
|
-
- Memory organization: `../recipes/memory-organization.md`
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
date: 2026-04-27
|
|
3
|
-
coverage: canonical
|
|
4
|
-
peers:
|
|
5
|
-
- adr-pattern.md
|
|
6
|
-
- decisions-log.md
|
|
7
|
-
- changelog.md
|
|
8
|
-
primary_sources:
|
|
9
|
-
- https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html — Aleksey Kladov (matklad), "ARCHITECTURE.md" (the canonical pattern essay, Feb 2021)
|
|
10
|
-
- https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/architecture.md — rust-analyzer's ARCHITECTURE.md (the canonical example)
|
|
11
|
-
- https://github.com/sourcegraph/sourcegraph/blob/main/doc/dev/background-information/architecture/index.md — Sourcegraph's adoption of the pattern
|
|
12
|
-
- https://learn.microsoft.com/en-us/azure/well-architected/architect-role/architecture-decision-record — Microsoft Azure WAF on architecture documentation
|
|
13
|
-
status: research-verified
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# ARCHITECTURE.md — current state, in 30 minutes
|
|
17
|
-
|
|
18
|
-
> **ARCHITECTURE.md answers: "I'm new here. Where do I look first?"** Not "what did we decide?" (that's ADRs) and not "what shipped?" (that's CHANGELOG). It is a *map of the codebase as it currently is*, optimized for someone landing in the repo cold.
|
|
19
|
-
|
|
20
|
-
This pattern delivers **Promise 2 (token-and-context-optimized)** by giving an LLM agent a single high-signal entry into the codebase's structure, and **Promise 1 (less-wasteful)** by replacing the scattered "tribal knowledge" that otherwise accumulates in PR comments, Slack threads, and 3-year-old wiki pages.
|
|
21
|
-
|
|
22
|
-
## Origin and canonical source
|
|
23
|
-
|
|
24
|
-
The pattern was named and codified by **Aleksey Kladov** (handle: *matklad*, lead author of rust-analyzer) in the February 2021 blog post [**"ARCHITECTURE.md"**](https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html). The canonical exemplar is rust-analyzer's own [`docs/dev/architecture.md`](https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/architecture.md).
|
|
25
|
-
|
|
26
|
-
Kladov's framing:
|
|
27
|
-
|
|
28
|
-
> "Looking at someone else's code is hard, but very useful sometimes. The best help for an outsider is a single document, a map, which describes the *bird's-eye view* of the project, and explains how to navigate the code."
|
|
29
|
-
|
|
30
|
-
The pattern has spread widely — Sourcegraph, Tantivy, hyperqueue, ripgrep, and many others use a doc by the same name (or `architecture/` folder with the same shape).
|
|
31
|
-
|
|
32
|
-
## What ARCHITECTURE.md *is* (and what it's not)
|
|
33
|
-
|
|
34
|
-
| ARCHITECTURE.md | Not ARCHITECTURE.md |
|
|
35
|
-
|---|---|
|
|
36
|
-
| Current state of the system | History of how it got here (→ git log, ADRs) |
|
|
37
|
-
| Map of the codebase ("Module X lives at `src/x/`") | Decision rationale ("Why did we pick X?" → ADRs) |
|
|
38
|
-
| 30-minute onboarding | Comprehensive technical reference (→ separate docs) |
|
|
39
|
-
| Names directories and the responsibility of each | Lists every file (→ tooling) |
|
|
40
|
-
| Cross-cutting concerns (concurrency model, error handling, lifetime) | API documentation (→ generated docs) |
|
|
41
|
-
| Non-obvious intentional choices ("we deliberately don't use X") | Future plans (→ ROADMAP.md) |
|
|
42
|
-
| Updated when architecture changes | Updated weekly (→ PLAN.md) |
|
|
43
|
-
|
|
44
|
-
The discipline is: **document things that won't change much, that an experienced engineer would still want explained.** Module purpose, layering, where-data-flows-from-input-to-output, how-tests-are-organized, what-not-to-do.
|
|
45
|
-
|
|
46
|
-
## The 30-minute onboarding shape
|
|
47
|
-
|
|
48
|
-
Kladov's recommended sections (with this skill's annotations):
|
|
49
|
-
|
|
50
|
-
### 1. Bird's-eye view
|
|
51
|
-
|
|
52
|
-
One paragraph or one diagram. What does this project *do*? Who calls it, what does it call?
|
|
53
|
-
|
|
54
|
-
```markdown
|
|
55
|
-
## Bird's-eye view
|
|
56
|
-
|
|
57
|
-
`acme-cli` is a Rust binary that reads YAML config from `acme.yaml`,
|
|
58
|
-
queries an HTTPS API, and writes Markdown reports to stdout. It has
|
|
59
|
-
no persistent state. It is invoked from CI in the user's repo.
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
If a diagram clarifies — use one. ASCII boxes are fine; Mermaid is fine; an image is fine. Don't gold-plate.
|
|
63
|
-
|
|
64
|
-
### 2. Code map
|
|
65
|
-
|
|
66
|
-
The load-bearing section. **For each top-level directory, one paragraph: what's in it, what's the responsibility, where the boundaries are.**
|
|
67
|
-
|
|
68
|
-
```markdown
|
|
69
|
-
## Code map
|
|
70
|
-
|
|
71
|
-
### `src/cli/`
|
|
72
|
-
Argument parsing (clap), command dispatch. No business logic — delegates to `src/core/`.
|
|
73
|
-
|
|
74
|
-
### `src/core/`
|
|
75
|
-
The orchestrator. Reads config, fans out to API client, aggregates results. **The only module allowed to depend on both the config layer and the API layer.**
|
|
76
|
-
|
|
77
|
-
### `src/api/`
|
|
78
|
-
HTTP client (reqwest). One module per endpoint group. Adding a new endpoint? Look here.
|
|
79
|
-
|
|
80
|
-
### `tests/`
|
|
81
|
-
Integration tests. Use the `wiremock` fixture, not real HTTP.
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
A reader (human or agent) can immediately answer: *"I want to add a new API endpoint. Where?"*
|
|
85
|
-
|
|
86
|
-
### 3. Cross-cutting concerns
|
|
87
|
-
|
|
88
|
-
Things that span modules and aren't inferable from the code map.
|
|
89
|
-
|
|
90
|
-
```markdown
|
|
91
|
-
## Cross-cutting concerns
|
|
92
|
-
|
|
93
|
-
- **Error handling**: `anyhow::Error` everywhere except `src/api/` (typed errors). See ADR-0007.
|
|
94
|
-
- **Concurrency**: single-threaded by default; `--parallel N` spawns tokio. Only `src/core/parallel.rs` knows async.
|
|
95
|
-
- **Logging**: `tracing`, structured JSON. `RUST_LOG` configures.
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### 4. Non-obvious intentional choices
|
|
99
|
-
|
|
100
|
-
The "we deliberately don't do X" section. Saves future contributors hours.
|
|
101
|
-
|
|
102
|
-
```markdown
|
|
103
|
-
## Things we deliberately don't do
|
|
104
|
-
|
|
105
|
-
- **No async by default.** Tokio startup dominated benchmarks. See ADR-0011.
|
|
106
|
-
- **No plugin system.** Rejected (ADR-0014).
|
|
107
|
-
- **No config format other than YAML.** TOML support was removed in v1.2.0.
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
ARCHITECTURE.md *summarizes* the decision and points at the ADR for *why*.
|
|
111
|
-
|
|
112
|
-
### 5. Where to look first
|
|
113
|
-
|
|
114
|
-
The newcomer's quick-start. Optional but high-value for LLM agents — it's a routing table for common tasks.
|
|
115
|
-
|
|
116
|
-
```markdown
|
|
117
|
-
## Where to look first
|
|
118
|
-
|
|
119
|
-
- **Adding a CLI flag?** `src/cli/args.rs`, then dispatch in `src/cli/mod.rs`.
|
|
120
|
-
- **Adding an API endpoint?** `src/api/`. Mirror an existing endpoint.
|
|
121
|
-
- **Investigating a CI failure?** `tests/integration/` first, then logs.
|
|
122
|
-
- **Performance regression?** `benches/` and `cargo bench`.
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Length and ergonomics
|
|
126
|
-
|
|
127
|
-
Kladov's own rust-analyzer ARCHITECTURE.md is ~600 lines. That's at the upper end. **For most repos, 200–400 lines is right.**
|
|
128
|
-
|
|
129
|
-
Under 100 lines → probably missing the code map.
|
|
130
|
-
Over 800 lines → split. Move detail into per-module READMEs (`src/api/README.md`) and keep ARCHITECTURE.md as the bird's-eye + index.
|
|
131
|
-
|
|
132
|
-
This skill's general guidance: **entry-level docs under ~200 lines, pushed-down detail in subdirectory READMEs.** See `../guidance/context-budget.md`.
|
|
133
|
-
|
|
134
|
-
## Distinction from ADRs
|
|
135
|
-
|
|
136
|
-
The most-confused boundary: ARCHITECTURE.md is **present-tense, mutable, system-wide**; ADRs are **past-tense, immutable, per-decision**. ARCHITECTURE.md answers "Where does X live?"; ADRs answer "Why did we choose X?". ARCHITECTURE.md *links* to ADRs ("see ADR-0007"), never duplicates them.
|
|
137
|
-
|
|
138
|
-
## Update discipline
|
|
139
|
-
|
|
140
|
-
ARCHITECTURE.md goes stale faster than ADRs and slower than PLAN.md. Recommended cadence:
|
|
141
|
-
|
|
142
|
-
1. **PR-level**: any PR that adds, renames, or removes a top-level directory must update ARCHITECTURE.md in the same PR. Enforce with a CI check or a CODEOWNERS rule. See `../recipes/self-healing-hooks.md`.
|
|
143
|
-
2. **Quarterly review**: a maintainer re-reads ARCHITECTURE.md against the current tree and patches drift.
|
|
144
|
-
3. **LLM-on-diff**: when a large refactor lands, run an LLM-on-diff pass against ARCHITECTURE.md to flag suspect sections. See `../audit-patterns/staleness-tooling.md`.
|
|
145
|
-
|
|
146
|
-
## How AGENTS.md links ARCHITECTURE.md
|
|
147
|
-
|
|
148
|
-
In the `Where to find things` section:
|
|
149
|
-
|
|
150
|
-
```markdown
|
|
151
|
-
- **Architecture:** `ARCHITECTURE.md` — start here if you're new to the codebase
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
In the `Memory primitives` section:
|
|
155
|
-
|
|
156
|
-
```markdown
|
|
157
|
-
- **Before making changes that span multiple modules**, read `ARCHITECTURE.md` for the code map and cross-cutting concerns. Architecture-altering changes also require a new ADR.
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
`ARCHITECTURE.md` at repo root is the recommended location (matklad's pattern). Avoid `.brain/architecture/index.md` unless you have a folder full of related docs.
|
|
161
|
-
|
|
162
|
-
## Audit checks
|
|
163
|
-
|
|
164
|
-
1. **File exists** at `/ARCHITECTURE.md` (repo root, per matklad).
|
|
165
|
-
2. **Code map covers all top-level src directories.** Diff `ls src/` against the headings in the code map; missing entries = staleness.
|
|
166
|
-
3. **No directory mentioned in the code map is missing from disk.** Renames or removals that didn't update the doc.
|
|
167
|
-
4. **Length is in 100–800 range.** Both extremes are flagged.
|
|
168
|
-
5. **AGENTS.md references ARCHITECTURE.md**, not just `.brain/`.
|
|
169
|
-
6. **`Last reviewed:` line or YAML `date:` is within the last 180 days.** Older = quarterly review missed.
|
|
170
|
-
|
|
171
|
-
## Common anti-patterns
|
|
172
|
-
|
|
173
|
-
- **No ARCHITECTURE.md** — newcomers and agents navigate by `ls` and pattern-match. Slow.
|
|
174
|
-
- **Feature list, not a code map** — describes what the product does, not how it's built.
|
|
175
|
-
- **History, not present-tense** — narrates evolution. That's a blog post.
|
|
176
|
-
- **Duplicates ADR content** — copy-pasted "why" rationale. Link to the ADR instead.
|
|
177
|
-
- **Alphabetical code map** — group by responsibility (core → adapters → entry-points).
|
|
178
|
-
- **Stale code map** — directories renamed in code, not in the doc. Catch with the audit.
|
|
179
|
-
- **Outsourced to a wiki** — agents can't read Confluence; drift is guaranteed. Keep it in the repo.
|
|
180
|
-
|
|
181
|
-
## Cross-references
|
|
182
|
-
|
|
183
|
-
- ADR pattern (decisions, not state): `adr-pattern.md`
|
|
184
|
-
- Decision log (collection of ADRs): `decisions-log.md`
|
|
185
|
-
- Changelog (shipped, not state): `changelog.md`
|
|
186
|
-
- Plan / roadmap (planned, not state): `plan-roadmap.md`
|
|
187
|
-
- Self-healing PR-gate hooks: `../recipes/self-healing-hooks.md`
|
|
188
|
-
- LLM-on-diff staleness detection: `../audit-patterns/staleness-tooling.md`
|
|
189
|
-
- Context budget guidance (200-line target): `../guidance/context-budget.md`
|
|
190
|
-
- AGENTS.md "Where to find things" section: `../standards/agents-md-spec.md`
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
date: 2026-04-27
|
|
3
|
-
coverage: canonical
|
|
4
|
-
peers:
|
|
5
|
-
- plan-roadmap.md
|
|
6
|
-
- decisions-log.md
|
|
7
|
-
- architecture-md.md
|
|
8
|
-
primary_sources:
|
|
9
|
-
- https://keepachangelog.com/en/1.1.0/ — Keep a Changelog 1.1.0 (the canonical convention)
|
|
10
|
-
- https://semver.org/spec/v2.0.0.html — Semantic Versioning 2.0.0
|
|
11
|
-
- https://github.com/changesets/changesets — changesets (monorepo-friendly)
|
|
12
|
-
- https://github.com/orhun/git-cliff — git-cliff (commit-message-driven generator)
|
|
13
|
-
- https://github.com/googleapis/release-please — release-please (Conventional-Commits release automation)
|
|
14
|
-
- https://www.conventionalcommits.org/en/v1.0.0/ — Conventional Commits 1.0.0
|
|
15
|
-
status: research-verified
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# CHANGELOG.md — what shipped, organized for humans
|
|
19
|
-
|
|
20
|
-
> **A changelog is for humans, not machines.** That single line, from [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), is the load-bearing principle. An auto-generated dump of commit messages is *not* a changelog — it's a commit log with a different filename.
|
|
21
|
-
|
|
22
|
-
This pattern delivers **Promise 1 (less-wasteful)** by giving the agent a single canonical "what shipped, when" surface, and **Promise 5 (continuously-learning)** by giving the team a release ritual that captures intent, not just diffs.
|
|
23
|
-
|
|
24
|
-
## The Keep-a-Changelog convention (canonical)
|
|
25
|
-
|
|
26
|
-
[Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) is the de facto industry standard. It defines:
|
|
27
|
-
|
|
28
|
-
### Six change categories — pick from these, do not invent new ones
|
|
29
|
-
|
|
30
|
-
| Category | Meaning |
|
|
31
|
-
|---|---|
|
|
32
|
-
| **Added** | New features |
|
|
33
|
-
| **Changed** | Changes in existing functionality |
|
|
34
|
-
| **Deprecated** | Soon-to-be-removed features (still works for now) |
|
|
35
|
-
| **Removed** | Now-removed features |
|
|
36
|
-
| **Fixed** | Bug fixes |
|
|
37
|
-
| **Security** | Vulnerabilities patched (cite CVE if applicable) |
|
|
38
|
-
|
|
39
|
-
### The "Unreleased" section pattern
|
|
40
|
-
|
|
41
|
-
The top of every active CHANGELOG.md has an `## [Unreleased]` section. Engineers add entries there as they merge PRs. At release time, the `[Unreleased]` heading is renamed to `[X.Y.Z] - YYYY-MM-DD` and a fresh empty `[Unreleased]` is added at the top.
|
|
42
|
-
|
|
43
|
-
This means the changelog is *always* drafting the next release; it never lags behind.
|
|
44
|
-
|
|
45
|
-
### Date format
|
|
46
|
-
|
|
47
|
-
ISO 8601 (`YYYY-MM-DD`). Always. Anything else triggers ambiguity (US vs EU date order).
|
|
48
|
-
|
|
49
|
-
### Newest-on-top ordering
|
|
50
|
-
|
|
51
|
-
Most recent release at the top. The most-recently-shipped change is what the agent (and humans) usually want to know about.
|
|
52
|
-
|
|
53
|
-
## Sample minimal CHANGELOG.md
|
|
54
|
-
|
|
55
|
-
```markdown
|
|
56
|
-
# Changelog
|
|
57
|
-
|
|
58
|
-
All notable changes to this project will be documented in this file.
|
|
59
|
-
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
60
|
-
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
61
|
-
|
|
62
|
-
## [Unreleased]
|
|
63
|
-
|
|
64
|
-
### Added
|
|
65
|
-
- `--strict` flag to validate frontmatter before commit.
|
|
66
|
-
|
|
67
|
-
### Fixed
|
|
68
|
-
- Pointer validator no longer crashes on Windows path separators (#412).
|
|
69
|
-
|
|
70
|
-
## [1.4.0] - 2026-04-19
|
|
71
|
-
|
|
72
|
-
### Added
|
|
73
|
-
- Pre-commit hook scaffold for AGENTS.md freshness checks.
|
|
74
|
-
- Lychee-based broken-link detector wired into CI.
|
|
75
|
-
|
|
76
|
-
### Changed
|
|
77
|
-
- Default ADR template upgraded to MADR 4.0.0.
|
|
78
|
-
|
|
79
|
-
### Deprecated
|
|
80
|
-
- `--legacy-format` flag; will be removed in 2.0.0.
|
|
81
|
-
|
|
82
|
-
## [1.3.1] - 2026-03-22
|
|
83
|
-
|
|
84
|
-
### Fixed
|
|
85
|
-
- Crash on empty `.brain/postmortems/` folder (#388).
|
|
86
|
-
|
|
87
|
-
### Security
|
|
88
|
-
- Bumped `@some/dep` to 4.2.1 to patch CVE-2026-12345.
|
|
89
|
-
|
|
90
|
-
[Unreleased]: https://github.com/acme/repo/compare/v1.4.0...HEAD
|
|
91
|
-
[1.4.0]: https://github.com/acme/repo/compare/v1.3.1...v1.4.0
|
|
92
|
-
[1.3.1]: https://github.com/acme/repo/compare/v1.3.0...v1.3.1
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
The reference links at the bottom let readers click through to the diff. Tools regenerate them automatically.
|
|
96
|
-
|
|
97
|
-
## Relationship to git tags and SemVer
|
|
98
|
-
|
|
99
|
-
[Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) gives the version-number meaning:
|
|
100
|
-
|
|
101
|
-
- **MAJOR** — incompatible API change
|
|
102
|
-
- **MINOR** — backward-compatible new feature
|
|
103
|
-
- **PATCH** — backward-compatible bug fix
|
|
104
|
-
|
|
105
|
-
The CHANGELOG is the **human narrative** that justifies the version bump. The git tag is the **machine pointer** to the commit that release was cut from.
|
|
106
|
-
|
|
107
|
-
Convention: tag is `vX.Y.Z` (with the `v` prefix); changelog heading is `[X.Y.Z]` (without the `v`). The reference link at the bottom of the changelog connects them.
|
|
108
|
-
|
|
109
|
-
The changelog **drives** the version, not the reverse. If `Unreleased` has only `Fixed` entries → next release is PATCH. If it has `Added` → MINOR. If it has `Removed` of a public API → MAJOR.
|
|
110
|
-
|
|
111
|
-
## Tooling — automation that helps vs. automation that hurts
|
|
112
|
-
|
|
113
|
-
### Tools that help
|
|
114
|
-
|
|
115
|
-
| Tool | Approach | Best for |
|
|
116
|
-
|---|---|---|
|
|
117
|
-
| **[changesets](https://github.com/changesets/changesets)** | Each PR adds a `.changeset/*.md` describing the change + intended bump; CI aggregates at release time | Monorepos (especially `pnpm` workspaces); strong fit for libraries |
|
|
118
|
-
| **[release-please](https://github.com/googleapis/release-please)** | Reads Conventional Commits, opens release PRs that update CHANGELOG and bump version | Repos already on Conventional Commits; lightweight to adopt |
|
|
119
|
-
| **[git-cliff](https://github.com/orhun/git-cliff)** | Highly configurable Conventional-Commits → CHANGELOG generator | Teams that want full templating control |
|
|
120
|
-
|
|
121
|
-
All three preserve the **categorical narrative** — they classify changes into Added/Changed/Fixed/etc. via commit-prefix conventions, not just paste commit messages.
|
|
122
|
-
|
|
123
|
-
### The auto-generated-commits anti-pattern
|
|
124
|
-
|
|
125
|
-
```markdown
|
|
126
|
-
## v1.4.0
|
|
127
|
-
|
|
128
|
-
- Merge pull request #412 from feat/hooks
|
|
129
|
-
- Update README.md
|
|
130
|
-
- chore(deps): bump foo from 1.0 to 1.1
|
|
131
|
-
- fix lint
|
|
132
|
-
- wip
|
|
133
|
-
- address review
|
|
134
|
-
- Merge pull request #418 from fix/edge
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
This is **not a changelog**. It is a low-signal commit dump with no narrative. The agent (and humans) get nothing actionable from it.
|
|
138
|
-
|
|
139
|
-
If you can't justify the cost of writing categorized entries, **do not auto-generate this**. Instead: link to GitHub Releases or `git log --oneline` from a brief CHANGELOG note. At least that's honest about what it is.
|
|
140
|
-
|
|
141
|
-
## How AGENTS.md links the changelog
|
|
142
|
-
|
|
143
|
-
In the `Where to find things` section:
|
|
144
|
-
|
|
145
|
-
```markdown
|
|
146
|
-
- **Released changes:** `CHANGELOG.md` — what shipped, by version, newest-first
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
In the `Memory primitives` section:
|
|
150
|
-
|
|
151
|
-
```markdown
|
|
152
|
-
- **Before claiming "feature X exists/doesn't exist"**, check `CHANGELOG.md` — features are added, removed, deprecated over time. The current state is the diff of all releases.
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## Audit checks
|
|
156
|
-
|
|
157
|
-
1. **`CHANGELOG.md` exists at repo root.** Not in `.brain/`. Convention is root.
|
|
158
|
-
2. **Header credits Keep a Changelog and SemVer.** A common 2-line preamble; signals the format.
|
|
159
|
-
3. **An `[Unreleased]` section exists at the top.** Without it, the changelog is always lagging.
|
|
160
|
-
4. **Every release entry has an ISO date** (`YYYY-MM-DD`).
|
|
161
|
-
5. **Categories used are from the Keep-a-Changelog set** (Added, Changed, Deprecated, Removed, Fixed, Security). Custom categories like "Misc" or "Other" → flag.
|
|
162
|
-
6. **Latest release date in CHANGELOG matches latest git tag.** Drift = either an untagged release or an unreleased changelog entry.
|
|
163
|
-
7. **Reference-link footnotes resolve** — `[1.4.0]: https://…` URLs are reachable. Lychee catches this; see `../audit-patterns/staleness-tooling.md`.
|
|
164
|
-
|
|
165
|
-
## Common anti-patterns
|
|
166
|
-
|
|
167
|
-
- **No CHANGELOG** — releases are silent; GitHub Releases is the only narrative.
|
|
168
|
-
- **Auto-generated commit dump** — discussed above. Low-signal noise.
|
|
169
|
-
- **CHANGELOG inside `.brain/`** — convention is repo root; tools look there.
|
|
170
|
-
- **Mixed date formats** (`19-04-2026`, `Apr 19 2026`). ISO only.
|
|
171
|
-
- **Invented categories** ("New stuff", "Tweaks") — stick to the canonical six.
|
|
172
|
-
- **No `[Unreleased]` section** — entries get lost between releases.
|
|
173
|
-
- **Skipped versions** (1.3.0 → 1.5.0) — usually a hot-fix branch wasn't backported.
|
|
174
|
-
- **Overlap with ROADMAP** — CHANGELOG is shipped past; ROADMAP is unshipped future. See `plan-roadmap.md`.
|
|
175
|
-
|
|
176
|
-
## Cross-references
|
|
177
|
-
|
|
178
|
-
- Plan / roadmap (forward-looking, not shipped): `plan-roadmap.md`
|
|
179
|
-
- Decision log (decisions, not features): `decisions-log.md`
|
|
180
|
-
- Architecture overview (current state, not history): `architecture-md.md`
|
|
181
|
-
- Self-healing release automation: `../recipes/self-healing-hooks.md`
|
|
182
|
-
- Staleness detection: `../audit-patterns/staleness-tooling.md`
|
|
183
|
-
- AGENTS.md memory primitives section: `../standards/agents-md-spec.md`
|