@rasensio/aidlc-content 1.61.0 → 1.63.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/docs/lifecycle.md CHANGED
@@ -147,7 +147,9 @@ instance changed the same requirement first, its revision no longer matches the
147
147
  completion is not recorded, and nothing is written. That is the whole conflict rule — a requirement is
148
148
  never silently overwritten. `aidlc spec fold <instance> --dry-run` runs the same check any time before.
149
149
  An instance with no delta completes exactly as before; nothing was back-filled, so the corpus starts
150
- empty and grows.
150
+ empty and grows. A `## Spec delta` section that holds only prose — "None." and the reason — counts as
151
+ no delta. One with nothing in it, or whose only block headings sit inside a code fence or at the wrong
152
+ level, is still an error, because that is a delta someone meant to write.
151
153
 
152
154
  **Before code is written**, `aidlc cross-check <instance>` reads `requirements.md`, `design.md` and
153
155
  `tasks.md` side by side. `aidlc review` reads one artifact at a time, so a criterion design forgot, or a
package/docs/roadmap.md CHANGED
@@ -143,21 +143,36 @@ Each item goes through these steps:
143
143
 
144
144
  1. **Pick.** `aidlc roadmap next` names the next ready backlog item.
145
145
  2. **Build.** `aidlc start … --worktree --roadmap-item <item>` creates the instance in its own
146
- worktree, then the configured agent runs there with `AIDLC_UNATTENDED=1`. The agent follows the
147
- unattended rule and stops at the release boundary, or parks the item on a hard stop. A start that
146
+ worktree, then the configured agent runs there with `AIDLC_UNATTENDED=1` and `AIDLC_PAUSE_AFTER`
147
+ set to the phases it must stop after. The agent follows the unattended rule and stops at a review
148
+ boundary or the release boundary, or parks the item on a hard stop. A start that
148
149
  fails parks the item with `parked — could not start: <error>` and autopilot goes straight on to
149
150
  the next ready item; the parked one does not count toward `--items`. Retrying the same item every
150
151
  pass is what held a whole `--all` run on one item for five hours.
151
- 3. **PR and CI.** Autopilot pushes the branch and opens the pull request. Green checks queue it;
152
+ 3. **Your review, after each paused phase.** When a phase in `pause_after` is complete and
153
+ unapproved, the item waits as `awaiting-review` — not parked. Read the artifact in the item's
154
+ worktree, then `aidlc autopilot approve <instance>`; the next pass waits at the next paused
155
+ phase, opens the pull request, or relaunches the agent to carry on. Autopilot reads the phase
156
+ files, not the agent's word, so an agent that runs past a pause still cannot reach a pull request.
157
+ A waiting item holds no build slot, so the run keeps starting others, and it keeps the run alive
158
+ so there is something to carry it on after you approve.
159
+ 4. **PR and CI.** Autopilot pushes the branch and opens the pull request. Green checks queue it;
152
160
  a failure relaunches the agent once with the failing checks, and a second failure parks the item.
153
- 4. **Up to date with main.** Before merging, autopilot merges `origin/main` into the branch in the
161
+ 5. **Your merge, where the stop is the pull request** (the default). Green CI leaves the item as
162
+ `awaiting-merge` and autopilot neither merges nor releases. When you merge, it closes the instance
163
+ out on main — pull, mark the deployment record complete, `aidlc transition`, commit, push — and
164
+ runs no release; if the instance is already closed there, it just stops tracking it. Close the
165
+ pull request without merging and it stops tracking it too. That pull request is yours while it
166
+ waits: autopilot does not bring it up to date with main or chase its CI.
167
+ 6. **Up to date with main**, for an item autopilot merges itself. Before merging, it merges
168
+ `origin/main` into the branch in the
154
169
  item's worktree — locally, so the repository's `merge=union` rules apply — pushes, and waits for
