@evolvehq/docflow 0.9.2 → 0.9.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/README.md +48 -15
- package/USAGE.md +27 -1
- package/docs/preview.png +0 -0
- package/package.json +1 -1
- package/plugins/docflow/skills/audit/SKILL.md +5 -2
- package/plugins/docflow/skills/bootstrap/SKILL.md +66 -7
- package/plugins/docflow/skills/bootstrap/templates/CONVENTIONS.md +24 -0
- package/plugins/docflow/skills/bootstrap/templates/adr-0001-seed.md +81 -0
- package/plugins/docflow/skills/new-adr/SKILL.md +3 -1
- package/plugins/docflow/skills/new-plan/SKILL.md +2 -1
- package/plugins/docflow/skills/ship-item/SKILL.md +6 -1
package/README.md
CHANGED
|
@@ -39,23 +39,41 @@ and point you at `/bootstrap`.
|
|
|
39
39
|
|
|
40
40
|
## What `/bootstrap` installs
|
|
41
41
|
|
|
42
|
+
Only the **core** is always written; everything else is an **opt-in layer**
|
|
43
|
+
chosen during the assessment, so a minimal repo stays as light as a classic
|
|
44
|
+
ADR catalogue.
|
|
45
|
+
|
|
46
|
+
**Core (always):**
|
|
42
47
|
- `AGENTS.md` — hard rules for coding agents (the entry point).
|
|
43
|
-
- `CLAUDE.md` — one-liner re-exporting `AGENTS.md` so Claude Code picks
|
|
44
|
-
|
|
45
|
-
- `CONVENTIONS.md` — authoring rules for ADRs, naming, status
|
|
46
|
-
|
|
48
|
+
- `CLAUDE.md` — one-liner re-exporting `AGENTS.md` so Claude Code picks it
|
|
49
|
+
up automatically.
|
|
50
|
+
- `CONVENTIONS.md` — authoring rules for ADRs, naming, status lifecycle,
|
|
51
|
+
audit trail, and git contract.
|
|
47
52
|
- `INDEX.md` — generated table of all ADRs.
|
|
48
|
-
- `adr
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
- `adr/0000-template.md` — the ADR template; the catalogue starts here.
|
|
54
|
+
|
|
55
|
+
**Optional layers (opt-in):**
|
|
56
|
+
- `plan/todo/` + `plan/done/` — the implementation queue (Q4a). `git mv`
|
|
57
|
+
from `todo/` to `done/` is the completion event.
|
|
58
|
+
- `_agent/` — coordination (`ROLES`, `LOCKS`, `WORKLOG`, `CURRENT_FOCUS`,
|
|
59
|
+
`HANDOFF`, optional `prompts/`). **Q5 — choose *None* to omit it.**
|
|
60
|
+
- `GLOSSARY.md`, `domains/<slug>/README.md` groupings, the technology-ADR
|
|
61
|
+
template, and project-specific hard rules (vendor-naming, regulated
|
|
62
|
+
evidence, language mandate, audit-stream separation) — Q7/Q10.
|
|
63
|
+
|
|
64
|
+
Omitting any optional layer leaves a valid repo; a lifecycle skill that
|
|
65
|
+
needs an absent layer refuses cleanly and says what's missing.
|
|
66
|
+
|
|
67
|
+
**Placement:** `AGENTS.md` and `CLAUDE.md` always stay at the repository
|
|
68
|
+
root; everything else lives under a configurable **artefact root** —
|
|
69
|
+
`docs/` (the default), the repo root, or `.docflow/` — chosen at bootstrap
|
|
70
|
+
and recorded in `CONVENTIONS.md`.
|
|
71
|
+
|
|
72
|
+
**Seed ADR:** by default, bootstrap also writes **`adr/0001`** — a first
|
|
73
|
+
ADR recording the decision to adopt this method (self-documenting, like the
|
|
74
|
+
classic "use ADRs" convention). It references `CONVENTIONS.md` for the rules
|
|
75
|
+
and is created `Implemented`. Decline it at sign-off if you want only the
|
|
76
|
+
template.
|
|
59
77
|
|
|
60
78
|
## Why
|
|
61
79
|
|
|
@@ -87,6 +105,18 @@ repo boundary; consistency is declared at the edges and enforced by audit. See t
|
|
|
87
105
|
[methodology](https://evolvehq.github.io/docflow/methodology/#5-scaling-to-many-repositories)
|
|
88
106
|
for the full model.
|
|
89
107
|
|
|
108
|
+
## No drafts in the catalogue
|
|
109
|
+
|
|
110
|
+
docflow records **outcomes, not work-in-progress**. There is **no `Draft`
|
|
111
|
+
status** and **no `brainstorming/` folder** — an ADR's first persisted
|
|
112
|
+
status is `Proposed`, created only once a decision is approved. The
|
|
113
|
+
`brainstorm` skill explores candidates **in conversation and writes
|
|
114
|
+
nothing** until you approve them; only then does `new-adr` mint a numbered
|
|
115
|
+
ADR. This keeps the catalogue free of half-formed drafts and the numbering
|
|
116
|
+
clean — numbers go only to real decisions — following the lightweight-ADR
|
|
117
|
+
tradition that an ADR captures the agreed decision, not the discussion that
|
|
118
|
+
produced it.
|
|
119
|
+
|
|
90
120
|
## Install
|
|
91
121
|
|
|
92
122
|
docflow ships from **one skill source** (`plugins/docflow/skills/`) to
|
|
@@ -173,6 +203,9 @@ OpenCode has no marketplace command for `SKILL.md` skills (its plugin
|
|
|
173
203
|
system is for npm JS plugins), so a shared skills directory is the clean
|
|
174
204
|
path. Skills auto-load by description.
|
|
175
205
|
|
|
206
|
+
**OpenCode-compatible forks** — e.g. Xiaomi's *mimocode* — inherit this
|
|
207
|
+
support via the same skill-discovery path; no separate packaging.
|
|
208
|
+
|
|
176
209
|
### Claude Code — local development (no install)
|
|
177
210
|
|
|
178
211
|
```
|
package/USAGE.md
CHANGED
|
@@ -165,6 +165,7 @@ After sign-off, the skill writes:
|
|
|
165
165
|
| `CLAUDE.md` | `templates/CLAUDE.md` | Single line `@AGENTS.md`. |
|
|
166
166
|
| `adr/0000-template.md` | `templates/adr-capability.md` | Capability-ADR template. |
|
|
167
167
|
| `adr/NNNN-template.md` | `templates/adr-technology.md` | Technology-ADR template. Only if Q2 said split. `NNNN` is the project-defined cutoff (default 0100). |
|
|
168
|
+
| `adr/0001-record-architecture-decisions.md` | `templates/adr-0001-seed.md` | **Seed ADR** recording the decision to adopt the method (`Implemented`, references `CONVENTIONS.md`). Default on; declined at sign-off if not wanted. |
|
|
168
169
|
| `plan/README.md` | `templates/plan-README.md` | Plus empty `plan/todo/.gitkeep` and `plan/done/.gitkeep`. |
|
|
169
170
|
| `_agent/ROLES.md` | `templates/_agent-ROLES.md` | Single `default-agent` by default. |
|
|
170
171
|
| `_agent/LOCKS.md` | `templates/_agent-LOCKS.md` | Empty header. Created only if Q5 enabled LOCKS discipline. |
|
|
@@ -174,7 +175,7 @@ After sign-off, the skill writes:
|
|
|
174
175
|
| `_agent/IN_FLIGHT.md` | `templates/_agent-IN_FLIGHT.md` | Only in Q5 mode 3 (worktree). Committed cross-worktree dashboard. |
|
|
175
176
|
| `.gitattributes` (entry) | (none — inline) | Only in Q5 mode 3: appends `_agent/WORKLOG.md merge=union`. |
|
|
176
177
|
| `.gitignore` (entry) | (none — inline) | Only in Q5 mode 3: adds `_agent/CURRENT_FOCUS.md` so it stays local-only. |
|
|
177
|
-
| `INDEX.md` | (none — generated) |
|
|
178
|
+
| `INDEX.md` | (none — generated) | Header + the seed ADR's row (empty table only if the seed was declined). |
|
|
178
179
|
| `_agent/prompts/autonomous.md` | `templates/_agent-prompts-autonomous.md` | Only if Q8 confirmed a verify gate. |
|
|
179
180
|
|
|
180
181
|
## 5. After scaffolding
|
|
@@ -345,6 +346,11 @@ scheme:
|
|
|
345
346
|
and `INDEX.md`).
|
|
346
347
|
- **G3 — gate backstop:** the single-threaded merge gate rejects a
|
|
347
348
|
duplicate; the later author renumbers.
|
|
349
|
+
- **G4 — claim before do:** before implementing a queued item, claim it (a
|
|
350
|
+
draft PR referencing it, or an `IN_FLIGHT`/`owner` entry) so two writers
|
|
351
|
+
don't build the same unclaimed `plan/todo` item — G1–G3 protect the
|
|
352
|
+
*number*, G4 protects the *work assignment*; the audit's
|
|
353
|
+
duplicate-plan-ownership check is the backstop.
|
|
348
354
|
|
|
349
355
|
`bootstrap` **pre-wires** these into `CONVENTIONS.md` + an `AGENTS.md`
|
|
350
356
|
hard rule **only** for multi-agent (mode 2/3) or PR-based repos.
|
|
@@ -353,6 +359,26 @@ get none of this ceremony. Numbers are immutable once merged. (For
|
|
|
353
359
|
orchestrated runs, `agent-wave` additionally *reserves* disjoint number
|
|
354
360
|
blocks up front, so G2/G3 rarely fire.)
|
|
355
361
|
|
|
362
|
+
### Numbering at scale, and grouping by domain
|
|
363
|
+
|
|
364
|
+
ADR numbers are **integers**; the four-digit zero-padding is cosmetic and
|
|
365
|
+
sorts **numerically**, so a catalogue is not capped at `9999` — widen the
|
|
366
|
+
padding to five digits if you ever approach it (no real catalogue does).
|
|
367
|
+
|
|
368
|
+
Two alternative identifier schemes are intentionally *not* used (the
|
|
369
|
+
[methodology](https://evolvehq.github.io/docflow/methodology/#46-numbering-at-scale-and-alternatives-considered)
|
|
370
|
+
has the full reasoning): **timestamp / opaque ids** — they trade away
|
|
371
|
+
ordering and readability, and the guardrails above handle collisions
|
|
372
|
+
instead; and **per-domain numbering** like `auth/0001` — the federation
|
|
373
|
+
serves genuinely independent sequences, and within one repo you group
|
|
374
|
+
rather than renumber.
|
|
375
|
+
|
|
376
|
+
**Grouping by domain.** Opt in to `domains/<slug>/README.md` files that
|
|
377
|
+
list the ADRs for each area (e.g. `domains/auth/`, `domains/billing/`). It
|
|
378
|
+
is purely organisational: each ADR keeps its flat number and its `INDEX.md`
|
|
379
|
+
row; the domain README is a curated view, not a namespace. Reach for it
|
|
380
|
+
when a flat catalogue grows large enough to be hard to navigate.
|
|
381
|
+
|
|
356
382
|
## 6. Customising or extending
|
|
357
383
|
|
|
358
384
|
The templates are deliberately small and self-contained. To customise:
|
package/docs/preview.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evolvehq/docflow",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "ADR-driven documentation workflow: scaffold an Architecture Decision Record (ADR) catalogue, a plan/ queue, and AGENTS.md conventions into any repo, then author, queue, ship, audit, and roll up ADRs with lifecycle skills — across one repo or a multi-repo product. Works on Claude Code, Claude Cowork, pi, Codex, and OpenCode.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -14,7 +14,9 @@ This is the enforcement `AGENTS.md` cannot guarantee on its own.
|
|
|
14
14
|
2. Read `CONVENTIONS.md` to learn what to enforce: ADR shape and
|
|
15
15
|
cutoff, status lifecycle, integration model, multi-agent mode,
|
|
16
16
|
language mandate, optional artefacts present (GLOSSARY, domains/),
|
|
17
|
-
and any Q10 domain hard rules
|
|
17
|
+
and any Q10 domain hard rules, and the **artefact root** (default:
|
|
18
|
+
repository root) — resolve `adr/`, `plan/`, `INDEX.md` against it and
|
|
19
|
+
honour it in the cross-reference and INDEX-sync checks.
|
|
18
20
|
3. If a `federation.md` exists, this repo is part of a multi-repo
|
|
19
21
|
product. Note its `Role` (`central` / `home` / `coordinator`
|
|
20
22
|
index-holder, or a plain `member`) and read the recorded identity
|
|
@@ -49,7 +51,8 @@ relevant):
|
|
|
49
51
|
`adr-0042`, `see ADR`, ADR titles — in UI copy, API responses,
|
|
50
52
|
error messages, customer-facing logs, public docs, release notes.
|
|
51
53
|
Report each suspect; this rule is easy to violate by reflex.
|
|
52
|
-
10. **Coordination hygiene.** `_agent
|
|
54
|
+
10. **Coordination hygiene.** N/A if `_agent/` was omitted at bootstrap
|
|
55
|
+
(Q5 = None). Otherwise: `_agent/LOCKS.md` has no stale claims
|
|
53
56
|
(mode 2); `_agent/IN_FLIGHT.md` rows match live worktrees (mode 3).
|
|
54
57
|
11. **Cross-worktree collisions** (mode 3, or when auditing across
|
|
55
58
|
unmerged branches). These catch semantic conflicts that a
|
|
@@ -57,6 +57,20 @@ questions.
|
|
|
57
57
|
federation-index.md # multi-repo only (Q11): member index — home repo only
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
**Placement.** The tree above shows the **root** option. `AGENTS.md` and
|
|
61
|
+
`CLAUDE.md` always sit at the repository root; `adr/`, `plan/`, `_agent/`,
|
|
62
|
+
`INDEX.md`, and `CONVENTIONS.md` go under the **artefact root** chosen in
|
|
63
|
+
Q12 (default `docs/`, e.g. `docs/adr/`, `docs/plan/`).
|
|
64
|
+
|
|
65
|
+
**Core vs optional layers.** Only the **core** is always written:
|
|
66
|
+
`AGENTS.md`, `CLAUDE.md`, `CONVENTIONS.md`, `adr/0000-template.md`, and
|
|
67
|
+
`INDEX.md`. A repo with just these is a valid, lightweight docflow repo — a
|
|
68
|
+
classic ADR catalogue with conventions. Everything else is an **opt-in
|
|
69
|
+
layer**: the `plan/` queue (Q4a), the `_agent/` coordination set (Q5 —
|
|
70
|
+
choose *None* to omit it), `GLOSSARY.md` and `domains/` (Q7). Omitting any
|
|
71
|
+
optional layer is a valid state, not an error; a lifecycle skill that needs
|
|
72
|
+
an absent layer refuses cleanly and names what is missing.
|
|
73
|
+
|
|
60
74
|
For a **multi-repo product** (one product spread across several repos —
|
|
61
75
|
see Q11), two extra files appear: `federation.md`, a small back-pointer
|
|
62
76
|
every member repo carries, and `federation-index.md`, the authoritative
|
|
@@ -122,7 +136,7 @@ A standalone repo has none of them.
|
|
|
122
136
|
doubt, ask whether a non-builder would ever see this string — if
|
|
123
137
|
yes, the ADR reference comes out.
|
|
124
138
|
|
|
125
|
-
## Step 4 — Assessment (10 questions, plus
|
|
139
|
+
## Step 4 — Assessment (10 questions, plus federation (Q11) and placement (Q12))
|
|
126
140
|
|
|
127
141
|
**Ask the questions one at a time, not in a batch.** For each question,
|
|
128
142
|
state a **recommended** option (label it "Recommended") with one short
|
|
@@ -136,7 +150,9 @@ ask in plain text, listing options as A/B/C and naming the recommended
|
|
|
136
150
|
one.
|
|
137
151
|
|
|
138
152
|
After the answers are in, summarise the resulting plan in 5–10
|
|
139
|
-
lines and ask for sign-off before writing any files.
|
|
153
|
+
lines and ask for sign-off before writing any files. Note in the summary
|
|
154
|
+
that a **seed ADR `0001`** recording the adopted method is created by
|
|
155
|
+
default (the operator may decline it — see Step 5 item 5b).
|
|
140
156
|
|
|
141
157
|
1. **Project identity.** Name, one-line description, doc language
|
|
142
158
|
(en-GB / en-US / other), and — if existing repo — what current files
|
|
@@ -173,8 +189,16 @@ lines and ask for sign-off before writing any files.
|
|
|
173
189
|
marks ready, merges. Ask the user for merge strategy
|
|
174
190
|
(squash / merge / rebase — default: squash for clean history,
|
|
175
191
|
rebase if per-commit identity matters).
|
|
176
|
-
5. **
|
|
177
|
-
|
|
192
|
+
5. **Coordination — by number of writers.** Pick by how many people/agents
|
|
193
|
+
*write* to this repo and how they integrate — **writers (integration
|
|
194
|
+
concurrency), not how many agents you run.** A team of several developers
|
|
195
|
+
is multi-writer even with one agent each, and wants the worktree/PR
|
|
196
|
+
shape. This sets the `_agent/` shape (or omits it); switching later is
|
|
197
|
+
not free:
|
|
198
|
+
- **None — omit `_agent/`.** A solo human/agent with no coordination
|
|
199
|
+
need; no `_agent/` directory is written, and lifecycle skills skip the
|
|
200
|
+
WORKLOG/snapshot steps. The lightest footprint (the optional `_agent/`
|
|
201
|
+
layer is left out — see the core-vs-optional note in Step 2).
|
|
178
202
|
- **(Recommended) Single agent.** `default-agent` in ROLES.
|
|
179
203
|
LOCKS skipped. WORKLOG / CURRENT_FOCUS as standard single-file
|
|
180
204
|
snapshots. Right for small projects and the "one human + one
|
|
@@ -259,6 +283,20 @@ lines and ask for sign-off before writing any files.
|
|
|
259
283
|
repo; adding this repo to the member index is a deliberate edit in
|
|
260
284
|
the home repo. A standalone repo (Q11 = No) writes none of these
|
|
261
285
|
files and behaves exactly as a single-repo bootstrap.
|
|
286
|
+
12. **Artefact placement.** Where the non-entry artefacts live — `adr/`,
|
|
287
|
+
`plan/`, `_agent/`, `INDEX.md`, `CONVENTIONS.md`:
|
|
288
|
+
- **(Recommended) `docs/`** — aligns with the common `doc/adr` / `docs/`
|
|
289
|
+
convention; keeps the repo root clean (`docs/adr/`, `docs/plan/`, …).
|
|
290
|
+
- **Repository root** — flat layout; decisions beside the code (good for
|
|
291
|
+
monorepos). This is docflow's own layout.
|
|
292
|
+
- **`.docflow/`** — hidden root; quietest footprint.
|
|
293
|
+
|
|
294
|
+
`AGENTS.md` and `CLAUDE.md` are **always** written to the repository
|
|
295
|
+
root (coding agents discover them there). The chosen root is recorded in
|
|
296
|
+
`CONVENTIONS.md`, and every lifecycle skill resolves `adr/`, `plan/`,
|
|
297
|
+
and `INDEX.md` against it. For an existing repo already laid out
|
|
298
|
+
differently, offer a documented migration (`git mv` into the chosen root
|
|
299
|
+
+ update `CONVENTIONS.md`) — never force it.
|
|
262
300
|
|
|
263
301
|
## Step 4.5 — Cross-check before sign-off
|
|
264
302
|
|
|
@@ -287,6 +325,13 @@ Templates live in this skill's `templates/` directory. Read each
|
|
|
287
325
|
template, fill its placeholders from the assessment answers, then
|
|
288
326
|
write it into the repo.
|
|
289
327
|
|
|
328
|
+
**Placement (Q12):** write `AGENTS.md` and `CLAUDE.md` to the repository
|
|
329
|
+
root; write everything below under the chosen **artefact root** (default
|
|
330
|
+
`docs/`) — e.g. `docs/adr/0000-template.md`, `docs/plan/`, `docs/INDEX.md`.
|
|
331
|
+
Record the chosen root in `CONVENTIONS.md` so every lifecycle skill resolves
|
|
332
|
+
paths against it, and adjust the `adr/`/`plan/` cross-paths in the filled
|
|
333
|
+
`AGENTS.md` (and other templates) to the chosen root (e.g. `docs/adr/`).
|
|
334
|
+
|
|
290
335
|
1. `CONVENTIONS.md` — from `templates/CONVENTIONS.md`. Spec other files
|
|
291
336
|
reference. Include the **§Concurrency Guardrails** section only if Q5
|
|
292
337
|
is mode 2/3 **or** Q4b is PR-based; omit it for single-agent
|
|
@@ -294,16 +339,29 @@ write it into the repo.
|
|
|
294
339
|
(multi-repo)** section only if Q11 = yes; fill `<product>` and state
|
|
295
340
|
the chosen identity scheme. Omit it for standalone repos.
|
|
296
341
|
2. `AGENTS.md` — from `templates/AGENTS.md`. Include the concurrency
|
|
297
|
-
guardrails hard-rule bullet (G2
|
|
342
|
+
guardrails hard-rule bullet (G2–G4) under the same condition as the
|
|
298
343
|
CONVENTIONS section above; omit otherwise.
|
|
299
344
|
3. `CLAUDE.md` — from `templates/CLAUDE.md` (single line `@AGENTS.md`).
|
|
300
345
|
4. `adr/0000-template.md` — from `templates/adr-capability.md`.
|
|
301
346
|
5. `adr/NNNN-template.md` — from `templates/adr-technology.md`, only if
|
|
302
347
|
Q2 said split. `NNNN` is the number where capability ADRs end
|
|
303
348
|
(project-defined, e.g. 0091; default 0100 if unspecified).
|
|
349
|
+
5b. **Seed ADR (default on; opt-out at sign-off).** Write the seed
|
|
350
|
+
`adr/0001-record-architecture-decisions.md` from
|
|
351
|
+
`templates/adr-0001-seed.md`, filled from the assessment answers — it
|
|
352
|
+
records the **decision to adopt** the documentation-led, ADR-driven
|
|
353
|
+
method, status **`Implemented`**, and **references `CONVENTIONS.md`** for
|
|
354
|
+
the rules (it does not duplicate them). Keep it generic — no other
|
|
355
|
+
project's ADR numbers. **Skip only if the operator opted out.** For a
|
|
356
|
+
**split** repo (Q2) use the technology-ADR shape for the seed. If `plan/`
|
|
357
|
+
exists, also write a matching `plan/done/<date>-adopt-adr-method.md` (the
|
|
358
|
+
seed's completion event is this bootstrap), so plan-coverage stays
|
|
359
|
+
satisfied. On a **retrofit/backfill** (Step 6), the seed is `0001`, ahead
|
|
360
|
+
of the reconstructed decisions.
|
|
304
361
|
6. `plan/README.md` — from `templates/plan-README.md`. Create empty
|
|
305
362
|
`plan/todo/.gitkeep` and `plan/done/.gitkeep`.
|
|
306
|
-
7. `_agent/ROLES.md` — from `templates/_agent-ROLES.md`.
|
|
363
|
+
7. `_agent/ROLES.md` — from `templates/_agent-ROLES.md`. **If Q5 = None,
|
|
364
|
+
skip items 7–11 entirely — no `_agent/` directory.** Otherwise: Mode 1
|
|
307
365
|
keeps the `default-agent` block; modes 2 and 3 expand to named
|
|
308
366
|
agents per Q5.
|
|
309
367
|
8. `_agent/LOCKS.md` — from `templates/_agent-LOCKS.md`. **Skip in
|
|
@@ -319,7 +377,8 @@ write it into the repo.
|
|
|
319
377
|
`_agent/IN_FLIGHT.md` from `templates/_agent-IN_FLIGHT.md` as
|
|
320
378
|
the committed cross-worktree dashboard.
|
|
321
379
|
11. `_agent/HANDOFF.md` — from `templates/_agent-HANDOFF.md`.
|
|
322
|
-
12.
|
|
380
|
+
12. `INDEX.md` — header + the seed ADR's row (item 5b); an empty table only
|
|
381
|
+
if the seed was declined.
|
|
323
382
|
13. `_agent/prompts/autonomous.md` — from
|
|
324
383
|
`templates/_agent-prompts-autonomous.md`, **only** if Q8 confirmed a
|
|
325
384
|
verify gate. Keep the integration block matching Q4b: the
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Project name: <name>.
|
|
6
6
|
|
|
7
|
+
Artefact root: `<docs/ | . | .docflow/>` — `adr/`, `plan/`, `INDEX.md`, and
|
|
8
|
+
this file live under this root; `AGENTS.md` and `CLAUDE.md` always stay at
|
|
9
|
+
the repository root. Every lifecycle skill resolves paths against this root.
|
|
10
|
+
|
|
7
11
|
<!-- Q1 language: if a language mandate is set, state it here.
|
|
8
12
|
Example: "Language: en-GB throughout. Use forms such as organisation,
|
|
9
13
|
behaviour, prioritise, catalogue, authorisation consistently across all
|
|
@@ -14,6 +18,14 @@ files." -->
|
|
|
14
18
|
ADR filenames use `NNNN-kebab-case-slug.md`, zero-padded to 4 digits,
|
|
15
19
|
with contiguous numbering and no reserved gaps.
|
|
16
20
|
|
|
21
|
+
The number is an **integer**; the four-digit zero-padding is a display
|
|
22
|
+
convention only — tools sort ADRs **numerically**, not lexically, so the
|
|
23
|
+
catalogue is not capped at `9999` (widen the padding to five digits if you
|
|
24
|
+
ever approach it; none do). Related ADRs may be **grouped** under
|
|
25
|
+
`domains/<slug>/README.md` without changing their numbers — grouping is a
|
|
26
|
+
curated view, not a separate namespace; the contiguous number stays the
|
|
27
|
+
single identity.
|
|
28
|
+
|
|
17
29
|
Each ADR describes one decision. If a decision splits, supersede the
|
|
18
30
|
original ADR and create new ADRs rather than expanding scope inside a
|
|
19
31
|
single document.
|
|
@@ -31,6 +43,11 @@ Status lifecycle: `<from Q3>`.
|
|
|
31
43
|
Terminal states (Superseded / Deprecated) are reachable from any prior
|
|
32
44
|
state.
|
|
33
45
|
|
|
46
|
+
The first **persisted** status is `Proposed` — there is no separate `Draft`
|
|
47
|
+
state and no `brainstorming/`/`drafts/` folder. Work-in-progress lives in
|
|
48
|
+
the brainstorm conversation; only an approved decision is written, as a
|
|
49
|
+
numbered `Proposed` ADR.
|
|
50
|
+
|
|
34
51
|
Cross-references link by relative path to `adr/NNNN-*.md`.
|
|
35
52
|
|
|
36
53
|
## ADR Shapes
|
|
@@ -165,6 +182,13 @@ once merged:
|
|
|
165
182
|
- **G3 — gate backstop.** Integration is single-threaded; it rejects a
|
|
166
183
|
duplicate number as the last line of defence, and the later author
|
|
167
184
|
renumbers.
|
|
185
|
+
- **G4 — claim before do.** Before implementing a queued item, **claim it**
|
|
186
|
+
so two writers don't build the same thing: open a draft PR referencing
|
|
187
|
+
the item (the authoritative claim in PR-based / worktree repos), or record
|
|
188
|
+
an `owner` / `_agent/IN_FLIGHT.md` entry. An unclaimed `plan/todo` item on
|
|
189
|
+
`main` (which G1 deliberately puts there) is otherwise an open invitation
|
|
190
|
+
to duplicate effort. G1–G3 protect the *number*; G4 protects the *work
|
|
191
|
+
assignment*. `/audit`'s duplicate-plan-ownership check is the backstop.
|
|
168
192
|
-->
|
|
169
193
|
|
|
170
194
|
<!-- Federation (multi-repo) — bootstrap INCLUDES this section
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
adr: 0001
|
|
3
|
+
title: Record architecture decisions as ADRs
|
|
4
|
+
status: Implemented
|
|
5
|
+
date: <YYYY-MM-DD>
|
|
6
|
+
owner: <agent-id or human>
|
|
7
|
+
supersedes:
|
|
8
|
+
superseded-by:
|
|
9
|
+
depends-on: []
|
|
10
|
+
tags: [process, conventions]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ADR 0001 — Record architecture decisions as ADRs
|
|
14
|
+
|
|
15
|
+
<!-- Bootstrap writes this as the seed ADR (adr/0001) by default. It records
|
|
16
|
+
the *decision* to adopt the method; the operative rules live in
|
|
17
|
+
CONVENTIONS.md. Keep it generic — do not reference another project's ADR
|
|
18
|
+
numbers. For a split-shape repo, adapt to the technology-ADR shape. -->
|
|
19
|
+
|
|
20
|
+
## Context
|
|
21
|
+
|
|
22
|
+
<Project> needs its significant decisions to be **discoverable, traceable,
|
|
23
|
+
and durable** — not held in chat logs, pull-request threads, or one
|
|
24
|
+
person's memory. The lightweight Architecture Decision Record practice
|
|
25
|
+
(Michael Nygard, 2011; the markdown-ADR convention) records each decision
|
|
26
|
+
as one small, numbered, immutable file stored beside the code, so the
|
|
27
|
+
reasons behind the system are part of the repository.
|
|
28
|
+
|
|
29
|
+
## Capability statement
|
|
30
|
+
|
|
31
|
+
This repository is **documentation-led and ADR-driven**: every significant
|
|
32
|
+
decision is recorded as a numbered ADR under `adr/`; the catalogue is the
|
|
33
|
+
**source of truth** the running system is expected to match; and a status
|
|
34
|
+
lifecycle drives a `plan/` work queue. The authoring rules — ADR shape,
|
|
35
|
+
status lifecycle, numbering, audit trail, and git contract — live in
|
|
36
|
+
`CONVENTIONS.md`. This ADR records the **decision to adopt the practice**,
|
|
37
|
+
not the rules themselves.
|
|
38
|
+
|
|
39
|
+
## User stories / scenarios
|
|
40
|
+
|
|
41
|
+
- As a contributor, I find the reasons behind this system in the catalogue,
|
|
42
|
+
not by asking someone.
|
|
43
|
+
- As a maintainer, each decision, the work that implements it, and the
|
|
44
|
+
commit that ships it are linked through one stable identifier.
|
|
45
|
+
- As a new reader, the first ADR explains why this repository uses ADRs and
|
|
46
|
+
points me at where the rules live.
|
|
47
|
+
|
|
48
|
+
## Acceptance criteria
|
|
49
|
+
|
|
50
|
+
1. Significant decisions are recorded as numbered ADRs under `adr/`,
|
|
51
|
+
following `CONVENTIONS.md`.
|
|
52
|
+
2. The catalogue is the source of truth; code is expected to match the
|
|
53
|
+
decisions it records.
|
|
54
|
+
3. ADR authoring, the status lifecycle, and the `plan/` queue follow
|
|
55
|
+
`CONVENTIONS.md`.
|
|
56
|
+
|
|
57
|
+
## Out of scope
|
|
58
|
+
|
|
59
|
+
- The detailed authoring rules (ADR shape, lifecycle, numbering, git
|
|
60
|
+
contract) — these live in `CONVENTIONS.md`, not here.
|
|
61
|
+
|
|
62
|
+
## Open questions
|
|
63
|
+
|
|
64
|
+
- None.
|
|
65
|
+
|
|
66
|
+
## References / cross-links
|
|
67
|
+
|
|
68
|
+
- CONVENTIONS.md (the operative authoring rules)
|
|
69
|
+
- Michael Nygard, "Documenting Architecture Decisions" — https://adr.github.io
|
|
70
|
+
|
|
71
|
+
## Revision History
|
|
72
|
+
|
|
73
|
+
| Date | Revision | Author | Change |
|
|
74
|
+
|------|----------|--------|--------|
|
|
75
|
+
| <YYYY-MM-DD> | r1 | <owner> | Adopted the documentation-led, ADR-driven method (seeded at bootstrap). |
|
|
76
|
+
|
|
77
|
+
## Approvals
|
|
78
|
+
|
|
79
|
+
| Role | Name | Date | Signature |
|
|
80
|
+
|------|------|------|-----------|
|
|
81
|
+
| <role> | <name> | <YYYY-MM-DD> | — |
|
|
@@ -15,7 +15,9 @@ Author one new ADR, consistent with this repo's conventions.
|
|
|
15
15
|
2. Read `CONVENTIONS.md` to learn this repo's choices: ADR shape
|
|
16
16
|
(single vs. capability/technology split and the cutoff number),
|
|
17
17
|
status lifecycle, language mandate (if any), whether `domains/`
|
|
18
|
-
groupings exist,
|
|
18
|
+
groupings exist, the multi-agent mode, and the **artefact root**
|
|
19
|
+
(default: repository root) — resolve `adr/` and `INDEX.md` against it
|
|
20
|
+
(`AGENTS.md`/`CLAUDE.md` stay at the repo root).
|
|
19
21
|
3. Read `INDEX.md` and `ls adr/` to learn existing numbers and titles.
|
|
20
22
|
4. If a `federation.md` exists, this repo is part of a multi-repo
|
|
21
23
|
product. Note the **identity scheme** and the **home** it records —
|
|
@@ -13,7 +13,8 @@ Add one item to the implementation queue.
|
|
|
13
13
|
repo was bootstrapped without a plan folder (Q4a = skip), stop and
|
|
14
14
|
say so — there is no queue to add to.
|
|
15
15
|
2. Read `CONVENTIONS.md` for the plan-folder convention and the
|
|
16
|
-
completion event, and `plan/README.md` if present.
|
|
16
|
+
completion event, and `plan/README.md` if present. Resolve `plan/`
|
|
17
|
+
against the **artefact root** recorded there (default: repository root).
|
|
17
18
|
3. `ls plan/todo/` to learn existing numbers and priority ordering.
|
|
18
19
|
|
|
19
20
|
## Step 0.5 — Assessment (run first)
|
|
@@ -14,7 +14,9 @@ order-sensitive operation in the system — follow the steps exactly.
|
|
|
14
14
|
2. Read `CONVENTIONS.md` and `AGENTS.md` for: the **integration model**
|
|
15
15
|
(direct-to-main fast-forward vs. PR-based with required CI), the
|
|
16
16
|
**verify gate** command, the **multi-agent mode**, and the Git
|
|
17
|
-
contract (signed commits, tags, trailers).
|
|
17
|
+
contract (signed commits, tags, trailers). Resolve `adr/`, `plan/`, and
|
|
18
|
+
`INDEX.md` against the **artefact root** recorded in `CONVENTIONS.md`
|
|
19
|
+
(default: repository root).
|
|
18
20
|
|
|
19
21
|
## Step 1 — Select the item
|
|
20
22
|
|
|
@@ -53,6 +55,9 @@ Once the change is on `main`:
|
|
|
53
55
|
|
|
54
56
|
## Step 6 — Record
|
|
55
57
|
|
|
58
|
+
**If `_agent/` was omitted at bootstrap (Q5 = None), skip this step** — git
|
|
59
|
+
history is the record.
|
|
60
|
+
|
|
56
61
|
- Append a one-line `_agent/WORKLOG.md` row: branch, HEAD, verify
|
|
57
62
|
result, any deferral.
|
|
58
63
|
- Update the live snapshot: `_agent/CURRENT_FOCUS.md` in single-checkout
|