@baldurpan/create-ai-workflow 0.3.0 → 0.4.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 CHANGED
@@ -39,7 +39,7 @@ starting point — nothing has to be looked up first.
39
39
  | `/feature-status` | read-only. Reconciles the ledger against the repo, then names **exactly one** next action |
40
40
  | `/feature-close` | retires a feature: a `history.md` row, a `git mv` into `archive/`, and a reviewed reference sweep |
41
41
  | `/orchestrate` | one ad-hoc, commit-sized change through the same gates — no entry, no ledger |
42
- | `/onboard` | fills in your own stubs, running each verification command before writing it down |
42
+ | `/onboard` | fills in your own stubs, adopting what the repo already documented and running each verification command before writing it down |
43
43
 
44
44
  ## What makes it different
45
45
 
@@ -77,6 +77,12 @@ CLAUDE.md a single @AGENTS.md line, and only when the file does not exist
77
77
 
78
78
  Nothing is committed. Review the diff yourself.
79
79
 
80
+ **Onto a repository that already documents itself**, the installer only appends — your existing
81
+ `AGENTS.md` prose is left exactly where it is. `/onboard` reconciles the two afterwards: it classifies
82
+ each existing claim into `stack.md`, `verify.md` or `executors.md`, asks wherever a destination is
83
+ unclear or the old text contradicts the installed workflow, and prunes the source only once the
84
+ replacement is written and shown.
85
+
80
86
  ### The ownership boundary is a data structure, not a rule
81
87
 
82
88
  `context/.state/manifest.json` lists every tool-owned file with its hash. `update` walks that manifest —
