@rasensio/aidlc-content 2.3.0 → 2.5.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
@@ -111,6 +111,9 @@ ran one would be approving its own work, so each refuses — exit code 2, before
111
111
  anything — when stdin is not a terminal or `AIDLC_UNATTENDED=1`, and names the reason. No agent
112
112
  harness gives its shell a terminal, so that check covers every harness. At a terminal they work as
113
113
  they always did; `transition` without `--override` and `amend` without `--confirm` are unaffected.
114
+ `aidlc autopilot review` refuses the same way, by the same terminal check: keeping or promoting the
115
+ calls an unattended run made is a person's verdict on that run. It is not in the approval guard's
116
+ list.
114
117
  In Claude Code the approval guard (`.claude/hooks/aidlc-approval-guard.mjs`, written by
115
118
  `aidlc hook install` and `aidlc init`) blocks the same commands earlier, and blocks file edits to the
116
119
  autopilot approval record. It fails closed: a missing script, a missing `node` or a crash blocks the
@@ -210,11 +210,16 @@ agent follows `.aidlc/resources/rules/unattended.md` instead: each place a skill
210
210
  confirm has one written outcome — take the named default and log it to the instance's
211
211
  `unattended-stops.md`, or hard-stop (constitution, deleting data the session did not create,
212
212
  credentials and permissions, scope beyond the roadmap item), which parks the item and ends the session.
213
+ A situation no stop covers is decided and logged when the choice lies inside the item's "What success
214
+ looks like", as an `interpretation`, a `deviation` or an `open-question`; an open question keeps
215
+ autopilot from merging the pull request until a person has answered, and `aidlc autopilot review`
216
+ walks a person through every logged call.
213
217
  Completing testing is the normal end: the agent writes the release plan and stops, and whatever runs
214
218
  it owns the push, merge and release. The list of stops came from two dry runs on 2026-10-02 that
215
219
  logged the same thirteen on two machines. The mode is a rule the agent reads, not a switch the CLI
216
- reads. Only three commands behave differently when the variable is set: `autopilot approve`,
217
- `transition --override` and `amend --confirm` refuse, because only a person may run them. A branch in
220
+ reads. Only four commands behave differently when the variable is set: `autopilot approve`,
221
+ `autopilot review`, `transition --override` and `amend --confirm` refuse, because only a person may
222
+ run them. A branch in
218
223
  any other command would be a cost every future change pays.
219
224
 
220
225
  ## Where the code lives
@@ -66,6 +66,16 @@ using the same helper as `aidlc doctor`; a real worktree test keeps the raw, una
66
66
  negative control. If you create the worktree with `git worktree add` yourself, run `aidlc doctor`
67
67
  inside it before starting the agent session.
68
68
 
69
+ Inside herdr (`HERDR_ENV=1` and `herdr` on `PATH`), `aidlc start --worktree` goes one step further:
70
+ it opens the new worktree as a background herdr workspace labelled with the instance name, and
71
+ types `cd '<worktree>' && claude "/aidlc-continue <name>"` (or `codex`, per the platform) into its
72
+ root pane. It prints one `Herdr:` line saying what it opened. When herdr fails, takes more than ten
73
+ seconds, or finds the workspace already open, the line carries the command to run instead, and the
74
+ start succeeds as it would have without herdr — failing it would undo a good worktree because a
75
+ terminal multiplexer did not answer. `--no-open` turns it off. Autopilot always passes `--no-open`,
76
+ and `AIDLC_UNATTENDED=1` suppresses it too, because autopilot launches the item's one agent itself
77
+ and a second one in a herdr pane would collide with it. The code is `concurrency/herdr.ts`.
78
+
69
79
  ## Where the code lives
70
80
 
71
81
  - `packages/cli/src/concurrency` — the claim store, staleness logic, and worktree helpers.
@@ -56,6 +56,16 @@ before anything ships. You can pause or stop the run at any time.
56
56
  aidlc autopilot approve <instance>