155
170
  CI on the new head. A conflict goes back to the item's agent to resolve, twice at most, then the
156
171
  item is parked. A pull request with no checks that GitHub reports as conflicting is handled the
157
172
  same way: GitHub runs no checks on a conflicting PR, so waiting for them would wait forever.
158
- 5. **Merge and release**, one at a time, never while a release workflow is running: merge the exact
159
- commit CI passed (`--match-head-commit`), pull `main`, run the release step, then
160
- `aidlc transition` to close the instance. A failure halts the queue. Running
173
+ 7. **Merge and release**, one at a time, never while a release workflow is running: merge the exact
174
+ commit CI passed (`--match-head-commit`), pull `main`, run the release step when the item's stop
175
+ is `release`, then `aidlc transition` to close the instance. A failure halts the queue. Running
161
176
  `aidlc autopilot run` again retries a failure that came before the merge; from the pull onward
162
177
  nothing is retried — a half-finished release is for a person.
163
178
 
@@ -167,7 +182,7 @@ never edits a rank or a dependency: deciding what is agreed work stays a person'
167
182
 
168
183
  **Setup** comes first, once per machine. A plain `aidlc init` ends by asking "Set up autopilot now?"
169
184
  (default no); `aidlc init --autopilot` skips that question, and `aidlc autopilot setup` asks the same
170
- four questions on its own. Each is a list with one choice marked recommended:
185
+ six questions on its own. Each is a list with one choice marked recommended:
171
186
 
172
187
  - **The agent, and what it may do.** Claude Code limited to editing files and running git, pnpm,
173
188
  node and read-only shell tools (recommended); Claude Code with full access; Codex in full-auto
@@ -176,38 +191,63 @@ four questions on its own. Each is a list with one choice marked recommended:
176
191
  `--non-interactive`.
177
192
  - **How many items build at once** — two (recommended) or one.
178
193
  - **A cost cap per item** — an item past it is stopped and parked.
194
+ - **Which phases to pause after for your review** — after requirements and design (recommended),
195
+ after design only, or no pauses. These are the two phases whose output decides the shape of the
196
+ code.
197
+ - **How far autopilot takes each item** — open the pull request and wait for you to merge it
198
+ (recommended); merge when CI passes with no release; or merge and run the release step below.
179
199
  - **The release step.** In a project with `scripts/autopilot-release.sh`, running it after each
180
200
  merge (recommended); otherwise merge only, and you release when you choose. This repository's
181
201
  script runs `release-bookkeeping --write`, commits the manifest and `.aidlc`, and runs
182
- `scripts/release.sh` with the bump bookkeeping printed.
202
+ `scripts/release.sh` with the bump bookkeeping printed. It runs only for an item whose stop is
203
+ `release`.
183
204
 
184
- Flags skip the questions: `--agent`, `--parallel`, `--cost-cap <usd|none>`, `--release
185
- <repo-script|merge-only>`. `aidlc autopilot setup` writes all four answers to
205
+ Flags skip the questions: `--agent`, `--parallel`, `--cost-cap <usd|none>`, `--pause-after
206
+ <phases|none>`, `--stop-at <pr|merge|release>`, `--release <repo-script|merge-only>`. `aidlc
207
+ autopilot setup` writes every answer to
186
208
  `<git-common-dir>/aidlc/autopilot/config.json`, per machine and never committed, beside autopilot's
187
209
  `state.json`, `run.json`, `logs/`, `STOP` file and, while paused, `paused.json`.
188
210
 
189
- **Team defaults.** The cost cap and the release step are the team's to decide, so `aidlc init` saves
190
- those two in the committed `.aidlc/config.yaml` and the agent and items-at-once on the machine:
211
+ **One run at a time.** `aidlc autopilot run --stop-at <pr|merge|release>` and `--pause-after
212
+ <phases|none>` change the stops for the items that run starts, without touching either saved file.
213
+ Each item records the stops in force when it started and is held to them until it finishes, so a
214
+ later run cannot make an item in flight wait on a phase that completed hours ago. Every run prints a
215
+ `stops:` line saying what applies.
216
+
217
+ **Team defaults.** The cost cap, the stops and the release step are the team's to decide, so
218
+ `aidlc init` saves those in the committed `.aidlc/config.yaml` and the agent and items-at-once on the
219
+ machine:
191
220
 