@@ -71,6 +71,10 @@ export function install(root) {
71
71
  info(bold('Next'));
72
72
  info(` 1. Review the diff. ${dim('Nothing was committed — that is deliberate.')}`);
73
73
  info(` 2. Run ${cyan('/onboard')} in your agent to fill in verify.md, executors.md and stack.md.`);
74
+ if (before !== null) {
75
+ info(dim(' AGENTS.md already said things of its own — /onboard folds those into the three files\n' +
76
+ ' above and prunes what it moved, asking before anything is deleted.'));
77
+ }
74
78
  info(` 3. ${cyan('/roadmap "some idea"')} starts the loop.`);
75
79
  return 0;
76
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baldurpan/create-ai-workflow",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Overlay a tiered planning workflow — roadmap, plans, phase ledgers, verification gates — onto an existing repository, for coding agents.",
5
5
  "keywords": [
6
6
  "ai",
@@ -12,7 +12,7 @@ the standing rules, and every command cites it rather than restating it.
12
12
  | `/feature-status` | read-only "where do things stand". **Never a prerequisite** for anything |
13
13
  | `/feature-close` | retires a finished or abandoned feature into `context/archive/` |
14
14
  | `/orchestrate` | one ad-hoc, gated, commit-sized change — no roadmap entry, no ledger |
15
- | `/onboard` | fills in this project's own stubs: `verify.md`, `executors.md`, `stack.md` |
15
+ | `/onboard` | fills in this project's own stubs `verify.md`, `executors.md`, `stack.md` — adopting what an existing `AGENTS.md` already said |
16
16
 
17
17
  | Read | For |
18
18
  |---|---|
@@ -35,7 +35,7 @@ never a prerequisite for anything.
35
35
  | `/feature-status` | nothing — read-only | — |
36
36
  | `/feature-close` | Tier 2 → retired | `history.md`, `archive/`, the reference sweep |
37
37
  | `/orchestrate` | one ad-hoc gated change | the code, and `findings.md` |
38
- | `/onboard` | the project-owned stubs | `verify.md`, `executors.md`, `stack.md` |
38
+ | `/onboard` | the project-owned stubs | `verify.md`, `executors.md`, `stack.md`, and the pruning of what they replace |
39
39
 
40
40
  ## One source of truth per fact
41
41
 
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: onboard
3
- description: "Fill in this project's own workflow stubs — context/verify.md, context/executors.md and context/stack.md — by asking, and by running each candidate verification command and keeping only the ones that pass. Explicit invocation only — run this when the user types /onboard. Do NOT match on 'set up the project', 'get started', or general setup requests."
3
+ description: "Fill in this project's own workflow stubs — context/verify.md, context/executors.md and context/stack.md — by adopting what the repository already documented, asking wherever a claim's destination is unclear, and running each candidate verification command so only the ones that pass are written down. Explicit invocation only — run this when the user types /onboard. Do NOT match on 'set up the project', 'get started', or general setup requests."
4
4
  ---
5
5
 
6
6
  # /onboard
7
7
 
8
- Fills the project-owned stubs the installer deliberately left empty. **Re-runnable** run it again after
9
- the stack changes, and it re-proposes against what is there now.
8
+ Fills the project-owned stubs the installer deliberately left empty, and folds whatever the repository
9
+ already documented into them. **Re-runnable** — run it again after the stack changes, and it re-proposes
10
+ against what is there now.
10
11
 
11
12
  **Asking is not guessing.** The installer could have detected a test command and written it in; that is
12
13
  exactly how a file ends up naming a command that has never run. This command asks, and where it can, it
@@ -21,10 +22,52 @@ Read [`context/workflow.md`](../../../context/workflow.md) for the tier model.
21
22
  | [`context/verify.md`](../../../context/verify.md) | the real Lint / Typecheck / Build / Test commands — **only ones that exited 0** |
22
23
  | [`context/executors.md`](../../../context/executors.md) | how this project dispatches a coder and a reviewer |
23
24
  | [`context/stack.md`](../../../context/stack.md) | runtime, layout, conventions |
25
+ | [`AGENTS.md`](../../../AGENTS.md) | pruned, on confirmation, of what moved into those three. The region between the `ai-workflow` markers is never touched |
24
26
 
25
27
  Show every proposed edit before writing it, and **do not commit.** The user reviews and commits.
26
28
 
27
- ## Step 1 — Coder dispatch
29
+ ## Step 1 — Adopt what the repository already says
30
+
31
+ The installer appends its block to `AGENTS.md` and leaves the rest of that file alone, so a repository that
32
+ documented itself before the overlay arrived now states some of the same things twice, in two places, with
33
+ no rule about which wins. Resolving that is this step, and it runs first because what turns up here is the
34
+ raw material for every step below.
35
+
36
+ **Read, in this order:** everything in `AGENTS.md` *outside* the `ai-workflow` markers, then `CLAUDE.md`
37
+ apart from its import line. If the repository carries other agent-instruction files — a nested `AGENTS.md`
38
+ under a subdirectory, a directory of per-host instruction files — **list them and stop there.** Say they
39
+ exist and that this command left them alone. A nested file usually scopes to its own subtree, and moving it
40
+ up is a decision rather than a cleanup.
41
+
42
+ Break what you read into claims — a paragraph, a table row, a bullet — and propose a destination for each:
43
+
44
+ | A claim about | Goes to |
45
+ |---|---|
46
+ | what the project is, its layout, its conventions | `context/stack.md` |
47
+ | a lint, typecheck, build or test command | a **candidate** for `context/verify.md` — Step 5 still has to run it |
48
+ | how a coder or a reviewer is dispatched | `context/executors.md` |
49
+ | a rule the bundled standards already state | nowhere — the standards own it. Ask before dropping |
50
+ | planning or review process this workflow now owns | nowhere — superseded. Ask before dropping |
51
+ | anything else — ownership, contacts, external links | stays in `AGENTS.md`, outside the block |
52
+
53
+ **Show the whole table before moving anything**, one row per claim, and let the user correct any
54
+ destination. Two kinds of row are never decided alone:
55
+
56
+ - **Unsure** — a claim you cannot place, or that fits two files equally well. Ask. Do not quietly pick the
57
+ likelier one: a misfiled convention is a rule nobody reads again.
58
+ - **Contradicts** — the existing prose and the installed workflow give different answers to the same
59
+ question. Where project-local skills live, what the review process is, which file is authoritative.
60
+ **Quote both and ask which stands.** Never resolve one silently in either direction — the older text is
61
+ often right about this project and wrong only about the overlay.
62
+
63
+ An adopted claim is an *input* to the steps below, not a substitute for them. A command lifted out of the
64
+ old file is a candidate like any other and still has to run.
65
+
66
+ **Nothing is deleted here.** Pruning is Step 7, after the destination files exist.
67
+
68
+ On a re-run, a claim its destination file already states is already adopted. Say so in a line and move on.
69
+
70
+ ## Step 2 — Coder dispatch
28
71
 
29
72
  Ask whether implementation runs **in-host** or is **offloaded** to an external coder CLI.
30
73
 
@@ -44,9 +87,9 @@ on that being true, and it is true of some executors and not others.
44
87
  4. If it comes back empty, guessed, or refused, record that **this executor needs content inline** — the
45
88
  one case where a brief carries file contents instead of paths.
46
89
 
47
- Never write down an invocation you have not run. This is the same rule as Step 4, for the same reason.
90
+ Never write down an invocation you have not run. This is the same rule as Step 5, for the same reason.
48
91
 
49
- ## Step 2 — Reviewer dispatch
92
+ ## Step 3 — Reviewer dispatch
50
93
 
51
94
  Ask how Gate 2 should get a review:
52
95
 
@@ -64,7 +107,7 @@ winner: it differs per host and changes underneath you. What ships is the contra
64
107
  Whatever is chosen, that contract stands: a review happens, every blocking finding carries a `P0`–`P3`
65
108
  severity, and a `FAIL` writes a finding before the loopback.
66
109
 
67
- ## Step 3 — Standards source
110
+ ## Step 4 — Standards source
68
111
 
69
112
  `context/standards/` ships with a bundled default. Ask whether that is right for this project.
70
113
 
@@ -75,48 +118,73 @@ severity, and a `FAIL` writes a finding before the loopback.
75
118
  becomes project-owned from that point.
76
119
 
77
120
  Say plainly what the default is and that a wrong set is not inert — agents load from that README's
78
- conditional table unprompted, on every task.
121
+ conditional table unprompted, on every task. If Step 1 turned up house rules that the bundled set already
122
+ covers, this is the moment that matters: keeping both means the project has two answers.
79
123
 
80
- ## Step 4 — Verification commands
124
+ ## Step 5 — Verification commands
81
125
 
82
126
  **This is the most valuable step in this command.** Do it properly.
83
127
 
84
- 1. **Propose candidates.** Read `package.json` scripts, or the stack's equivalent — `Makefile`,
85
- `composer.json`, `pyproject.toml`, `Cargo.toml`, the CI workflow. The CI config is the best source
86
- available: it lists commands that demonstrably run in a clean checkout.
128
+ 1. **Propose candidates.** Take the command claims Step 1 adopted, then read `package.json` scripts, or the
129
+ stack's equivalent — `Makefile`, `composer.json`, `pyproject.toml`, `Cargo.toml`, the CI workflow. The
130
+ CI config is the best source available: it lists commands that demonstrably run in a clean checkout. A
131
+ command the old file named and CI does not is worth asking about — one of the two is stale.
87
132
  2. **Show the candidates and ask** which belong in Lint, Typecheck, Build and Test, and whether anything is
88
133
  missing. Ask about prerequisites too — a package manager version, an install step, a service that must
89
134
  be up.
90
135
  3. **Run each one.** Actually run it, from the repo root.
91
136
  4. **Write only the commands that exited 0.** For each one that failed, show the output and ask: fix it,
92
- replace it, or leave that section empty. **Never write a command that has not passed.** An empty section
93
- is skipped by Gate 1 and says so; a wrong command fails a gate on every task until someone notices.
137
+ replace it, or leave that section empty. **Never write a command that has not passed** an inherited
138
+ one least of all, since it is the likeliest to have rotted. An empty section is skipped by Gate 1 and
139
+ says so; a wrong command fails a gate on every task until someone notices.
94
140
  5. Put anything that needs Docker, a cloud account or a deploy target under **Not run by Gate 1**, so
95
141
  nobody promotes it into a gate section by mistake.
96
142
 
97
143
  Explain what you are doing: this turns `verify.md` from someone's guess into something verified at install
98
144
  time, which is the one moment it is cheap to catch.
99
145
 
100
- ## Step 5 — Stack
146
+ ## Step 6 — Stack
101
147
 
102
- A few questions, then write `context/stack.md`:
148
+ Start from what Step 1 routed here, show it back as a draft, and ask only for the gaps:
103
149
 
104
150
  - What does this project do, in a paragraph — and anything about its history that explains its shape.
105
151
  - Runtime, package manager, database, storage, hosting.
106
152
  - The directories that matter, one line each.
107
153
  - **The conventions that would not be guessed** — what breaks in this runtime, what is deliberately kept
108
154
  separate, where local secrets live, what must never be run against production. This section is the one
109
- that earns its keep; the rest is discoverable.
155
+ that earns its keep; the rest is discoverable. Inherited prose is usually strongest here and weakest at
156
+ describing layout, which drifts.
110
157
 
111
158
  Point out that anything else added under `context/` should be indexed in `stack.md`, not in
112
159
  `context/README.md`, which is tool-owned and replaced on update.
113
160
 
161
+ ## Step 7 — Prune the sources
162
+
163
+ Only now, with the three stubs written, remove from `AGENTS.md` and `CLAUDE.md` what has landed elsewhere.
164
+ Duplication left standing is the failure this step exists to prevent: two statements of one fact drift, and
165
+ the stale copy is indistinguishable from the live one.
166
+
167
+ - **Show the removal as a diff and ask before applying it.** Whole sections at a time, not scattered lines.
168
+ - **Remove only what you can point at.** For each deletion name the file and section that now holds it. A
169
+ claim you could not place stays exactly where it is — an unpruned file is a smaller problem than a lost
170
+ rule.
171
+ - **Never touch the region between the `ai-workflow` markers.** It is tool-owned and replaced on update, so
172
+ an edit there is an edit lost, and nothing migrates into it.
173
+ - What should be left is what only `AGENTS.md` can say: the repository's own front matter, and the block's
174
+ pointer into `context/`.
175
+
176
+ Keeping the original prose in place is a valid answer. If the user chooses it, write one line in
177
+ `context/stack.md` saying which file is authoritative, so the next reader is not left to guess.
178
+
114
179
  ## Rules
115
180
 
181
+ - **Copy before cut.** Nothing leaves `AGENTS.md` until the file that replaces it is written and shown.
116
182
  - **Never write a credential.** Write `$SENTRY_DSN`-style placeholders and name where the real value lives
117
- — this command collects shell commands, which is the most likely place a token appears inline. See the
118
- standing rule in [`context/workflow.md`](../../../context/workflow.md).
183
+ — this command collects shell commands, which is the most likely place a token appears inline. Inherited
184
+ prose gets the same read before it moves. See the standing rule in
185
+ [`context/workflow.md`](../../../context/workflow.md).
119
186
  - **Never write a command you have not run.**
187
+ - **Never delete a claim you could not place.**
120
188
  - **Never touch a tool-owned file.** `README.md`, `workflow.md`, `plan-template*.md` and `roles/` are
121
189
  replaced on the next update; an edit there is an edit lost.
122
190
  - **Do not commit.**