@adia-ai/adia-ui-forge 0.1.2 → 0.1.3
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 +2 -2
- package/CHANGELOG.md +8 -0
- package/agents/README.md +209 -0
- package/agents/a2ui-engineer.md +57 -0
- package/agents/author.md +56 -0
- package/agents/release-engineer.md +85 -0
- package/agents/repo-steward.md +56 -0
- package/agents/routing-corpus.json +89 -0
- package/agents/spec-architect.md +53 -0
- package/agents/tech-lead.md +57 -0
- package/agents/verifier.md +55 -0
- package/package.json +3 -2
- package/skills/adia-ui-authoring/SKILL.md +2 -2
- package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +1 -1
- package/skills/adia-ui-authoring/references/module-promotion.md +2 -2
- package/skills/adia-ui-gen-review/skill.json +1 -0
- package/skills/adia-ui-ops/CHANGELOG.md +291 -0
- package/skills/adia-ui-ops/SKILL.md +401 -0
- package/skills/adia-ui-ops/references/INDEX.md +158 -0
- package/skills/adia-ui-ops/references/audit-cadence.md +263 -0
- package/skills/adia-ui-ops/references/audit-patterns/archive-link-sweep.md +96 -0
- package/skills/adia-ui-ops/references/audit-patterns/audit-history-ledger.md +162 -0
- package/skills/adia-ui-ops/references/audit-patterns/browser-bundle-node-imports.md +154 -0
- package/skills/adia-ui-ops/references/audit-patterns/changelog-unreleased-bloat.md +75 -0
- package/skills/adia-ui-ops/references/audit-patterns/coverage-gaps.md +187 -0
- package/skills/adia-ui-ops/references/audit-patterns/entry-file-coverage.md +122 -0
- package/skills/adia-ui-ops/references/audit-patterns/format-hygiene.md +217 -0
- package/skills/adia-ui-ops/references/audit-patterns/lockstep-versioning.md +113 -0
- package/skills/adia-ui-ops/references/audit-patterns/memory-fragmentation.md +180 -0
- package/skills/adia-ui-ops/references/audit-patterns/orphan-detection.md +202 -0
- package/skills/adia-ui-ops/references/audit-patterns/pointer-validation.md +180 -0
- package/skills/adia-ui-ops/references/audit-patterns/redundancy-detection.md +210 -0
- package/skills/adia-ui-ops/references/audit-patterns/spec-dating-sweep.md +91 -0
- package/skills/adia-ui-ops/references/audit-patterns/stale-content.md +182 -0
- package/skills/adia-ui-ops/references/audit-patterns/staleness-tooling.md +156 -0
- package/skills/adia-ui-ops/references/audit-patterns/token-waste-detection.md +196 -0
- package/skills/adia-ui-ops/references/deploy-playbooks.md +259 -0
- package/skills/adia-ui-ops/references/doc-types/adr-pattern.md +210 -0
- package/skills/adia-ui-ops/references/doc-types/architecture-md.md +190 -0
- package/skills/adia-ui-ops/references/doc-types/changelog.md +183 -0
- package/skills/adia-ui-ops/references/doc-types/decisions-log.md +146 -0
- package/skills/adia-ui-ops/references/doc-types/plan-roadmap.md +182 -0
- package/skills/adia-ui-ops/references/doc-types/postmortem-pattern.md +206 -0
- package/skills/adia-ui-ops/references/genres/prose-and-writing.md +149 -0
- package/skills/adia-ui-ops/references/guidance/context-budget.md +137 -0
- package/skills/adia-ui-ops/references/guidance/llm-doc-writing.md +116 -0
- package/skills/adia-ui-ops/references/guidance/reliability-dial.md +186 -0
- package/skills/adia-ui-ops/references/recipes/adr-introduction.md +211 -0
- package/skills/adia-ui-ops/references/recipes/audit-existing-repo.md +234 -0
- package/skills/adia-ui-ops/references/recipes/cold-start-harvest.md +263 -0
- package/skills/adia-ui-ops/references/recipes/concurrent-learnings-merge.md +158 -0
- package/skills/adia-ui-ops/references/recipes/continuous-learning-loop.md +169 -0
- package/skills/adia-ui-ops/references/recipes/external-reference-verification.md +158 -0
- package/skills/adia-ui-ops/references/recipes/findings-index-readout.md +126 -0
- package/skills/adia-ui-ops/references/recipes/greenfield-setup.md +252 -0
- package/skills/adia-ui-ops/references/recipes/harvest-repo-brain.md +169 -0
- package/skills/adia-ui-ops/references/recipes/import-repo-brain-harvest.md +153 -0
- package/skills/adia-ui-ops/references/recipes/memory-organization.md +182 -0
- package/skills/adia-ui-ops/references/recipes/recommend-then-validate.md +199 -0
- package/skills/adia-ui-ops/references/recipes/self-healing-hooks.md +366 -0
- package/skills/adia-ui-ops/references/recipes/skill-stewardship-loop.md +113 -0
- package/skills/adia-ui-ops/references/standards/agents-md-spec.md +138 -0
- package/skills/adia-ui-ops/references/standards/claude-md-convention.md +123 -0
- package/skills/adia-ui-ops/references/standards/cross-tool-matrix.md +85 -0
- package/skills/adia-ui-ops/references/standards/readme-conventions.md +232 -0
- package/skills/adia-ui-ops/references/teach-protocol.md +215 -0
- package/skills/adia-ui-ops/scripts/audit-ops-roster.mjs +104 -0
- package/skills/adia-ui-ops/skill.json +65 -0
- package/skills/adia-ui-release/CHANGELOG.md +43 -0
- package/skills/adia-ui-release/SKILL.md +34 -6
- package/skills/adia-ui-release/references/independent-package-release.md +129 -0
- package/skills/adia-ui-release/references/recovery-paths.md +49 -2
- package/skills/adia-ui-release/scripts/dispatch-publish.mjs +68 -5
- package/skills/adia-ui-release/scripts/insert-stub.mjs +5 -3
- package/skills/adia-ui-release/scripts/make-ledger.mjs +22 -1
- package/skills/adia-ui-release/scripts/package-paths.mjs +44 -0
- package/skills/adia-ui-release/scripts/promote-unreleased.mjs +3 -2
- package/skills/adia-ui-release/scripts/release-pack.mjs +36 -7
- package/skills/adia-ui-release/scripts/tag-lockstep.mjs +10 -2
- package/skills/adia-ui-release/skill.json +9 -7
- package/skills/dogfood-sweep/CHANGELOG.md +37 -0
- package/skills/dogfood-sweep/README.md +105 -0
- package/skills/dogfood-sweep/SKILL.md +1000 -0
- package/skills/dogfood-sweep/analyze.mjs +600 -0
- package/skills/dogfood-sweep/skill.json +31 -0
|
@@ -0,0 +1,183 @@
|
|
|
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`
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-04-27
|
|
3
|
+
coverage: canonical
|
|
4
|
+
peers:
|
|
5
|
+
- adr-pattern.md
|
|
6
|
+
- architecture-md.md
|
|
7
|
+
- plan-roadmap.md
|
|
8
|
+
primary_sources:
|
|
9
|
+
- https://learn.microsoft.com/en-us/azure/well-architected/architect-role/architecture-decision-record — Microsoft Azure Well-Architected Framework on ADR / decision log
|
|
10
|
+
- https://docs.aws.amazon.com/prescriptive-guidance/latest/architectural-decision-records/welcome.html — AWS Prescriptive Guidance, "ADRs"
|
|
11
|
+
- https://adr.github.io — ADR organization (canonical hub)
|
|
12
|
+
- https://github.com/joelparkerhenderson/architecture-decision-record — Joel Parker Henderson catalog (most-cited examples library)
|
|
13
|
+
- https://github.com/npryce/adr-tools — adr-tools, including `adr generate toc`
|
|
14
|
+
- https://github.com/adr/adr-log — adr-log Markdown index generator
|
|
15
|
+
status: research-verified
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Decision log — what it actually is
|
|
19
|
+
|
|
20
|
+
> **The canonical "decision log" is the index of all ADRs in `.brain/adrs/`. It is *not* a separate folder.** This is the load-bearing nuance most teams get wrong.
|
|
21
|
+
|
|
22
|
+
## The canonical meaning (cite-able)
|
|
23
|
+
|
|
24
|
+
Microsoft Azure Well-Architected Framework, AWS Prescriptive Guidance, and adr.github.io all converge on the same definition:
|
|
25
|
+
|
|
26
|
+
> "An Architectural Decision Record (ADR) captures a single AD and its rationale; **the collection of ADRs constitutes the decision log.**"
|
|
27
|
+
> — Microsoft Azure WAF, *Architecture decision record*
|
|
28
|
+
|
|
29
|
+
> "A collection of ADRs creates a decision log that captures the architectural decisions for a project."
|
|
30
|
+
> — AWS Prescriptive Guidance, *Architectural decision records*
|
|
31
|
+
|
|
32
|
+
So when a repo has `.brain/adrs/0001-…md` … `0042-…md` and a `.brain/adrs/README.md` listing them, **that is the decision log**. There is no second folder needed.
|
|
33
|
+
|
|
34
|
+
This skill delivers **Promise 5 (continuously-learning)** by ensuring the decision log is *navigable* — an ADR folder without an index is a scrapyard.
|
|
35
|
+
|
|
36
|
+
## The two shapes the audit detects
|
|
37
|
+
|
|
38
|
+
The repo-fixer audit must accept both shapes and not flag either as wrong. Just note which one is in play.
|
|
39
|
+
|
|
40
|
+
| Shape | What's on disk | When appropriate |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| **Canonical (single-folder)** | `.brain/adrs/` containing all decisions; `.brain/adrs/README.md` is the log index | Default. Fits 90% of teams. |
|
|
43
|
+
| **Split (two-folder)** | `.brain/adrs/` for big architecture decisions; `.brain/decisions/` for lighter day-to-day picks (tooling swaps, library choices, formatting conventions) | Larger orgs where ADR review is heavyweight and would gate routine choices |
|
|
44
|
+
|
|
45
|
+
The split is **a team convention, not industry standard**. Some teams find it useful: ADRs gate architecture, `.brain/decisions/` lets engineers move on a tooling swap without scheduling an architecture review. Other teams find it confusing — two homes invites drift over which decision goes where.
|
|
46
|
+
|
|
47
|
+
The audit's recommendation order:
|
|
48
|
+
|
|
49
|
+
1. If only `.brain/adrs/` exists → recommend keeping it canonical; ensure `README.md` index is present and current.
|
|
50
|
+
2. If only `.brain/decisions/` exists → recommend renaming to `.brain/adrs/` for tool/community alignment (ADR tooling expects `.brain/adrs/`).
|
|
51
|
+
3. If both exist → recommend documenting the split rule in `AGENTS.md`'s "Where to find things" section so the agent knows which folder to write to.
|
|
52
|
+
|
|
53
|
+
## Generating the index
|
|
54
|
+
|
|
55
|
+
Three options, ordered by maintenance burden (lowest first):
|
|
56
|
+
|
|
57
|
+
### Option 1 — `adr-log` (auto-generate)
|
|
58
|
+
|
|
59
|
+
[`adr-log`](https://github.com/adr/adr-log) reads a folder of ADRs and writes a Markdown table of contents into a delimited region of `README.md`:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm i -g adr-log
|
|
63
|
+
adr-log -d .brain/adrs -i .brain/adrs/README.md
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Wrap the index in begin/end markers so subsequent runs only update that region:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
# Architecture Decision Records
|
|
70
|
+
|
|
71
|
+
<!-- adrlog -->
|
|
72
|
+
- [ADR-0001](0001-record-architecture-decisions.md) — Record architecture decisions
|
|
73
|
+
- [ADR-0002](0002-use-postgres-not-mysql.md) — Use Postgres, not MySQL
|
|
74
|
+
<!-- adrlogstop -->
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Add to a pre-commit hook or CI workflow so the index never drifts from filenames. See `../recipes/self-healing-hooks.md`.
|
|
78
|
+
|
|
79
|
+
### Option 2 — `adr-tools generate toc`
|
|
80
|
+
|
|
81
|
+
[`adr-tools`](https://github.com/npryce/adr-tools) ships a similar generator. Lightly maintained as of April 2026 — works, but no recent releases.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
adr generate toc > .brain/adrs/README.md
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Option 3 — Hand-written index
|
|
88
|
+
|
|
89
|
+
For small repos (<20 ADRs) the index is one line per ADR. Maintain by hand:
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
# Architecture Decision Records
|
|
93
|
+
|
|
94
|
+
| # | Title | Status | Date |
|
|
95
|
+
|---|---|---|---|
|
|
96
|
+
| [0001](0001-record-architecture-decisions.md) | Record architecture decisions | Accepted | 2024-01-12 |
|
|
97
|
+
| [0002](0002-use-postgres-not-mysql.md) | Use Postgres, not MySQL | Accepted | 2024-03-04 |
|
|
98
|
+
| [0003](0003-rest-not-graphql.md) | REST, not GraphQL | Superseded by 0017 | 2024-03-19 |
|
|
99
|
+
| [0017](0017-graphql-for-public-api.md) | GraphQL for public API | Accepted | 2025-11-08 |
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The hand-written form **adds the Status column**, which the auto-generated forms typically omit. Worth it for a navigable log.
|
|
103
|
+
|
|
104
|
+
## How AGENTS.md links the decision log
|
|
105
|
+
|
|
106
|
+
In the `Where to find things` section:
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
- **Architecture Decision Records:** `.brain/adrs/` — see `.brain/adrs/README.md` for the indexed log; newest-first
|
|
110
|
+
- **Lightweight decisions** (if your team uses the split): `.brain/decisions/`
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
In the `Memory primitives` section:
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
- **Before making architectural decisions**, consult the decision log at `.brain/adrs/README.md`. If your proposed change conflicts with an `Accepted` ADR, write a new ADR superseding it; don't silently override.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Audit checks for the decision log
|
|
120
|
+
|
|
121
|
+
1. **`.brain/adrs/` exists** (or `.brain/architecture/decisions/` — accepted alias).
|
|
122
|
+
2. **An index file exists** at `.brain/adrs/README.md` listing all ADRs.
|
|
123
|
+
3. **The index is current** — every `NNNN-*.md` filename in the folder appears in the index. No orphans, no broken links.
|
|
124
|
+
4. **The index sort order is meaningful** (chronological or by status group, not random).
|
|
125
|
+
5. **AGENTS.md points at the index file**, not just the folder. Folder-only pointers force the agent to `ls` and guess.
|
|
126
|
+
6. **If `.brain/decisions/` also exists**, AGENTS.md documents the split rule.
|
|
127
|
+
|
|
128
|
+
The "index is current" check is the high-value one — it catches drift after a teammate adds an ADR but forgets to update the index.
|
|
129
|
+
|
|
130
|
+
## Common anti-patterns
|
|
131
|
+
|
|
132
|
+
- **No index** — folder of 40 ADRs, no `README.md`. The decision log exists but isn't navigable.
|
|
133
|
+
- **Stale index** — index lists 18 ADRs; folder has 26. Catch with the audit + auto-generation.
|
|
134
|
+
- **Two parallel logs that drift** — `.brain/adrs/` and `.brain/decisions/` both have ADRs about Postgres. Pick a rule and document it.
|
|
135
|
+
- **Decision log as a single Markdown file** — `.brain/decisions.md` with all decisions in one document. Editing one decision rewrites file history; no per-decision audit trail. Strongly recommended against.
|
|
136
|
+
- **Folder named `.brain/architecture-decisions/`** — works, but `.brain/adrs/` is what tooling expects. Prefer `.brain/adrs/`.
|
|
137
|
+
- **Numbering reset on folder split** — if you split into `.brain/adrs/` and `.brain/decisions/`, do NOT restart numbering at 0001 in the second folder. Keep the global sequence so cross-references work.
|
|
138
|
+
|
|
139
|
+
## Cross-references
|
|
140
|
+
|
|
141
|
+
- ADR pattern (canonical): `adr-pattern.md`
|
|
142
|
+
- Architecture overview (current state, not decisions): `architecture-md.md`
|
|
143
|
+
- Plan / roadmap (forward-looking, not decisions): `plan-roadmap.md`
|
|
144
|
+
- Self-healing index generation: `../recipes/self-healing-hooks.md`
|
|
145
|
+
- Memory organization: `../recipes/memory-organization.md`
|
|
146
|
+
- AGENTS.md memory primitives section: `../standards/agents-md-spec.md`
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-04-27
|
|
3
|
+
coverage: canonical
|
|
4
|
+
peers:
|
|
5
|
+
- decisions-log.md
|
|
6
|
+
- changelog.md
|
|
7
|
+
- architecture-md.md
|
|
8
|
+
primary_sources:
|
|
9
|
+
- https://keepachangelog.com/en/1.1.0/ — Keep a Changelog 1.1.0 (date-stamp convention)
|
|
10
|
+
- https://linear.app/docs/markdown-export — Linear Markdown export (issues / projects)
|
|
11
|
+
- https://help.shortcut.com/hc/en-us/articles/360057451511 — Shortcut Markdown / API export
|
|
12
|
+
- https://docs.basecamp.com/article/29-export-your-account — Basecamp project export
|
|
13
|
+
- https://docs.github.com/en/issues/planning-and-tracking-with-projects — GitHub Projects (issue-tracker plan source)
|
|
14
|
+
- https://www.atlassian.com/agile/project-management/program-roadmaps — Atlassian on roadmaps vs plans
|
|
15
|
+
status: research-verified
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# PLAN.md and ROADMAP.md — active work vs forward-looking
|
|
19
|
+
|
|
20
|
+
> **PLAN.md is *now* — what's in flight this week or sprint. ROADMAP.md is *next* — what's coming this quarter or year.** They are two different documents with different update cadences and different audiences. Conflating them is the most common failure mode.
|
|
21
|
+
|
|
22
|
+
This pattern delivers **Promise 1 (less-wasteful)** and **Promise 3 (less-prone-to-staleness)**: when the boundary between active and forward-looking is clear, neither doc rots into a TODO graveyard.
|
|
23
|
+
|
|
24
|
+
## The split
|
|
25
|
+
|
|
26
|
+
| | `.brain/PLAN.md` | `.brain/ROADMAP.md` |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| **Horizon** | This week / sprint / current iteration | This quarter / half / year |
|
|
29
|
+
| **Granularity** | Specific tasks, owners, due dates | Themes, milestones, target months |
|
|
30
|
+
| **Cadence** | Updated weekly or per-sprint | Updated quarterly |
|
|
31
|
+
| **Audience** | The team doing the work; LLM agents picking up tasks | Stakeholders, leadership, contributors deciding whether to invest |
|
|
32
|
+
| **Status verbs** | "in progress", "blocked", "in review", "done" | "planned", "in progress", "shipped", "deferred" |
|
|
33
|
+
| **Source of truth** | Often a mirror/export of the issue tracker | Hand-maintained by leads/PMs |
|
|
34
|
+
|
|
35
|
+
If a team has only one of the two, **`PLAN.md` is the higher-value one for LLM agents** — the agent needs to know what to pick up, not what's coming in Q3. Skip `ROADMAP.md` until there is one to publish.
|
|
36
|
+
|
|
37
|
+
## PLAN.md — shape and conventions
|
|
38
|
+
|
|
39
|
+
### Minimal template
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
---
|
|
43
|
+
updated: 2026-04-27
|
|
44
|
+
horizon: 2026-W17 (Apr 21 – Apr 27)
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
# Plan — Week of 2026-04-21
|
|
48
|
+
|
|
49
|
+
## In progress
|
|
50
|
+
|
|
51
|
+
- **[#412] Migrate auth to Auth.js v5** — @alice — due 2026-04-28
|
|
52
|
+
- **[#418] Replace Redis with Postgres LISTEN/NOTIFY** — @bob — due 2026-05-02
|
|
53
|
+
- Blocked on ADR-0042 review
|
|
54
|
+
|
|
55
|
+
## Up next (this week)
|
|
56
|
+
|
|
57
|
+
- [#421] Cron worker → BullMQ — unassigned
|
|
58
|
+
- [#423] Strip dead `lib/legacy/` — @carol
|
|
59
|
+
|
|
60
|
+
## Done this week
|
|
61
|
+
|
|
62
|
+
- [x] [#405] Bump TypeScript 5.7 → 5.8 (@alice, merged 2026-04-23)
|
|
63
|
+
- [x] [#408] Drop Node 20 from CI matrix (@bob, merged 2026-04-25)
|
|
64
|
+
|
|
65
|
+
## Archive
|
|
66
|
+
|
|
67
|
+
See `.brain/archive/plan-2026-W16.md`.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Conventions
|
|
71
|
+
|
|
72
|
+
- **Date the doc**: Keep-a-Changelog-style `updated: YYYY-MM-DD` in YAML frontmatter, plus an English `Week of …` line in the H1. Without a date stamp the agent can't tell whether the plan is current. ([keepachangelog.com](https://keepachangelog.com/en/1.1.0/) date-stamp convention.)
|
|
73
|
+
- **Issue numbers**: link to the tracker so the plan is a *view*, not a parallel source of truth.
|
|
74
|
+
- **Owners**: an unowned item drifts. If no one will own it this week, push it to the roadmap.
|
|
75
|
+
- **Due dates**: explicit ISO dates beat "next week" — relative dates rot.
|
|
76
|
+
- **Archive completed work weekly**: copy the "Done" section to `.brain/archive/plan-YYYY-Www.md` and clear it from `PLAN.md`. The archive is a free changelog.
|
|
77
|
+
|
|
78
|
+
### The TODO-graveyard anti-pattern
|
|
79
|
+
|
|
80
|
+
The most common failure: items accumulate, nothing leaves. After a year `PLAN.md` is 800 lines, half of it is "Up next" from 8 months ago, the agent doesn't know which items are real.
|
|
81
|
+
|
|
82
|
+
Mitigations:
|
|
83
|
+
|
|
84
|
+
1. **Time-box "Up next"** to the current iteration. Items that don't make it move to `ROADMAP.md` or get closed.
|
|
85
|
+
2. **Archive on a fixed cadence** (every Friday, end-of-sprint).
|
|
86
|
+
3. **Run a staleness audit**: any line item with a due date >30 days in the past, or unedited for >60 days, is flagged. See `../audit-patterns/staleness-tooling.md`.
|
|
87
|
+
|
|
88
|
+
## ROADMAP.md — shape and conventions
|
|
89
|
+
|
|
90
|
+
### Minimal template
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
---
|
|
94
|
+
updated: 2026-04-15
|
|
95
|
+
horizon: 2026-Q2 / Q3
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
# Roadmap
|
|
99
|
+
|
|
100
|
+
## Now (Q2 2026)
|
|
101
|
+
|
|
102
|
+
- **Multi-tenant scoping** — required for enterprise GA. Owner: @alice. Target: 2026-05.
|
|
103
|
+
- **Webhook delivery v2** — exponential backoff, replay tooling. Owner: @bob. Target: 2026-06.
|
|
104
|
+
|
|
105
|
+
## Next (Q3 2026)
|
|
106
|
+
|
|
107
|
+
- **Self-serve billing portal** — Stripe Customer Portal integration.
|
|
108
|
+
- **OpenTelemetry instrumentation** — replace ad-hoc logging.
|
|
109
|
+
|
|
110
|
+
## Later (2026-H2 and beyond)
|
|
111
|
+
|
|
112
|
+
- Federated SSO
|
|
113
|
+
- Audit-log export to customer S3
|
|
114
|
+
|
|
115
|
+
## Recently shipped
|
|
116
|
+
|
|
117
|
+
- 2026-Q1 — SAML SSO (Enterprise tier)
|
|
118
|
+
- 2025-Q4 — Async webhook delivery v1
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Conventions
|
|
122
|
+
|
|
123
|
+
- **Now / Next / Later** is the standard public-roadmap shape ([ProductPlan](https://www.productplan.com/learn/now-next-later-roadmap/) popularized this; widely adopted). Keeps things vague enough to ship.
|
|
124
|
+
- **No daily-task granularity.** If an item belongs in a sprint, it belongs in `PLAN.md`.
|
|
125
|
+
- **Recently shipped** doubles as a release-notes pointer — link to `CHANGELOG.md`.
|
|
126
|
+
- **Quarterly review** ritual: at end of quarter, move "Now" → "Recently shipped", promote "Next" → "Now", review "Later".
|
|
127
|
+
|
|
128
|
+
## Issue-tracker exports — when the plan IS the export
|
|
129
|
+
|
|
130
|
+
Many teams treat the issue tracker as truth and `PLAN.md` as a generated view. This works well — and the agent gets a Markdown view it can read without API access.
|
|
131
|
+
|
|
132
|
+
| Tool | Export mechanism | Notes |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| **Linear** | [Markdown export](https://linear.app/docs/markdown-export) per issue or project; API for bulk | Project view exports clean Markdown with status grouping |
|
|
135
|
+
| **Shortcut (formerly Clubhouse)** | [API + Markdown rendering in CLI](https://help.shortcut.com/hc/en-us/articles/360057451511) | Iteration views map to weekly plans |
|
|
136
|
+
| **GitHub Projects** | [GraphQL API](https://docs.github.com/en/graphql/reference/objects#projectv2); community scripts dump views to Markdown | Native to GitHub — no separate auth |
|
|
137
|
+
| **Jira** | REST API; `jira-cli`, `gojira` | Heavier setup; usually only worth it for Jira-mandated orgs |
|
|
138
|
+
| **Basecamp** | [Account export](https://docs.basecamp.com/article/29-export-your-account) | Coarser; better for archive than weekly plan |
|
|
139
|
+
|
|
140
|
+
The pattern: a CI job (or pre-commit hook) regenerates `.brain/PLAN.md` from the tracker on a cron schedule, commits the diff. Now the agent reads a current plan without an API token.
|
|
141
|
+
|
|
142
|
+
## How AGENTS.md links them
|
|
143
|
+
|
|
144
|
+
In the `Where to find things` section:
|
|
145
|
+
|
|
146
|
+
```markdown
|
|
147
|
+
- **Active plan:** `.brain/PLAN.md` — what's in flight this week
|
|
148
|
+
- **Roadmap:** `.brain/ROADMAP.md` — quarterly horizon
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
In the `Memory primitives` section:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
- **When picking up work**, start at `.brain/PLAN.md`. Items there are scoped for the current iteration.
|
|
155
|
+
- **For longer-horizon questions** ("are we going to support X?"), check `.brain/ROADMAP.md` before proposing new work.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Audit checks
|
|
159
|
+
|
|
160
|
+
1. **Date stamps present** — `updated:` frontmatter or visible date in H1. A `PLAN.md` without a date is unverifiable.
|
|
161
|
+
2. **PLAN.md updated within the last 14 days** (sprint cadence). Older = staleness flag.
|
|
162
|
+
3. **ROADMAP.md updated within the last 90 days** (quarterly cadence). Older = staleness flag.
|
|
163
|
+
4. **No items in PLAN.md with due dates >30 days past** (TODO graveyard).
|
|
164
|
+
5. **`.brain/PLAN.md` and `.brain/ROADMAP.md` are referenced from AGENTS.md.**
|
|
165
|
+
6. **Archive folder exists** if the team is using weekly archival (`.brain/archive/plan-YYYY-Www.md`).
|
|
166
|
+
|
|
167
|
+
## Common anti-patterns
|
|
168
|
+
|
|
169
|
+
- **One file called `TODO.md`** at repo root, mixing this-week and someday. Split it into PLAN.md + ROADMAP.md or kill it.
|
|
170
|
+
- **No date on either doc** — agent can't tell if the plan is from last sprint or last year.
|
|
171
|
+
- **PLAN.md as immortal backlog** — items added, never removed. Time-box and archive.
|
|
172
|
+
- **ROADMAP.md with weekly-task granularity** — wrong horizon. Push detail to PLAN.md.
|
|
173
|
+
- **PLAN.md and the issue tracker disagree** — pick one as truth (usually the tracker) and generate the other.
|
|
174
|
+
- **Roadmap contains commitments without owners or target months** — it's a wishlist, not a roadmap.
|
|
175
|
+
|
|
176
|
+
## Cross-references
|
|
177
|
+
|
|
178
|
+
- Decision log (decisions, not plans): `decisions-log.md`
|
|
179
|
+
- Changelog (shipped, not planned): `changelog.md`
|
|
180
|
+
- Self-healing PLAN.md regeneration: `../recipes/self-healing-hooks.md`
|
|
181
|
+
- Staleness detection: `../audit-patterns/staleness-tooling.md`
|
|
182
|
+
- AGENTS.md "Where to find things" section: `../standards/agents-md-spec.md`
|