192
221
  ```yaml
193
222
  # .aidlc/config.yaml
194
223
  autopilot:
195
- cost_cap_usd: 15 # or null for no cap
196
- release: repo-script # or merge-only — a preset name, never a command
224
+ cost_cap_usd: 15 # or null for no cap
225
+ pause_after: [requirements, design] # or [] for no pauses
226
+ stop_at: pr # or merge, or release
227
+ release: repo-script # or merge-only — a preset name, never a command
197
228
  ```
198
229
 
230
+ **Upgrading changes nothing on its own.** A config with no `stop_at` and no `pause_after` behaves
231
+ exactly as it did before stops existed: no pauses, merge and release. Every `aidlc autopilot run`
232
+ prints that in so many words, and names `aidlc autopilot setup` as what changes it. The new defaults
233
+ reach you when you next answer the questions, not behind your back.
234
+
199
235
  A teammate's autopilot follows them without being asked. The machine's own `config.json` wins
200
- wherever it sets the same key, and when init saves a team answer it removes this machine's copy so the
236
+ wherever it sets the same key, and a run's flags win over both; when init saves a team answer it
237
+ removes this machine's copy so the
201
238
  answer takes effect here too. The agent, its permissions and parallelism are read from the machine
202
239
  file only: the same keys in `.aidlc/config.yaml` are ignored, so cloning a repo can never grant an
203
240
  agent full access on your machine. A team value that is not valid — a cap that is not a positive number
204
- or `null`, a release step that is not one of the two names, `repo-script` with no script — is ignored.
241
+ or `null`, a release step that is not one of the two names, `repo-script` with no script, a `stop_at`
242
+ outside the three names, a `pause_after` that is not a list of phase names — is ignored.
205
243
  Re-running `aidlc init` pre-selects every answer in force, and an answer no choice matches is offered as
206
244
  "(current)" and left as it is. `--non-interactive --autopilot` asks nothing, keeps what is there and
207
245
  fills only what is missing with the recommended choice.
208
246
 
209
247
  **Watching and stopping.** `aidlc autopilot status` shows the active run and each item's step, pull
210
- request, CI failure count and last error. `aidlc autopilot stop` (or `/aidlc-autopilot-stop`) ends the
248
+ request, CI failure count and last error, and for an item waiting on you: the phase, its worktree and
249
+ the `aidlc autopilot approve` command, or the pull request number to merge.
250
+ `aidlc autopilot stop` (or `/aidlc-autopilot-stop`) ends the
211
251
  run at its next step: nothing further is started, merged or released, and agents already running
212
252
  finish their item. `aidlc autopilot pause` freezes the run and its agents where they are —
213
253
  for closing a laptop, whose sleep would otherwise cut the agents' network and get their items parked —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "1.61.0",
3
+ "version": "1.63.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7,6 +7,7 @@ Unattended mode is on exactly when the environment variable `AIDLC_UNATTENDED` i
7
7
  - **Default and log** — take the named default, log it, carry on.
8
8
  - **Hard stop** — log it, park the item, release the claim, end the session.
9
9
  - **Release boundary** — the normal end of an unattended run. Not a hard stop, and the item is not parked.
10
+ - **Review boundary** — a planned stop for a person's review, part way through. Not a hard stop, and the item is not parked.
10
11
 
11
12
  A situation no entry below covers is a hard stop. Guessing is what this mode exists to prevent.
12
13
 
@@ -34,6 +35,19 @@ To stop:
34
35
 
