@evolvehq/docflow 0.4.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/LICENSE +21 -0
- package/README.md +188 -0
- package/USAGE.md +289 -0
- package/package.json +31 -0
- package/skills/add-convention/SKILL.md +61 -0
- package/skills/agent-wave/SKILL.md +89 -0
- package/skills/audit/SKILL.md +65 -0
- package/skills/bootstrap/SKILL.md +347 -0
- package/skills/bootstrap/templates/AGENTS.md +157 -0
- package/skills/bootstrap/templates/CLAUDE.md +1 -0
- package/skills/bootstrap/templates/CONVENTIONS.md +165 -0
- package/skills/bootstrap/templates/_agent-CURRENT_FOCUS.md +32 -0
- package/skills/bootstrap/templates/_agent-HANDOFF.md +28 -0
- package/skills/bootstrap/templates/_agent-IN_FLIGHT.md +16 -0
- package/skills/bootstrap/templates/_agent-LOCKS.md +17 -0
- package/skills/bootstrap/templates/_agent-ROLES.md +23 -0
- package/skills/bootstrap/templates/_agent-WORKLOG.md +16 -0
- package/skills/bootstrap/templates/_agent-prompts-autonomous.md +100 -0
- package/skills/bootstrap/templates/adr-capability.md +58 -0
- package/skills/bootstrap/templates/adr-technology.md +67 -0
- package/skills/bootstrap/templates/plan-README.md +37 -0
- package/skills/brainstorm/SKILL.md +56 -0
- package/skills/new-adr/SKILL.md +82 -0
- package/skills/new-plan/SKILL.md +47 -0
- package/skills/ship-item/SKILL.md +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eugenio Minardi / EvolveHQ
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# docflow
|
|
2
|
+
|
|
3
|
+
A plugin for **ADR-driven, documentation-led projects**, working on both
|
|
4
|
+
the **pi** and **Claude Code** coding agents from the same skill files.
|
|
5
|
+
It installs a `bootstrap` skill that scaffolds (or retrofits) an
|
|
6
|
+
**Architecture Decision Record (ADR)** catalogue, a plan queue, and
|
|
7
|
+
`AGENTS.md` conventions into any repository, plus a set of **lifecycle
|
|
8
|
+
skills** that author, queue, ship, and audit ADRs — so the project can
|
|
9
|
+
be driven by both humans and coding agents from a small set of canonical
|
|
10
|
+
files.
|
|
11
|
+
|
|
12
|
+
## Skills
|
|
13
|
+
|
|
14
|
+
Slash commands below are the **Claude Code** form. On the **pi** coding
|
|
15
|
+
agent the same skills are invoked as `/skill:<name>` (e.g.
|
|
16
|
+
`/skill:bootstrap`, `/skill:new-adr`). See [Install](#install).
|
|
17
|
+
|
|
18
|
+
| Skill | Slash command | Purpose |
|
|
19
|
+
|-------|---------------|---------|
|
|
20
|
+
| bootstrap | `/bootstrap` | Scaffold or retrofit the whole convention set. Start here. |
|
|
21
|
+
| new-adr | `/new-adr` | Author one ADR — next contiguous number, right shape, INDEX + domain wiring, supersede linkage. |
|
|
22
|
+
| new-plan | `/new-plan` | Add a `plan/todo` item tracing to its owning ADR(s). |
|
|
23
|
+
| ship-item | `/ship-item` | Run the completion event: verify → integrate → `todo`→`done` → ADR `Accepted`→`Implemented` → INDEX/WORKLOG. |
|
|
24
|
+
| add-convention | `/add-convention` | Assess whether a convention is worth codifying, route it to the right home (or to an ADR), then add it. |
|
|
25
|
+
| audit | `/audit` | Lint the repo against its own conventions — numbering, INDEX sync, plan coverage, **ADR-privacy leaks**, more. |
|
|
26
|
+
| brainstorm | `/brainstorm` | Decompose a problem into candidate ADRs + plan items (proposes drafts; writes nothing until approved). |
|
|
27
|
+
| agent-wave | `/agent-wave` | Orchestrate a wave of parallel worktree subagents over the queue, with checkpoint or continuous supervision. |
|
|
28
|
+
|
|
29
|
+
The lifecycle skills all **read `CONVENTIONS.md` first** and honour the
|
|
30
|
+
choices the bootstrap recorded (ADR shape, status lifecycle, integration
|
|
31
|
+
model, multi-agent mode). They refuse to run on an un-bootstrapped repo
|
|
32
|
+
and point you at `/bootstrap`.
|
|
33
|
+
|
|
34
|
+
## What `/bootstrap` installs
|
|
35
|
+
|
|
36
|
+
- `AGENTS.md` — hard rules for coding agents (the entry point).
|
|
37
|
+
- `CLAUDE.md` — one-liner re-exporting `AGENTS.md` so Claude Code picks
|
|
38
|
+
it up automatically.
|
|
39
|
+
- `CONVENTIONS.md` — authoring rules for ADRs, naming, status
|
|
40
|
+
lifecycle, audit trail, and git contract.
|
|
41
|
+
- `INDEX.md` — generated table of all ADRs.
|
|
42
|
+
- `adr/` — ADR catalogue with a capability-ADR template (and an
|
|
43
|
+
optional technology-ADR template).
|
|
44
|
+
- `plan/todo/` and `plan/done/` — implementation queue. `git mv` from
|
|
45
|
+
`todo/` to `done/` is the completion event.
|
|
46
|
+
- `_agent/` — multi-agent coordination: `ROLES.md`, `LOCKS.md`,
|
|
47
|
+
`WORKLOG.md`, `CURRENT_FOCUS.md`, `HANDOFF.md`, and an optional
|
|
48
|
+
unsupervised-run prompt under `prompts/`.
|
|
49
|
+
|
|
50
|
+
Optional, off by default: `GLOSSARY.md`, `domains/<slug>/README.md`
|
|
51
|
+
groupings, project-specific hard rules (vendor-naming restriction,
|
|
52
|
+
regulated-evidence posture, language mandate, audit-stream separation).
|
|
53
|
+
|
|
54
|
+
## Why
|
|
55
|
+
|
|
56
|
+
Documentation-led projects rot when conventions live in someone's head.
|
|
57
|
+
This plugin makes the conventions explicit, machine-readable, and
|
|
58
|
+
applied uniformly — so a fresh contributor (human or agent) can pick up
|
|
59
|
+
the repo with no oral handover.
|
|
60
|
+
|
|
61
|
+
It works equally well on **fresh repos** (scaffolds from zero) and on
|
|
62
|
+
**existing repos** (retrofits, preserving and merging existing files
|
|
63
|
+
rather than overwriting them).
|
|
64
|
+
|
|
65
|
+
## Install
|
|
66
|
+
|
|
67
|
+
docflow ships for two coding agents from the **same** skill files — only
|
|
68
|
+
the manifest differs (`.claude-plugin/` for Claude Code, `package.json`
|
|
69
|
+
for pi).
|
|
70
|
+
|
|
71
|
+
### Claude Code — from this marketplace
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
/plugin marketplace add EvolveHQ/docflow
|
|
75
|
+
/plugin install docflow@evolvehq
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Invoke with `/bootstrap`, `/new-adr`, `/ship-item`, … (auto-triggers on
|
|
79
|
+
matching requests too).
|
|
80
|
+
|
|
81
|
+
### pi coding agent
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
pi install git:github.com/EvolveHQ/docflow
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
or, once published to npm, `pi install npm:@evolvehq/docflow`. Pi
|
|
88
|
+
auto-discovers the `skills/` directory via the `pi` key in
|
|
89
|
+
`package.json`. Invoke with `/skill:bootstrap`, `/skill:new-adr`,
|
|
90
|
+
`/skill:ship-item`, … Pi does **not** auto-trigger skills from their
|
|
91
|
+
descriptions the way Claude Code does — invoke them explicitly (the
|
|
92
|
+
agent will also load a skill on-demand when a task clearly matches).
|
|
93
|
+
|
|
94
|
+
The scaffolded output (`AGENTS.md`, `CONVENTIONS.md`, the ADR catalogue,
|
|
95
|
+
`plan/`, `_agent/`) is plain Markdown and is read natively by pi's
|
|
96
|
+
hierarchical `AGENTS.md` loading — no porting needed.
|
|
97
|
+
|
|
98
|
+
### Claude Code — local development (no install)
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
claude --plugin-dir <path-to-this-repo>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Direct skill clone (no plugin lifecycle)
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
git clone https://github.com/EvolveHQ/docflow ~/.claude/skills/docflow-src
|
|
108
|
+
ln -s ~/.claude/skills/docflow-src/skills/bootstrap ~/.claude/skills/bootstrap
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
On Windows, copy `skills/bootstrap/` (and the other `skills/*` dirs you
|
|
112
|
+
want) into `%USERPROFILE%\.claude\skills\` instead of symlinking.
|
|
113
|
+
|
|
114
|
+
## Quick start
|
|
115
|
+
|
|
116
|
+
In any repo, run:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
/bootstrap
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
or just say *"set up documentation-led conventions in this repo"*,
|
|
123
|
+
*"bootstrap ADRs and a plan queue"*, or *"scaffold AGENTS.md and the
|
|
124
|
+
_agent/ layout"*. The skill auto-triggers on those phrasings.
|
|
125
|
+
|
|
126
|
+
The skill will:
|
|
127
|
+
|
|
128
|
+
1. Detect whether the repo is fresh or existing, and state which.
|
|
129
|
+
2. Ask 10 assessment questions to tune the conventions to the project
|
|
130
|
+
— one at a time, with a recommended option for each.
|
|
131
|
+
3. Summarise the resulting plan and ask for sign-off.
|
|
132
|
+
4. Write (or Edit, for existing repos) the files.
|
|
133
|
+
5. Commit each logical group with a Conventional Commit message.
|
|
134
|
+
6. **On existing repos**, offer to backfill ADRs, `plan/done/`, and
|
|
135
|
+
`CONVENTIONS.md` additions from the existing code and git history
|
|
136
|
+
— drafts only, approved in batches before anything commits.
|
|
137
|
+
|
|
138
|
+
## Updating
|
|
139
|
+
|
|
140
|
+
Recipients refresh installations with:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
/plugin marketplace update evolvehq
|
|
144
|
+
/plugin install docflow@evolvehq
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
See [USAGE.md §Updating the plugin](USAGE.md#8-updating-the-plugin)
|
|
148
|
+
for the author-side flow (version bumps, release tags) and recipient
|
|
149
|
+
options including `/reload-plugins` for live sessions.
|
|
150
|
+
|
|
151
|
+
## Full usage and customisation guide
|
|
152
|
+
|
|
153
|
+
See [USAGE.md](USAGE.md) for the assessment questions, what each
|
|
154
|
+
answer changes, the file-by-file output, the backfill flow, and how
|
|
155
|
+
to extend or override the templates.
|
|
156
|
+
|
|
157
|
+
## Layout
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
docflow/
|
|
161
|
+
.claude-plugin/
|
|
162
|
+
plugin.json # Claude Code plugin manifest
|
|
163
|
+
marketplace.json # Claude Code marketplace listing (repo is its own marketplace)
|
|
164
|
+
package.json # pi package manifest (pi.skills -> ./skills) + npm metadata
|
|
165
|
+
skills/
|
|
166
|
+
bootstrap/
|
|
167
|
+
SKILL.md # bootstrap: assessment + output sequence + backfill
|
|
168
|
+
templates/ # files the bootstrap reads and writes into target repos
|
|
169
|
+
new-adr/SKILL.md # lifecycle skills — operate on a bootstrapped repo,
|
|
170
|
+
new-plan/SKILL.md # read CONVENTIONS.md, honour its choices
|
|
171
|
+
ship-item/SKILL.md
|
|
172
|
+
add-convention/SKILL.md
|
|
173
|
+
audit/SKILL.md
|
|
174
|
+
brainstorm/SKILL.md
|
|
175
|
+
agent-wave/SKILL.md
|
|
176
|
+
README.md
|
|
177
|
+
USAGE.md
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Only the `bootstrap` skill uses `skills/bootstrap/templates/`. The
|
|
181
|
+
lifecycle skills act on the copies the bootstrap wrote into the target
|
|
182
|
+
repo (e.g. its `adr/0000-template.md`), so they carry no templates of
|
|
183
|
+
their own.
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
MIT. Use it, fork it, change it. If you improve a template, a PR is
|
|
188
|
+
welcome.
|
package/USAGE.md
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# Using docflow
|
|
2
|
+
|
|
3
|
+
This document explains how the `bootstrap` skill behaves end-to-end,
|
|
4
|
+
what each of the 10 assessment questions actually changes in the
|
|
5
|
+
output, and how to customise or extend the templates. The lifecycle
|
|
6
|
+
skills are covered in §5a.
|
|
7
|
+
|
|
8
|
+
For installation, see the [README](README.md).
|
|
9
|
+
|
|
10
|
+
## 1. Triggering the bootstrap skill
|
|
11
|
+
|
|
12
|
+
Once the plugin is installed (or `--plugin-dir`'d) into a Claude Code
|
|
13
|
+
session, the skill is available in any repo. Three ways to trigger:
|
|
14
|
+
|
|
15
|
+
1. **Slash command:** `/bootstrap`.
|
|
16
|
+
2. **Natural language** matching the skill's description, e.g.
|
|
17
|
+
- "set up documentation-led conventions in this repo"
|
|
18
|
+
- "bootstrap ADRs and a plan queue"
|
|
19
|
+
- "scaffold AGENTS.md and the _agent/ layout"
|
|
20
|
+
- "retrofit this existing repo with the documentation conventions"
|
|
21
|
+
3. **From another agent's prompt** — name the skill explicitly:
|
|
22
|
+
*"invoke the `bootstrap` skill on this repository."*
|
|
23
|
+
|
|
24
|
+
## 2. The flow
|
|
25
|
+
|
|
26
|
+
The skill runs in three phases.
|
|
27
|
+
|
|
28
|
+
### Phase A — Detect
|
|
29
|
+
|
|
30
|
+
The skill inspects the repo and states in one line whether it is:
|
|
31
|
+
|
|
32
|
+
- **Fresh** — no source, no docs. It will scaffold from zero.
|
|
33
|
+
- **Existing** — it reads any current `README.md`, `CONTRIBUTING.md`,
|
|
34
|
+
`AGENTS.md`, `CLAUDE.md`, `docs/`, `adr/`, `.github/` first.
|
|
35
|
+
Existing content is preserved; merges, not overwrites.
|
|
36
|
+
|
|
37
|
+
If existing ADRs use a different format, the skill proposes a
|
|
38
|
+
migration plan (renumber, keep, translate) instead of creating a
|
|
39
|
+
parallel tree.
|
|
40
|
+
|
|
41
|
+
### Phase B — Assess
|
|
42
|
+
|
|
43
|
+
The skill asks the 10 assessment questions **one at a time**, in order.
|
|
44
|
+
For each question it states a **recommended** option with one short
|
|
45
|
+
sentence on why, plus the alternatives. You pick the recommended
|
|
46
|
+
option, pick an alternative, or type a custom answer. After all 10
|
|
47
|
+
answers are in, the skill summarises the resulting plan in 5–10 lines
|
|
48
|
+
and asks for sign-off. **It does not write files before sign-off.**
|
|
49
|
+
|
|
50
|
+
If the host CLI supports structured single-select (e.g. Claude Code's
|
|
51
|
+
`AskUserQuestion`), the recommended option is labelled "(Recommended)"
|
|
52
|
+
in the picker; otherwise the recommendation is named in plain text.
|
|
53
|
+
|
|
54
|
+
### Phase C — Write
|
|
55
|
+
|
|
56
|
+
After sign-off, the skill writes files in dependency order
|
|
57
|
+
(`CONVENTIONS.md` first, then `AGENTS.md` + `CLAUDE.md`, then ADR
|
|
58
|
+
templates, then `plan/`, then `_agent/`, then `INDEX.md` stub,
|
|
59
|
+
optionally `_agent/prompts/autonomous.md`). For existing repos it
|
|
60
|
+
prefers `Edit` over `Write` where files already exist, and calls out
|
|
61
|
+
every merge decision in the commit message.
|
|
62
|
+
|
|
63
|
+
### Phase D — Backfill (existing repos only)
|
|
64
|
+
|
|
65
|
+
Once the scaffolding has landed, the skill **offers** to backfill
|
|
66
|
+
ADRs, `plan/done/` entries, and `CONVENTIONS.md` additions from the
|
|
67
|
+
existing code and git history. Skipped on fresh repos.
|
|
68
|
+
|
|
69
|
+
If accepted, the backfill runs in four passes, each producing drafts
|
|
70
|
+
you review before they commit:
|
|
71
|
+
|
|
72
|
+
1. **Scan** (read-only): `git log`, top-level source dirs, existing
|
|
73
|
+
docs, dependency manifests.
|
|
74
|
+
2. **Propose ADRs.** One per distinguishable decision or capability.
|
|
75
|
+
Capabilities go in as capability ADRs with status `Implemented`
|
|
76
|
+
(code already exists), Revision History citing the commits that
|
|
77
|
+
introduced the behaviour. Technology choices go in as technology
|
|
78
|
+
ADRs with reconstructed Rationale — anything speculative is flagged
|
|
79
|
+
so you can correct it. You see the proposed list (number + title +
|
|
80
|
+
status + scope) before any file is written.
|
|
81
|
+
3. **Propose `plan/done/` entries.** One per ADR drafted as
|
|
82
|
+
`Implemented`, dated by the implementing commit's date. Approved as
|
|
83
|
+
a batch.
|
|
84
|
+
4. **Propose `CONVENTIONS.md` additions.** De-facto patterns in the
|
|
85
|
+
repo (commit-message style, branch naming, test layout, file-naming
|
|
86
|
+
rules, tooling defaults) promoted to written rules. Diff shown
|
|
87
|
+
before applying.
|
|
88
|
+
|
|
89
|
+
Each accepted pass commits with a Conventional Commit:
|
|
90
|
+
`docs(adr): backfill ADRs 0001-00NN from code and history`,
|
|
91
|
+
`docs(plan): backfill plan/done from shipped commits`,
|
|
92
|
+
`docs: backfill conventions from de-facto patterns`. `INDEX.md` is
|
|
93
|
+
regenerated after the ADR pass.
|
|
94
|
+
|
|
95
|
+
**Guardrails.** Everything is a draft; you approve each pass. If
|
|
96
|
+
history is sparse or unclear, the skill stops rather than invent
|
|
97
|
+
rationale. Declining the backfill is fine — the scaffolding is
|
|
98
|
+
already complete and the queue is just empty until the first
|
|
99
|
+
hand-authored ADR.
|
|
100
|
+
|
|
101
|
+
## 3. The 10 assessment questions
|
|
102
|
+
|
|
103
|
+
Each question's answer changes specific files. Knowing the
|
|
104
|
+
recommendation and what it changes up front helps you answer quickly.
|
|
105
|
+
|
|
106
|
+
| # | Question | Recommended | What it changes |
|
|
107
|
+
|---|----------|-------------|-----------------|
|
|
108
|
+
| 1 | **Project identity** — name, one-liner, doc language, existing files to preserve. | *No default — project-specific.* | Header of `AGENTS.md`, `CONVENTIONS.md`, `README.md`; language mandate (if any) added to `CONVENTIONS.md` §Project. |
|
|
109
|
+
| 2 | **ADR shape** — single vs. capability-vs-technology split. | **Single shape.** Start simple; split later if long-lived product requirements clearly outlive their implementations. | Whether `adr/NNNN-template.md` (technology) is created in addition to `adr/0000-template.md`. Section-order rules in `CONVENTIONS.md` §ADR Shapes and `AGENTS.md` §Hard rules. |
|
|
110
|
+
| 3 | **Status lifecycle** — full or shorter. | **Full lifecycle.** The `Implemented` rung is cheap and gives a clear "what's shipped" signal. | Status table in `CONVENTIONS.md` §ADR Files and `plan/README.md` §Status semantics. Whether the `Implemented` rung exists at all. |
|
|
111
|
+
| 4 | **Plan folder + integration model.** Q4a: use `plan/todo/` + `plan/done/` or skip. Q4b: how work reaches `main` — **direct-to-main (fast-forward)** or **PR-based (required CI green)**. Asked after Q5, because the Q4b recommendation depends on the multi-agent mode. | **Q4a: use it.** **Q4b: direct-to-main if Q5 = single agent; PR-based if Q5 = multi-agent.** | Whether `plan/` is created. The completion-event sentence in `CONVENTIONS.md` §Plan Folder, `plan/README.md`, `AGENTS.md` §Plan folder. The integration block in `AGENTS.md` / `CONVENTIONS.md` §Git contract. Which variant of `_agent/prompts/autonomous.md` Step 6 is kept (`git merge --ff-only` vs. `gh pr create` → CI → merge). |
|
|
112
|
+
| 5 | **Multi-agent setup** — pick one of three: (1) single agent; (2) multi-agent, shared checkout; (3) multi-agent, separate worktrees / PR branches. The three options differ in LOCKS semantics, WORKLOG layout, and CURRENT_FOCUS handling — switching later is not free. | **Single agent.** Small projects shouldn't pay the coordination cost. | `_agent/ROLES.md` content. `AGENTS.md` §Multi-agent workflow and `CONVENTIONS.md` §Multi-Agent Rules pick one of three variants. Mode 2 turns LOCKS on as a filesystem mutex. Mode 3 sets LOCKS to advisory, adds `_agent/WORKLOG.md merge=union` to `.gitattributes`, gitignores `_agent/CURRENT_FOCUS.md`, and writes `_agent/IN_FLIGHT.md` as the committed cross-worktree dashboard. |
|
|
113
|
+
| 6 | **Git contract** — Conventional Commits, `Rationale:` footer, signed commits, ADR-revision tags, `Co-Authored-By` trailer. | **Conventional Commits ON, `Rationale:` footer ON, signed commits ON, ADR-revision tags OFF, `Co-Authored-By` trailer OFF.** | `AGENTS.md` §Git contract and `CONVENTIONS.md` §Git Contract bullets. |
|
|
114
|
+
| 7 | **Optional artefacts** — `GLOSSARY.md`, `domains/`, technology-ADR template. | **Defer all three.** Add when scale demands (terminology drift, >20 ADRs, technology decisions splitting from product). | Whether those files / directories are created. |
|
|
115
|
+
| 8 | **Verify gate** — what command(s) decide a change is shippable. | *No default — project-specific.* | Whether `_agent/prompts/autonomous.md` is written. The skill **refuses** to write the autonomous prompt without a real verify gate. The Step 4 line of the prompt is filled with your command. |
|
|
116
|
+
| 9 | **Existing-content conflicts** (existing repos only) — current commit format, branch policy, ADR style, status names the new layout must respect. | *No default — project-specific.* Skipped on fresh repos. | Merge behaviour during writes; commit-message notes calling out each compromise. |
|
|
117
|
+
| 10 | **Domain-specific hard rules** to enforce from day one — e.g. vendor-naming restriction, regulated-evidence posture (attribution, retention, e-signatures), language mandate, mandatory user-story personas, separated audit streams. | **None from day one.** Add later when a concrete requirement appears; pre-emptive hard rules accumulate as cruft. | Additional sections in `CONVENTIONS.md` and additional bullets in `AGENTS.md` §Hard rules. |
|
|
118
|
+
|
|
119
|
+
## 4. Output files
|
|
120
|
+
|
|
121
|
+
After sign-off, the skill writes:
|
|
122
|
+
|
|
123
|
+
| File | Source template | Notes |
|
|
124
|
+
|------|-----------------|-------|
|
|
125
|
+
| `CONVENTIONS.md` | `templates/CONVENTIONS.md` | Spec the other files reference. Written first. |
|
|
126
|
+
| `AGENTS.md` | `templates/AGENTS.md` | Hard rules entry point. |
|
|
127
|
+
| `CLAUDE.md` | `templates/CLAUDE.md` | Single line `@AGENTS.md`. |
|
|
128
|
+
| `adr/0000-template.md` | `templates/adr-capability.md` | Capability-ADR template. |
|
|
129
|
+
| `adr/NNNN-template.md` | `templates/adr-technology.md` | Technology-ADR template. Only if Q2 said split. `NNNN` is the project-defined cutoff (default 0100). |
|
|
130
|
+
| `plan/README.md` | `templates/plan-README.md` | Plus empty `plan/todo/.gitkeep` and `plan/done/.gitkeep`. |
|
|
131
|
+
| `_agent/ROLES.md` | `templates/_agent-ROLES.md` | Single `default-agent` by default. |
|
|
132
|
+
| `_agent/LOCKS.md` | `templates/_agent-LOCKS.md` | Empty header. Created only if Q5 enabled LOCKS discipline. |
|
|
133
|
+
| `_agent/WORKLOG.md` | `templates/_agent-WORKLOG.md` | Empty table header. |
|
|
134
|
+
| `_agent/CURRENT_FOCUS.md` | `templates/_agent-CURRENT_FOCUS.md` | Live snapshot, initial state "none". |
|
|
135
|
+
| `_agent/HANDOFF.md` | `templates/_agent-HANDOFF.md` | Fresh-agent entry point. |
|
|
136
|
+
| `_agent/IN_FLIGHT.md` | `templates/_agent-IN_FLIGHT.md` | Only in Q5 mode 3 (worktree). Committed cross-worktree dashboard. |
|
|
137
|
+
| `.gitattributes` (entry) | (none — inline) | Only in Q5 mode 3: appends `_agent/WORKLOG.md merge=union`. |
|
|
138
|
+
| `.gitignore` (entry) | (none — inline) | Only in Q5 mode 3: adds `_agent/CURRENT_FOCUS.md` so it stays local-only. |
|
|
139
|
+
| `INDEX.md` | (none — generated) | Stub header + empty table. |
|
|
140
|
+
| `_agent/prompts/autonomous.md` | `templates/_agent-prompts-autonomous.md` | Only if Q8 confirmed a verify gate. |
|
|
141
|
+
|
|
142
|
+
## 5. After scaffolding
|
|
143
|
+
|
|
144
|
+
The repo is now ready for ADR-driven work. Typical first steps:
|
|
145
|
+
|
|
146
|
+
1. **Author the first ADR.** Copy `adr/0000-template.md` to
|
|
147
|
+
`adr/0001-<slug>.md`. Fill in Context, Capability statement, User
|
|
148
|
+
stories, Acceptance criteria. Set status to `Proposed`.
|
|
149
|
+
2. **Get it Accepted.** Update Approvals table, change status to
|
|
150
|
+
`Accepted`, regenerate `INDEX.md`.
|
|
151
|
+
3. **Queue the work.** Create `plan/todo/0001-<slug>.md` naming the
|
|
152
|
+
owning ADR, scope, exit criteria. Lower-numbered files run first.
|
|
153
|
+
4. **Implement.** Code against the ADR's numbered acceptance criteria.
|
|
154
|
+
Add tests that map back to those criteria.
|
|
155
|
+
5. **Integrate.** Per the Q4b integration model: fast-forward to
|
|
156
|
+
`main` and push (direct-to-main), or open a PR, wait for CI green,
|
|
157
|
+
and merge (PR-based).
|
|
158
|
+
6. **Ship.** Once on `main`:
|
|
159
|
+
`git mv plan/todo/0001-<slug>.md plan/done/<YYYY-MM-DD>-<slug>.md`,
|
|
160
|
+
amend the file with a "Shipped at HEAD `<sha>`" footer, advance the
|
|
161
|
+
ADR's `status:` from `Accepted` to `Implemented`, regenerate
|
|
162
|
+
`INDEX.md`, append a row to `_agent/WORKLOG.md`.
|
|
163
|
+
|
|
164
|
+
## 5a. Lifecycle skills
|
|
165
|
+
|
|
166
|
+
The manual workflow in §5 is exactly what the lifecycle skills
|
|
167
|
+
automate. They all share three properties: they **read `CONVENTIONS.md`
|
|
168
|
+
first** and honour the repo's recorded choices (ADR shape, status
|
|
169
|
+
lifecycle, integration model, multi-agent mode); they **refuse on an
|
|
170
|
+
un-bootstrapped repo** and point at `/bootstrap`; and they keep
|
|
171
|
+
`INDEX.md` and the `_agent/` coordination files in sync as a side
|
|
172
|
+
effect.
|
|
173
|
+
|
|
174
|
+
| Skill | Replaces these manual steps |
|
|
175
|
+
|-------|------------------------------|
|
|
176
|
+
| `/new-adr` | §5 steps 1–2: pick number, choose shape, fill template, set `Proposed`, regen INDEX, wire domain README, supersede linkage. Offers to walk to `Accepted` and to create the plan item. |
|
|
177
|
+
| `/new-plan` | §5 step 3: create `plan/todo/NNNN`, name owning ADR(s), scope, exit criteria, dependencies, queue position. |
|
|
178
|
+
| `/ship-item` | §5 steps 5–6: verify gate → integrate (ff or PR per Q4b) → `git mv` todo→done with footer → ADR `Accepted`→`Implemented` → regen INDEX → WORKLOG → live snapshot. The most order-sensitive operation; let the skill do it. |
|
|
179
|
+
| `/add-convention` | Assesses whether a convention is worth codifying (triages out one-offs, duplicates, churn-prone, vague), routes it to AGENTS.md / CONVENTIONS.md / GLOSSARY / an ADR, then writes it. |
|
|
180
|
+
| `/audit` | Lints the repo against its own conventions and reports a punch list — numbering, INDEX sync, plan coverage, section completeness, status validity, cross-refs, language mandate, and **ADR-privacy leaks into user-visible code**. Offers to fix the mechanical issues. |
|
|
181
|
+
| `/brainstorm` | Decomposes a problem into candidate ADRs + plan items with dependency edges and ordering. Proposes drafts only; writes nothing until approved, then hands off to `/new-adr` and `/new-plan`. |
|
|
182
|
+
| `/agent-wave` | Orchestrates parallel worktree subagents over the queue. Asks wave width, budget (items/waves; hours as a soft cap), and supervision (checkpoint vs. continuous). Requires multi-agent mode; refuses mode 1. |
|
|
183
|
+
|
|
184
|
+
### agent-wave: what it can and can't do
|
|
185
|
+
|
|
186
|
+
In-session subagents are bounded by the session, not by wall-clock
|
|
187
|
+
hours. `/agent-wave` therefore measures budget in **items and waves**,
|
|
188
|
+
with hours as a *soft cap*. For a genuinely long-running, session-
|
|
189
|
+
outliving fleet, schedule `_agent/prompts/autonomous.md` via
|
|
190
|
+
`/schedule` (or use remote agents) instead — `/agent-wave` points you
|
|
191
|
+
there rather than over-promising.
|
|
192
|
+
|
|
193
|
+
It requires a multi-agent mode (Q5 mode 2 or 3) and works best in mode
|
|
194
|
+
3 (separate worktrees), where each subagent gets an isolated checkout.
|
|
195
|
+
Continuous-unsupervised runs are recommended only with PR-based
|
|
196
|
+
integration, so CI gates each merge.
|
|
197
|
+
|
|
198
|
+
## 6. Customising or extending
|
|
199
|
+
|
|
200
|
+
The templates are deliberately small and self-contained. To customise:
|
|
201
|
+
|
|
202
|
+
- **Edit a template.** Files in `skills/bootstrap/templates/` are read
|
|
203
|
+
verbatim by the `bootstrap` skill, then placeholders are filled from
|
|
204
|
+
the assessment answers. Change the template, the next bootstrap
|
|
205
|
+
reflects it.
|
|
206
|
+
- **Add a new template.** Put it in `skills/bootstrap/templates/` and
|
|
207
|
+
reference it from `bootstrap/SKILL.md` §Step 5 (Output sequence).
|
|
208
|
+
- **Tighten a skill's auto-trigger.** Edit the `description:`
|
|
209
|
+
frontmatter in that skill's `SKILL.md`. Skills match user requests
|
|
210
|
+
against this string — be specific about phrasings, be terse about
|
|
211
|
+
scope. With several skills in one plugin, watch for trigger collision
|
|
212
|
+
(e.g. "add a convention" vs. "add an ADR") and keep descriptions
|
|
213
|
+
distinct; the slash commands are the unambiguous entry point.
|
|
214
|
+
- **Add a new lifecycle skill.** Create `skills/<name>/SKILL.md`. Follow
|
|
215
|
+
the shared pattern: a Step 0 that checks the repo is bootstrapped and
|
|
216
|
+
reads `CONVENTIONS.md`, then act in a way that honours the recorded
|
|
217
|
+
choices. Lifecycle skills act on the target repo's own files (e.g. its
|
|
218
|
+
`adr/0000-template.md`), so they need no templates of their own.
|
|
219
|
+
- **Fork the plugin.** This repo is small enough to fork and host
|
|
220
|
+
internally if you want a private convention set.
|
|
221
|
+
|
|
222
|
+
## 7. Re-running
|
|
223
|
+
|
|
224
|
+
The skill is idempotent in spirit, but be careful: re-running on a
|
|
225
|
+
repo that already has scaffolded files will trigger the "existing
|
|
226
|
+
repo" path and ask Q9 about conflicts. Use it intentionally — to add
|
|
227
|
+
the parts you skipped the first time, not to wipe and rebuild.
|
|
228
|
+
|
|
229
|
+
## 8. Updating the plugin
|
|
230
|
+
|
|
231
|
+
### As a recipient (someone who installed the plugin)
|
|
232
|
+
|
|
233
|
+
When the plugin author pushes changes, refresh your installation:
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
/plugin marketplace update evolvehq
|
|
237
|
+
/plugin install docflow@evolvehq
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The first command pulls the latest marketplace listing (a `git fetch`
|
|
241
|
+
behind the scenes against the marketplace repo). The second reinstalls
|
|
242
|
+
the plugin at its now-current version. To pick up the changes in an
|
|
243
|
+
*already-running* Claude Code session, run `/reload-plugins` instead
|
|
244
|
+
of restarting.
|
|
245
|
+
|
|
246
|
+
To check what's installed and the resolved version:
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
/plugin list
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
To remove the plugin entirely:
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
/plugin uninstall docflow@evolvehq
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### As the author (you, maintaining this repo)
|
|
259
|
+
|
|
260
|
+
1. Edit a skill body (`skills/<name>/SKILL.md`), the bootstrap templates
|
|
261
|
+
(`skills/bootstrap/templates/*.md`), or supporting docs.
|
|
262
|
+
2. Bump the `version` field in `.claude-plugin/plugin.json` following
|
|
263
|
+
semver — patch for fixes, minor for new questions / templates,
|
|
264
|
+
major for breaking changes to the skill flow.
|
|
265
|
+
3. Update this `USAGE.md` and `README.md` if behaviour changed.
|
|
266
|
+
4. Commit with a Conventional Commit message
|
|
267
|
+
(`feat(skill): ...`, `fix(template): ...`, `docs: ...`).
|
|
268
|
+
5. Push to `origin/main`. Recipients refresh per the section above.
|
|
269
|
+
|
|
270
|
+
If you tag releases, use `git tag vX.Y.Z` matching `plugin.json`.
|
|
271
|
+
Tags help recipients pin to a specific version via
|
|
272
|
+
`/plugin install docflow@evolvehq@vX.Y.Z` (when supported by their
|
|
273
|
+
Claude Code version).
|
|
274
|
+
|
|
275
|
+
## 9. Troubleshooting
|
|
276
|
+
|
|
277
|
+
- **Skill not appearing in the available-skills list.** Confirm the
|
|
278
|
+
plugin is installed (`/plugin list`) or `--plugin-dir` was passed.
|
|
279
|
+
Restart the Claude Code session.
|
|
280
|
+
- **Slash command not found.** The bootstrap slash form is `/bootstrap`
|
|
281
|
+
(lowercase); lifecycle commands are `/new-adr`, `/new-plan`,
|
|
282
|
+
`/ship-item`, `/add-convention`, `/audit`, `/brainstorm`,
|
|
283
|
+
`/agent-wave`.
|
|
284
|
+
- **Skill asks questions the project already answered.** That's by
|
|
285
|
+
design — the skill does not persist state between invocations.
|
|
286
|
+
Answer briefly; the second run is faster.
|
|
287
|
+
- **Existing repo merge looks wrong.** Stop and surface it. The skill
|
|
288
|
+
is instructed to preserve existing content; if it overwrote
|
|
289
|
+
something, that's a bug — file an issue with the merge diff.
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@evolvehq/docflow",
|
|
3
|
+
"version": "0.4.3",
|
|
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
|
+
"keywords": [
|
|
6
|
+
"pi-package",
|
|
7
|
+
"adr",
|
|
8
|
+
"architecture-decision-records",
|
|
9
|
+
"documentation",
|
|
10
|
+
"claude-code"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "Eugenio Minardi",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/EvolveHQ/docflow.git"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/EvolveHQ/docflow",
|
|
19
|
+
"files": [
|
|
20
|
+
"skills/",
|
|
21
|
+
"README.md",
|
|
22
|
+
"USAGE.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"pi": {
|
|
29
|
+
"skills": ["./skills"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: add-convention
|
|
3
|
+
description: Assess and add a CONVENTION (a reusable rule, practice, or naming/process standard) to a documentation-led repo — decides FIRST whether it is worth codifying at all, then routes it to the right home (AGENTS.md hard rule, CONVENTIONS.md guidance, GLOSSARY term, or to /new-adr if it is really a one-off decision). Pushes back on premature or duplicate conventions. Use when the user says "add a convention", "make this a rule", "document this practice", "we should always X", or invokes /add-convention. NOT for recording a single architectural/product decision (use /new-adr) and NOT for queueing work (use /new-plan).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# add-convention
|
|
7
|
+
|
|
8
|
+
Add a convention — but only after assessing whether it should exist and
|
|
9
|
+
where it belongs. This skill is a gatekeeper and a router, not a
|
|
10
|
+
stenographer.
|
|
11
|
+
|
|
12
|
+
## Step 0 — Preconditions and context
|
|
13
|
+
|
|
14
|
+
1. Confirm the repo is bootstrapped.
|
|
15
|
+
2. Read `CONVENTIONS.md` and `AGENTS.md` in full so you can detect
|
|
16
|
+
overlap with existing rules and judge fit.
|
|
17
|
+
|
|
18
|
+
## Step 1 — Assess: is this worth codifying?
|
|
19
|
+
|
|
20
|
+
Apply triage. Recommend **against** adding when:
|
|
21
|
+
- It is already covered (explicitly or implicitly) by an existing
|
|
22
|
+
convention — point to it instead of duplicating.
|
|
23
|
+
- It is a one-off, not a recurring decision — codifying it adds noise.
|
|
24
|
+
- It is likely to churn — premature rules become stale cruft.
|
|
25
|
+
- It is too vague to be testable or actionable as written.
|
|
26
|
+
|
|
27
|
+
Recommend **for** adding when it is a recurring decision whose ambiguity
|
|
28
|
+
causes rework, it is stable, and it can be stated so an agent can follow
|
|
29
|
+
it without further interpretation. State your recommendation and the
|
|
30
|
+
reason before doing anything.
|
|
31
|
+
|
|
32
|
+
## Step 2 — Route: where does it belong?
|
|
33
|
+
|
|
34
|
+
Decide the home, and explain the choice:
|
|
35
|
+
- **Hard rule agents must obey** → a bullet in `AGENTS.md` §Hard rules,
|
|
36
|
+
with the substance in `CONVENTIONS.md`. Use for non-negotiable
|
|
37
|
+
constraints.
|
|
38
|
+
- **Authoring / process guidance** → a section in `CONVENTIONS.md`.
|
|
39
|
+
Use for "how we do things" that informs but doesn't gate.
|
|
40
|
+
- **Shared term / definition** → `GLOSSARY.md` (if the repo has one).
|
|
41
|
+
- **It is actually a decision, not a convention** (an architectural,
|
|
42
|
+
product, or technology choice with alternatives and consequences) →
|
|
43
|
+
this is an ADR. Stop and offer the **new-adr** skill; do not bury a
|
|
44
|
+
decision in
|
|
45
|
+
CONVENTIONS.
|
|
46
|
+
|
|
47
|
+
If a convention is a triage/process rule (e.g. how incoming work is
|
|
48
|
+
triaged), prefer `CONVENTIONS.md` with a hard-rule bullet in AGENTS.md
|
|
49
|
+
only for the parts that are non-negotiable.
|
|
50
|
+
|
|
51
|
+
## Step 3 — Draft and confirm
|
|
52
|
+
|
|
53
|
+
Draft the exact wording for its home file. Keep it tight, testable, and
|
|
54
|
+
in the repo's language. Show the diff. Confirm before writing.
|
|
55
|
+
|
|
56
|
+
## Step 4 — Write and commit
|
|
57
|
+
|
|
58
|
+
Apply the edit(s). If a convention rises to a hard rule, ensure
|
|
59
|
+
`AGENTS.md` and `CONVENTIONS.md` stay consistent. Conventional Commit
|
|
60
|
+
(`docs: ...`); no ADR touched means no `Rationale:` footer is required,
|
|
61
|
+
but add one if the repo's contract asks for it on convention changes.
|