@evolvehq/docflow 0.5.0 → 0.7.0
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 +53 -5
- package/USAGE.md +53 -6
- package/package.json +1 -1
- package/skills/agent-wave/SKILL.md +8 -3
- package/skills/audit/SKILL.md +5 -3
- package/skills/bootstrap/SKILL.md +6 -2
- package/skills/bootstrap/templates/AGENTS.md +12 -0
- package/skills/bootstrap/templates/CONVENTIONS.md +28 -0
- package/skills/bootstrap/templates/_agent-prompts-autonomous.md +12 -0
package/README.md
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
A plugin for **ADR-driven, documentation-led projects**, working on
|
|
6
|
-
|
|
5
|
+
A plugin for **ADR-driven, documentation-led projects**, working on
|
|
6
|
+
**Claude Code, Claude Cowork, pi, Codex, and OpenCode** from the same
|
|
7
|
+
skill files (see [Install](#install)).
|
|
7
8
|
It installs a `bootstrap` skill that scaffolds (or retrofits) an
|
|
8
9
|
**Architecture Decision Record (ADR)** catalogue, a plan queue, and
|
|
9
10
|
`AGENTS.md` conventions into any repository, plus a set of **lifecycle
|
|
@@ -66,9 +67,23 @@ rather than overwriting them).
|
|
|
66
67
|
|
|
67
68
|
## Install
|
|
68
69
|
|
|
69
|
-
docflow ships
|
|
70
|
-
the
|
|
71
|
-
|
|
70
|
+
docflow ships from **one `skills/` tree** to five coding agents — only
|
|
71
|
+
the packaging differs. Two surfaces: the scaffolded **output**
|
|
72
|
+
(`AGENTS.md`, the ADR catalogue, `plan/`, `_agent/`) is plain Markdown
|
|
73
|
+
read natively by any agent that loads `AGENTS.md`; the **skills** are
|
|
74
|
+
`SKILL.md` files the host discovers.
|
|
75
|
+
|
|
76
|
+
| Agent | Output | Skills | Install | Invoke |
|
|
77
|
+
|-------|:------:|:------:|---------|--------|
|
|
78
|
+
| Claude Code | native | ✅ | marketplace (below) | `/bootstrap` |
|
|
79
|
+
| Claude Cowork | native | ✅ | same Claude Code plugin | `/bootstrap` |
|
|
80
|
+
| pi | native | ✅ | `pi install npm:@evolvehq/docflow` | `/skill:bootstrap` |
|
|
81
|
+
| Codex | native | ✅ | copy into `~/.agents/skills/` | `$bootstrap` / `/skills` |
|
|
82
|
+
| OpenCode | native | ✅ | reads `.claude`/`.agents`/`.opencode` skills | auto, by description |
|
|
83
|
+
|
|
84
|
+
Handy: `~/.agents/skills/` is read by **both Codex and OpenCode**, and
|
|
85
|
+
`~/.claude/skills/` by **both Claude Code and OpenCode** — so one install
|
|
86
|
+
often serves two agents.
|
|
72
87
|
|
|
73
88
|
### Claude Code — from this marketplace
|
|
74
89
|
|
|
@@ -80,6 +95,13 @@ for pi).
|
|
|
80
95
|
Invoke with `/bootstrap`, `/new-adr`, `/ship-item`, … (auto-triggers on
|
|
81
96
|
matching requests too).
|
|
82
97
|
|
|
98
|
+
### Claude Cowork
|
|
99
|
+
|
|
100
|
+
Cowork uses the **same plugin system** as Claude Code, so install the
|
|
101
|
+
docflow plugin exactly as above (`/plugin marketplace add
|
|
102
|
+
EvolveHQ/docflow`, then install) — or from Anthropic's community
|
|
103
|
+
marketplace once listed. No separate packaging.
|
|
104
|
+
|
|
83
105
|
### pi coding agent
|
|
84
106
|
|
|
85
107
|
```
|
|
@@ -97,6 +119,32 @@ The scaffolded output (`AGENTS.md`, `CONVENTIONS.md`, the ADR catalogue,
|
|
|
97
119
|
`plan/`, `_agent/`) is plain Markdown and is read natively by pi's
|
|
98
120
|
hierarchical `AGENTS.md` loading — no porting needed.
|
|
99
121
|
|
|
122
|
+
### Codex (OpenAI)
|
|
123
|
+
|
|
124
|
+
Codex reads `AGENTS.md` natively and discovers skills from `.agents/skills`.
|
|
125
|
+
Copy docflow's skills into a path Codex scans:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
# user-wide (all projects), from a clone of this repo:
|
|
129
|
+
mkdir -p ~/.agents/skills && cp -r <docflow>/skills/* ~/.agents/skills/
|
|
130
|
+
# or from npm:
|
|
131
|
+
npm install @evolvehq/docflow
|
|
132
|
+
cp -r node_modules/@evolvehq/docflow/skills/* ~/.agents/skills/
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
On Windows, copy `skills\*` into `%USERPROFILE%\.agents\skills\`. Invoke
|
|
136
|
+
with `$bootstrap` / `/skills`, or just describe the task (Codex
|
|
137
|
+
auto-triggers from the skill description). The structured assessment
|
|
138
|
+
questions fall back to plain `A/B/C` text where there is no select tool.
|
|
139
|
+
|
|
140
|
+
### OpenCode (sst)
|
|
141
|
+
|
|
142
|
+
OpenCode scans `.opencode/skills/`, **`.claude/skills/`, and
|
|
143
|
+
`.agents/skills/`** (project and global), so a Claude Code or Codex
|
|
144
|
+
install is **picked up automatically** — or copy `skills/*` into
|
|
145
|
+
`~/.config/opencode/skills/` (or per-project `.opencode/skills/`). Skills
|
|
146
|
+
auto-load by description.
|
|
147
|
+
|
|
100
148
|
### Claude Code — local development (no install)
|
|
101
149
|
|
|
102
150
|
```
|
package/USAGE.md
CHANGED
|
@@ -164,12 +164,33 @@ The repo is now ready for ADR-driven work. Typical first steps:
|
|
|
164
164
|
## 5a. Lifecycle skills
|
|
165
165
|
|
|
166
166
|
The manual workflow in §5 is exactly what the lifecycle skills
|
|
167
|
-
automate. They all share
|
|
168
|
-
first**
|
|
169
|
-
|
|
170
|
-
un-bootstrapped repo** and point
|
|
171
|
-
`INDEX.md` and the `_agent/` coordination
|
|
172
|
-
effect.
|
|
167
|
+
automate. They all share four properties: they **run a short assessment
|
|
168
|
+
first** (see below); they **read `CONVENTIONS.md` first** and honour the
|
|
169
|
+
repo's recorded choices (ADR shape, status lifecycle, integration model,
|
|
170
|
+
multi-agent mode); they **refuse on an un-bootstrapped repo** and point
|
|
171
|
+
at `/bootstrap`; and they keep `INDEX.md` and the `_agent/` coordination
|
|
172
|
+
files in sync as a side effect.
|
|
173
|
+
|
|
174
|
+
**The assessment protocol.** `new-adr`, `new-plan`, `add-convention`,
|
|
175
|
+
`brainstorm`, and `agent-wave` each open with a brief assessment before
|
|
176
|
+
acting — the same pattern bootstrap uses (§3):
|
|
177
|
+
|
|
178
|
+
- An **opt-out gate** first: *run the assessment, or skip it?* The
|
|
179
|
+
recommended default flips on context — *run* when you invoked the skill
|
|
180
|
+
with little detail, *skip* when your request already specifies
|
|
181
|
+
everything.
|
|
182
|
+
- Questions are asked **one at a time**, each with a **recommended
|
|
183
|
+
option** you can accept, override, or replace.
|
|
184
|
+
- Answers use **scroll-to-select** (single- or multiple-choice) where the
|
|
185
|
+
host exposes a selection tool (Claude Code's `AskUserQuestion`), falling
|
|
186
|
+
back to plain `A/B/C` lists otherwise. Free text is used only where an
|
|
187
|
+
enumerable set is impossible (e.g. an ADR title).
|
|
188
|
+
- **You decide** — a skill never proceeds past a question without your
|
|
189
|
+
input, and never guesses scope when invoked with no context.
|
|
190
|
+
|
|
191
|
+
`agent-wave` additionally asks the wave parallelism and the merge /
|
|
192
|
+
integration strategy. So a bare *"new ADR"* leads with a couple of quick
|
|
193
|
+
picks; a fully-specified request lets you skip straight through.
|
|
173
194
|
|
|
174
195
|
| Skill | Replaces these manual steps |
|
|
175
196
|
|-------|------------------------------|
|
|
@@ -233,6 +254,32 @@ it no longer applies); to make it enforceable, add the test command to
|
|
|
233
254
|
the verify gate. Any other "we should always X" practice is enabled the
|
|
234
255
|
same way — `/add-convention` is the single path.
|
|
235
256
|
|
|
257
|
+
### Concurrent ADR/plan creation (the numbering race)
|
|
258
|
+
|
|
259
|
+
ADR and `plan/todo` numbers are contiguous and chosen at authoring time,
|
|
260
|
+
so two branches/worktrees can both grab the same "next" number and
|
|
261
|
+
collide at merge. docflow keeps the numbers (they stay short, ordered,
|
|
262
|
+
and the stable cross-reference key — no UUIDs, no rename-breaks-refs) and
|
|
263
|
+
closes the race with **process guardrails** instead of a new identity
|
|
264
|
+
scheme:
|
|
265
|
+
|
|
266
|
+
- **G1 — decide before do** *(recommended):* prefer to land an ADR + its
|
|
267
|
+
plan items on `main` before implementation work begins.
|
|
268
|
+
- **G2 — check before merge** *(primary defence):* before integrating,
|
|
269
|
+
sync onto the current `main` and run the audit; if your number now
|
|
270
|
+
clashes with what landed, renumber locally **before** merging — a
|
|
271
|
+
trivial change (a new ADR/plan names its own number only in its file
|
|
272
|
+
and `INDEX.md`).
|
|
273
|
+
- **G3 — gate backstop:** the single-threaded merge gate rejects a
|
|
274
|
+
duplicate; the later author renumbers.
|
|
275
|
+
|
|
276
|
+
`bootstrap` **pre-wires** these into `CONVENTIONS.md` + an `AGENTS.md`
|
|
277
|
+
hard rule **only** for multi-agent (mode 2/3) or PR-based repos.
|
|
278
|
+
**Single-agent / direct-to-main repos have no race by construction** and
|
|
279
|
+
get none of this ceremony. Numbers are immutable once merged. (For
|
|
280
|
+
orchestrated runs, `agent-wave` additionally *reserves* disjoint number
|
|
281
|
+
blocks up front, so G2/G3 rarely fire.)
|
|
282
|
+
|
|
236
283
|
## 6. Customising or extending
|
|
237
284
|
|
|
238
285
|
The templates are deliberately small and self-contained. To customise:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evolvehq/docflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
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, and audit ADRs with lifecycle skills. Works with the pi coding agent and Claude Code.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -102,9 +102,14 @@ every merge.
|
|
|
102
102
|
Spawn N subagents in parallel, each in an isolated worktree
|
|
103
103
|
(`isolation: worktree`). Brief each with: its assigned queue item, the
|
|
104
104
|
instruction to follow `_agent/prompts/autonomous.md` end-to-end for that
|
|
105
|
-
one item (orient → implement → verify →
|
|
106
|
-
ship), and to report back a structured
|
|
107
|
-
PR link, any blocker).
|
|
105
|
+
one item (orient → implement → verify → **check before merge (G2)** →
|
|
106
|
+
integrate per the repo's model → ship), and to report back a structured
|
|
107
|
+
result (item, pass/fail, HEAD or PR link, any blocker). The G2 step:
|
|
108
|
+
before integrating, sync onto the current `main` and run the **audit**
|
|
109
|
+
skill; if the item's new ADR/plan number now clashes with what landed,
|
|
110
|
+
renumber locally
|
|
111
|
+
before merging. (Reservation in Step 2 makes this rare; G2 catches what
|
|
112
|
+
slips through, e.g. an out-of-band ADR landing mid-wave.)
|
|
108
113
|
|
|
109
114
|
## Step 4 — Collect and checkpoint
|
|
110
115
|
|
package/skills/audit/SKILL.md
CHANGED
|
@@ -49,9 +49,11 @@ relevant):
|
|
|
49
49
|
11. **Cross-worktree collisions** (mode 3, or when auditing across
|
|
50
50
|
unmerged branches). These catch semantic conflicts that a
|
|
51
51
|
line-level git merge cannot:
|
|
52
|
-
- **Duplicate ADR numbers** — two ADR files
|
|
53
|
-
worktrees) claiming the same
|
|
54
|
-
only sees one tree.
|
|
52
|
+
- **Duplicate ADR or plan/todo numbers** — two ADR files, or two
|
|
53
|
+
`plan/todo/` items, (across branches/worktrees) claiming the same
|
|
54
|
+
`NNNN`. Distinct from check 1, which only sees one tree. This is the
|
|
55
|
+
collision the concurrency guardrails (G2 pre-merge / G3 gate) guard
|
|
56
|
+
against; flag it so the later author renumbers.
|
|
55
57
|
- **Duplicate plan ownership** — two `plan/todo/` items naming the
|
|
56
58
|
same owning ADR for the same scope, i.e. two worktrees building
|
|
57
59
|
the same thing.
|
|
@@ -240,8 +240,12 @@ template, fill its placeholders from the assessment answers, then
|
|
|
240
240
|
write it into the repo.
|
|
241
241
|
|
|
242
242
|
1. `CONVENTIONS.md` — from `templates/CONVENTIONS.md`. Spec other files
|
|
243
|
-
reference.
|
|
244
|
-
2
|
|
243
|
+
reference. Include the **§Concurrency Guardrails** section only if Q5
|
|
244
|
+
is mode 2/3 **or** Q4b is PR-based; omit it for single-agent
|
|
245
|
+
direct-to-main repos (no numbering race).
|
|
246
|
+
2. `AGENTS.md` — from `templates/AGENTS.md`. Include the concurrency
|
|
247
|
+
guardrails hard-rule bullet (G2/G3) under the same condition as the
|
|
248
|
+
CONVENTIONS section above; omit otherwise.
|
|
245
249
|
3. `CLAUDE.md` — from `templates/CLAUDE.md` (single line `@AGENTS.md`).
|
|
246
250
|
4. `adr/0000-template.md` — from `templates/adr-capability.md`.
|
|
247
251
|
5. `adr/NNNN-template.md` — from `templates/adr-technology.md`, only if
|
|
@@ -118,6 +118,18 @@ Coordination rules:
|
|
|
118
118
|
Add your row when you start, remove it when the worktree closes.
|
|
119
119
|
-->
|
|
120
120
|
|
|
121
|
+
<!-- Concurrency guardrails hard rule — bootstrap INCLUDES this bullet
|
|
122
|
+
ONLY for multi-agent (mode 2/3) OR PR-based repos (omit for single-agent
|
|
123
|
+
direct-to-main). See CONVENTIONS.md §Concurrency Guardrails.
|
|
124
|
+
|
|
125
|
+
- **Before integrating, check for number collisions (G2/G3).** Sync onto
|
|
126
|
+
the current `main` and run `/audit`; if your ADR or `plan/todo` number
|
|
127
|
+
now clashes with what landed on `main`, renumber locally before
|
|
128
|
+
integrating. The single-threaded merge gate rejects a duplicate as the
|
|
129
|
+
backstop. Numbers are immutable once merged. (G1 — landing the ADR
|
|
130
|
+
before implementation — is recommended guidance, in CONVENTIONS.md.)
|
|
131
|
+
-->
|
|
132
|
+
|
|
121
133
|
## Plan folder
|
|
122
134
|
|
|
123
135
|
- A pending item gets a `plan/todo/NNNN-<slug>.md` file BEFORE work
|
|
@@ -139,6 +139,34 @@ When a `plan/todo/` item ships, the file moves to `plan/done/` AND the
|
|
|
139
139
|
owning ADR(s)' `status:` advances from `Accepted` to `Implemented`.
|
|
140
140
|
`INDEX.md` is regenerated to match.
|
|
141
141
|
|
|
142
|
+
<!-- Concurrency Guardrails — bootstrap INCLUDES this section (uncommented)
|
|
143
|
+
ONLY for multi-agent (mode 2/3) OR PR-based repos. Single-agent
|
|
144
|
+
direct-to-main repos have no numbering race by construction and OMIT it.
|
|
145
|
+
Adapt "integrate" to the integration model (PR merge / ff-push / pull
|
|
146
|
+
before commit in a shared checkout).
|
|
147
|
+
|
|
148
|
+
## Concurrency Guardrails
|
|
149
|
+
|
|
150
|
+
ADR and `plan/todo` numbers are contiguous and assigned at authoring
|
|
151
|
+
time, so concurrent branches can pick the same next number. These
|
|
152
|
+
guardrails keep numbering collision-free **without changing the identity
|
|
153
|
+
scheme** — the number stays the stable cross-reference key, immutable
|
|
154
|
+
once merged:
|
|
155
|
+
|
|
156
|
+
- **G1 — decide before do (recommended).** Prefer to merge an ADR and its
|
|
157
|
+
plan items to `main` before implementation work begins, so work
|
|
158
|
+
branches start from a `main` that already carries the numbered ADR.
|
|
159
|
+
- **G2 — check before merge.** Before integrating, sync onto the current
|
|
160
|
+
`main` (`git fetch` + rebase, or pull in a shared checkout) and run
|
|
161
|
+
`/audit`. If your ADR number or `plan/todo` slot now clashes with what
|
|
162
|
+
landed on `main`, renumber locally **before** integrating — a trivial,
|
|
163
|
+
local change (a new ADR/plan names its own number only in its own file
|
|
164
|
+
and `INDEX.md`).
|
|
165
|
+
- **G3 — gate backstop.** Integration is single-threaded; it rejects a
|
|
166
|
+
duplicate number as the last line of defence, and the later author
|
|
167
|
+
renumbers.
|
|
168
|
+
-->
|
|
169
|
+
|
|
142
170
|
## Audit Trail Policy
|
|
143
171
|
|
|
144
172
|
Every substantive change to an Accepted ADR appends a new row to its
|
|
@@ -42,6 +42,18 @@ footer required on any commit touching an ADR.
|
|
|
42
42
|
|
|
43
43
|
## Step 6 — Integrate
|
|
44
44
|
|
|
45
|
+
<!-- Concurrency guardrail G2 (multi-agent / PR-based repos) — keep this
|
|
46
|
+
step if CONVENTIONS.md has a §Concurrency Guardrails section; drop it for
|
|
47
|
+
single-agent direct-to-main repos:
|
|
48
|
+
|
|
49
|
+
- **Check before merge (G2).** Sync onto the current `main`
|
|
50
|
+
(`git fetch` + rebase, or pull in a shared checkout) and run `/audit`.
|
|
51
|
+
If your new ADR or `plan/todo` number now clashes with what landed on
|
|
52
|
+
`main`, renumber locally — in your ADR/plan file and `INDEX.md` —
|
|
53
|
+
before integrating. The merge gate (G3) rejects a duplicate as the
|
|
54
|
+
backstop.
|
|
55
|
+
-->
|
|
56
|
+
|
|
45
57
|
<!-- Integration model per Q4b — keep ONE of the two blocks below,
|
|
46
58
|
delete the other. -->
|
|
47
59
|
|