35
36
  When testing completes, write the deployment record's release plan and end the session. Do not push, open a pull request, merge or release: whatever runs the agent owns those, and two actors on one release lane is how two releases collided on 2026-10-01.
36
37
 
38
+ ## The review boundary
39
+
40
+ `AIDLC_PAUSE_AFTER` (`printenv AIDLC_PAUSE_AFTER`) is a comma-separated list of phase names, set by whatever runs the agent. Empty or unset names none, and every phase boundary is the `phase-end-turn` default: carry on.
41
+
42
+ When it names the phase that just completed, that boundary is a **review boundary**. A person reads the artifact and approves it; the run carries the work on afterwards, in a later session. So:
43
+
44
+ 1. Append the log entry.
45
+ 2. Commit on the instance branch. Never push, open a pull request, merge or release.
46
+ 3. Run `aidlc release <instance>` — a review can outlast the claim's 60-minute staleness, and the next session must not find a claim it has to override.
47
+ 4. End the session. Do **not** park the item: it is waiting, not failed.
48
+
49
+ Nothing else changes: the phase is completed and transitioned as usual first, so the next session resumes from the next phase.
50
+
37
51
  ## Every known stop
38
52
 
39
53
  Each bullet begins with its one outcome; a condition after it is part of the rule.
@@ -48,7 +62,8 @@ Each bullet begins with its one outcome; a condition after it is part of the rul
48
62
  - `open-question` — **default and log**: the recommended option, marked `(unattended default)`; if it is a hard-stop class, hard stop — never another option.
49
63
  - `requirements-confirmation` — **default and log**: hard stop if the requirements exceed the roadmap item.
50
64
  - `design-confirmation` — **default and log**: the same scope test.
51
- - `phase-end-turn` — **default and log**: continue into the next phase.
65
+ - `phase-end-turn` — **default and log**: continue into the next phase, unless `AIDLC_PAUSE_AFTER` names the phase just completed, which is a review boundary.
66
+ - `review-boundary` — **review boundary**: `AIDLC_PAUSE_AFTER` names the phase just completed.
52
67
  - `fresh-session` — **default and log**: continue; the runner decides where sessions start.
53
68
  - `own-change-revert` — **default and log**: reverting this session's own change, after keeping a copy.
54
69
  - `generated-output-discard` — **hard stop**: discarding output this session did not write.
@@ -9,7 +9,7 @@ trigger: When the user asks to do, work, build or ship the next n backlog items,
9
9
 
10
10
  ## Purpose
11
11
 
12
- Turn "do the next 3 items" into one background run. The run builds each ready backlog item in its own worktree with an unattended agent, opens a pull request, waits for CI, merges, and runs the configured release step — one item at a time through the merge.
12
+ Turn "do the next 3 items" into one background run. The run builds each ready backlog item in its own worktree with an unattended agent, opens a pull request, waits for CI, and goes as far as the user's stop settings allow — one item at a time through the merge. By default it pauses for a review after requirements and after design, and stops at the pull request for the user to merge.
13
13
 
14
14
  The CLI does the work. This skill starts it and says how to watch and stop it. Do not build the items yourself in this session.
15
15
 
@@ -30,20 +30,28 @@ The CLI does the work. This skill starts it and says how to watch and stop it. D
30
30
  - *a run is already active* → report its pid and offer `aidlc autopilot stop` first.
31
31
  - *the run is paused* → offer `aidlc autopilot resume`.
32
32
 
33
- 5. **Report**, in five short lines: what it is doing (how many items), the log file it printed, `aidlc autopilot status` to watch, `aidlc autopilot pause` before the machine sleeps (`aidlc autopilot resume` after), and `/aidlc-autopilot-stop` (or `aidlc autopilot stop`) to stop.
33
+ 5. **Report**, in six short lines: what it is doing (how many items), the `stops:` line `run` printed verbatim, the log file, `aidlc autopilot status` to watch, `aidlc autopilot pause` before the machine sleeps (`aidlc autopilot resume` after), and `/aidlc-autopilot-stop` (or `aidlc autopilot stop`) to stop. When the stops line says none are set, say plainly that every item will be merged and released with no review, and name `aidlc autopilot setup` as what changes that.
34
34
 