57
57
  ```
58
58
 
59
+ When an item waits at its pull request with open questions, the agent made calls it
60
+ thinks are yours. In the item's worktree, walk through every call it logged, then merge:
61
+
62
+ ```bash
63
+ aidlc autopilot review <instance>
64
+ ```
65
+
66
+ Keep a call, reject it (then reopen the phase with `aidlc amend <instance> --impact`), or
67
+ promote it into `.aidlc/guidance/decisions.md`, which every later item reads.
68
+
59
69
  6. To freeze the run, for example before you close the laptop, pause it. Resume it later:
60
70
 
61
71
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "bugs": "https://github.com/rasensio/aidlc-feedback/issues",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -5,15 +5,16 @@ This file is the only statement of the rule. Skills point here instead of restat
5
5
  Unattended mode is on exactly when the environment variable `AIDLC_UNATTENDED` is `1` (`printenv AIDLC_UNATTENDED`). Otherwise every skill behaves as written. Nobody answers in this mode, so every place a skill would stop for a person has one outcome:
6
6
 
7
7
  - **Default and log** — take the named default, log it, carry on.
8
+ - **Decide and log** — choose inside the item's scope, log a typed entry, carry on.
8
9
  - **Hard stop** — log it, park the item, release the claim, end the session.
9
10
  - **Release boundary** — the normal end of an unattended run. Not a hard stop, and the item is not parked.
10
11
  - **Review boundary** — a planned stop for a person's review, part way through. Not a hard stop, and the item is not parked.
11
12
 
12
- A situation no entry below covers is a hard stop. Guessing is what this mode exists to prevent.
13
+ A situation no stop below covers is decided and logged when its choice lies inside the roadmap item's "What success looks like". Outside it, or in a hard-stop class, it is a hard stop: guessing about scope is what this mode exists to prevent.
13
14
 
14
15
  ## The log
15
16
 
16
- Append one entry per default or hard stop to `.aidlc/state/<instance>/unattended-stops.md`: a `## <n>. <title> — <slug>` heading, then **Source:** (skill and section, or rule), **Instruction:** (the exact text), **Decided:** (the default, or "hard stop"), **Why:** (why it is safe, or which hard-stop class). A Question Protocol answer also carries `(unattended default)` in its `[Answer]:` — how a reviewer finds every choice nobody made.
17
+ Append one entry per default, decision or hard stop to `.aidlc/state/<instance>/unattended-stops.md`: a `## <n>. <title> — <slug>` heading, then **Source:** (skill and section, or rule), **Instruction:** (the exact text), **Decided:** (the default, the choice, or "hard stop"), **Type:** (`default` for a listed stop or a hard stop; for a decision, `interpretation` — how an unclear requirement was read, `deviation` — where the design was not followed, or `open-question` — needs a person), **Why:** (why it is safe, or which hard-stop class). A Question Protocol answer also carries `(unattended default)` in its `[Answer]:` — how a reviewer finds every choice nobody made. An `open-question` builds the option easiest to undo, says how to switch, and still reaches a pull request, which autopilot does not merge until a person has answered.
17
18
 
18
19
  ## Waiting for a command
19
20
 
@@ -201,11 +201,16 @@ When the user asks for a worktree ("create a new worktree for roadmap `<file>`")
201
201
  1. **Find the item** by file name, `id`, or title, in `backlog/` or `inbox/`. Asking for a worktree counts as choosing to skip triage. When more than one item matches, list them and ask which one.
202
202
  2. **Instance name**: the item's file name without its date prefix and extension (the item filed as `20260929-say-what-to-do-next` becomes `say-what-to-do-next`). Template and scope come from the config defaults, unless the item or the user names them.
203
203
  3. **Create the instance with** `aidlc start <template> --name <name> --scope <scope> --worktree --non-interactive --roadmap-item <item-file>`. Take the worktree path from the `Worktree:` line it prints. That one command creates the branch and the worktree, fires `on-instance-start`, sets the item's `promoted_to`, moves it to `in-progress/` in the primary checkout, and copies it into the instance as `roadmap-item.md` — which is the seeding step 5 above asks for. Do none of it by hand: a hand-made move is the step that got skipped. The move is left uncommitted in the primary checkout; committing it is yours.
204
- 4. **Hand off. Do not start the phase in this session** — unless the user's own message asks you to continue here, in which case `cd` into the worktree and follow **aidlc-continue** there. Otherwise the work belongs to the new session. End with the exact command that opens it:
205
- ```
206
- cd <worktree> && claude "/aidlc-continue <name>"
207
- ```
208
- For Codex, swap `claude` for `codex`. If the user names a session manager, give them the worktree path to point it at.
204
+ 4. **Hand off. Do not start the phase in this session** — unless the user's own message asks you to continue here, in which case `cd` into the worktree and follow **aidlc-continue** there. Otherwise the work belongs to the new session.
205
+ - **`aidlc start` printed `Herdr: opened workspace …`** — it ran inside herdr, opened the worktree as a herdr workspace and already started the agent there on `/aidlc-continue <name>`. The hand-off is done: say which workspace it opened and stop. Do not print a command to paste.
206
+ - **`aidlc start` printed `Herdr: could not open a workspace (…) — run: …`** — give the user that command as printed, with the reason.
207
+ - **No `Herdr:` line** — end with the exact command that opens the new session:
208
+ ```
209
+ cd <worktree> && claude "/aidlc-continue <name>"
210
+ ```
211
+ For Codex, swap `claude` for `codex`. If the user names a session manager, give them the worktree path to point it at.
212
+
213
+ A user who does not want herdr to open anything passes `--no-open` to `aidlc start`.
209
214
 
210
215
  When the instance completes, the `roadmap-done` lifecycle action moves every item whose `promoted_to` names it to `done/` on its own, and says how many it moved — do not do it by hand, and do not remove that action to do it manually.
211
216
 
@@ -38,6 +38,7 @@ The CLI does the work. This skill starts it and says how to watch and stop it. D
38
38
  6. **Where it stops for a person.** Two stops, both set in `aidlc autopilot setup` or `aidlc init` and on by default:
39
39
  - **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.
40
40
  - **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.
41
+ - **At an open question** — an unattended agent decides calls inside the item's scope and logs each in the instance's state directory; one it marks `open-question` needs the user. Whatever `stop_at` says, that item waits at its pull request like the stop above. The user runs `aidlc autopilot review <instance>` in the item's worktree to keep, reject or promote each logged decision — promoting adds it to `.aidlc/guidance/decisions.md`, which every later item reads — then merges.
41
42
 
42
43
  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.
43
44