35
- 6. **Pause and resume.** When the user is stepping away or closing the laptop, run `aidlc autopilot pause`; when they are back, `aidlc autopilot resume`. Report what each printed. If pause says a pass is in progress — a merge or a release — run it again a minute later rather than stopping the run.
35
+ 6. **Where it stops for a person.** Two stops, both set in `aidlc autopilot setup` or `aidlc init` and on by default:
36
+ - **After a phase** — the agent stops when a phase in `pause_after` completes (requirements and design by default). The item waits as `awaiting-review`; it is *not* parked. The user reads the artifact in the item's worktree, then `aidlc autopilot approve <instance>` carries it on.
37
+ - **At the pull request** — autopilot opens it and waits for the user to merge. Merging is the approval: autopilot then closes the instance out on main and runs no release.
38
+
39
+ One run can change both without touching the saved setup: `aidlc autopilot run --items 3 --stop-at merge` or `--pause-after design` (`--pause-after none` for no pauses, `--stop-at release` for the old merge-and-release). The flags apply to the items that run starts; an item already in flight keeps the stops it started with. A config saved before stops existed keeps today's behaviour — no pauses, merge and release — until somebody sets them.
40
+
41
+ When the user asks what is waiting for them, run `aidlc autopilot status`: it names the phase, the worktree and the exact approve command for each waiting item.
42
+
43
+ 7. **Pause and resume.** When the user is stepping away or closing the laptop, run `aidlc autopilot pause`; when they are back, `aidlc autopilot resume`. Report what each printed. If pause says a pass is in progress — a merge or a release — run it again a minute later rather than stopping the run.
36
44
 
37
45
  ## What the run does on its own
38
46
 
39
47
  - Takes items in `aidlc roadmap next` order. Builds at most two at once, and never more than the count asked for.
40
- - Parks an item (moves it to `hold/` with a reason) when its agent stops short, when CI fails twice, or when it passes the cost cap.
48
+ - Parks an item (moves it to `hold/` with a reason) when its agent stops short of a stop it was told to reach, when CI fails twice, or when it passes the cost cap. An item waiting for a person is never parked, and holds no build slot, so the run goes on starting others.
41
49
  - An agent that loses the network exits, and is parked. Sleep cuts the network, so a run on a laptop needs `aidlc autopilot pause` first: it freezes the run and its agents where they are, and `aidlc autopilot resume` carries on.
42
50
  - Before each merge, brings the item's branch up to date with main and waits for CI on the new head. A conflict with main goes back to the item's agent, twice at most, then the item is parked. A pull request someone merged by hand is dropped from tracking.
43
51
  - Halts the merge queue when a step fails. Running `aidlc autopilot run` again retries a failure that came before the merge; a failed release is for a person — `aidlc autopilot status` shows the error. `aidlc autopilot forget <instance>` stops tracking an item finished by hand.
44
- - Ends when the asked-for items are each released or parked, or, with `--all`, when nothing is ready and nothing is in flight.
52
+ - Ends when the asked-for items are each released or parked, or, with `--all`, when nothing is ready and nothing is in flight. An item waiting for a person keeps its run alive, so the run is still there to carry the item on after an approval or a merge.
45
53
 
46
54
  ## Exit Criteria
47
55
 
48
56
  - `aidlc autopilot run` has started a run, or its refusal has been reported with the one command that fixes it
49
- - The user knows where the log is, how to watch, how to pause, and how to stop
57
+ - The user knows where it will stop for them, where the log is, how to watch, how to pause, and how to stop