@rasensio/aidlc-content 2.22.0 → 2.24.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/roadmap.md CHANGED
@@ -367,6 +367,20 @@ Each item goes through these steps:
367
367
  is `release`, then `aidlc transition` to close the instance. A failure halts the queue. Running
368
368
  `aidlc autopilot run` again retries a failure that came before the merge; from the pull onward
369
369
  nothing is retried — a half-finished release is for a person.
370
+ 8. **The retrospective**, after each close-out — its own merge or yours. When the close-out leaves a
371
+ retro-pending marker, autopilot launches one unattended agent in the primary checkout to run the
372
+ `aidlc-retrospective` skill, and holds the merge lane while it runs: nothing merges or closes
373
+ out, though builds, CI and pull requests carry on. The agent commits nothing; autopilot commits
374
+ on main, by pathspec, only what changed among the instance's `retrospective.md`,
375
+ `.aidlc/guidance/lessons.md`, new files in the roadmap's `inbox/` and the instance's
376
+ `costs.ndjson`, then pushes. Any other path that changed — the watching session's cost hook, a
377
+ digest the agent should not have touched — is left as it is and named. A retrospective that
378
+ changed an existing lesson line, added more than three lessons or two follow-ups, touched one of
379
+ those paths while it was already uncommitted, failed, or ran past 30 minutes or the cost cap
380
+ commits nothing but its cost lines: its other changes are undone, the marker is put back for
381
+ `aidlc autopilot pending`, and one line says why. It never parks the item or halts the lane. Its
382
+ session's cost is recorded against the instance (`AIDLC_COST_INSTANCE`), not in
383
+ `unattributed.ndjson`. Consolidating `lessons.md` and rewriting `lessons-digest.md` stay yours.
370
384
 
371
385
  At most two items build at once, and never more than you asked for. Autopilot never moves anything
372
386
  between `inbox/`, `backlog/` and `hold/` except to park what it is building or could not start, and
@@ -406,7 +420,23 @@ six questions on its own. Each is a list with one choice marked recommended:
406
420
  after design only, or no pauses. These are the two phases whose output decides the shape of the
407
421
  code.
408
422
  - **How far autopilot takes each item** — open the pull request and wait for you to merge it
409
- (recommended); merge when CI passes with no release; or merge and run the release step below.
423
+ (recommended); merge once CI and the pull request check pass, with no release
424
+ (`checked-merge`); merge when CI passes with no release; or merge and run the release step below.
425
+
426
+ **The pull request check.** Under `pr` and `checked-merge`, once CI passes on the pull request,
427
+ autopilot launches a new agent session in the item's worktree, with the item's agent command and
428
+ never a build session resumed. It is given the instance's active `AC-<n>` lines from
429
+ `requirements.md` (from `roadmap-item.md` when there is none), the diff against `main` and
430
+ `tasks.md`, and told to edit, commit and push nothing while it may run the project's tests and
431
+ build. It answers PASS or REJECT, with met or not met and the evidence for each criterion.
432
+ Autopilot posts that as one comment on the pull request and adds it to
433
+ `.aidlc/state/<instance>/pr-check.md`, which the close-out carries into main. Under `pr` the
434
+ verdict only informs: the item waits for you to merge it whatever it says. Under `checked-merge` a
435
+ PASS with no open question merges; a first REJECT relaunches the build agent once with the
436
+ criteria not met; a second parks the item. A check that could not decide — no criteria, a custom
437
+ agent command, an unreadable verdict, or a checker that changed the branch or a tracked file —
438
+ waits for you, saying why. The check counts toward the item's cost cap. `merge` and `release` run
439
+ no check.
410
440
  - **The release step.** In a project with `scripts/autopilot-release.sh`, running it after each
411
441
  merge (recommended); otherwise merge only, and you release when you choose. This repository's
412
442
  script runs `release-bookkeeping --write`, commits the manifest and `.aidlc`, and runs
@@ -415,12 +445,12 @@ six questions on its own. Each is a list with one choice marked recommended:
415
445
 
416
446
  Flags skip the questions: `--agent`, `--parallel`, `--token-cap <tokens|none>` (`40M`, `500k`),
417
447
  `--cost-cap <usd|none>` (a dollar cap, as before), `--pause-after
418
- <phases|none>`, `--stop-at <pr|merge|release>`, `--release <repo-script|merge-only>`. `aidlc
448
+ <phases|none>`, `--stop-at <pr|checked-merge|merge|release>`, `--release <repo-script|merge-only>`. `aidlc
419
449
  autopilot setup` writes every answer to
420
450
  `<git-common-dir>/aidlc/autopilot/config.json`, per machine and never committed, beside autopilot's
421
451
  `state.json`, `run.json`, `logs/`, `STOP` file and, while paused, `paused.json`.
422
452
 
423
- **One run at a time.** `aidlc autopilot run --stop-at <pr|merge|release>` and `--pause-after
453
+ **One run at a time.** `aidlc autopilot run --stop-at <pr|checked-merge|merge|release>` and `--pause-after
424
454
  <phases|none>` change the stops for the items that run starts, without touching either saved file.
425
455
  Each item records the stops in force when it started and is held to them until it finishes, so a
426
456
  later run cannot make an item in flight wait on a phase that completed hours ago. Every run prints a
@@ -435,7 +465,7 @@ machine:
435
465
  autopilot:
436
466
  cost_cap_tokens: 40000000 # or null for no cap; cost_cap_usd still works
437
467
  pause_after: [requirements, design] # or [] for no pauses
438
- stop_at: pr # or merge, or release
468
+ stop_at: pr # or checked-merge, merge, or release
439
469
  release: repo-script # or merge-only — a preset name, never a command
440
470
  notify: false # no desktop notifications; leave it out for them on
441
471
  ```
@@ -452,7 +482,7 @@ answer takes effect here too. The agent, its permissions and parallelism are rea
452
482
  file only: the same keys in `.aidlc/config.yaml` are ignored, so cloning a repo can never grant an
453
483
  agent full access on your machine. A team value that is not valid — a cap that is not a positive number
454
484
  or `null`, a release step that is not one of the two names, `repo-script` with no script, a `stop_at`
455
- outside the three names, a `pause_after` that is not a list of phase names — is ignored.
485
+ outside the four names, a `pause_after` that is not a list of phase names — is ignored.
456
486
  Re-running `aidlc init` pre-selects every answer in force, and an answer no choice matches is offered as
457
487
  "(current)" and left as it is. `--non-interactive --autopilot` asks nothing, keeps what is there and
458
488
  fills only what is missing with the recommended choice.
@@ -500,6 +530,21 @@ records your words and applies nothing. Between rounds the skill runs `aidlc aut
500
530
  --pending` in the background; it exits when something new waits, after 30 minutes with nothing new
501
531
  (`--heartbeat <minutes>`), or when the run ends, and that exit is what wakes the session.
502
532
 
533
+ **Routine calls the watcher keeps itself.** Each entry also says whether it is `routine`. Two kinds
534
+ are: an `(unattended default)` answer that took the option its question recommended (its
535
+ `Recommendation` field, else the one option marked `(recommended)`, else its `If you say nothing`
536
+ field), and an item's unreviewed interpretations. Those list one more option, `watcher-keep`, which
537
+ the skill runs without asking you; in its next message it names each item it kept and the
538
+ `aidlc autopilot review <instance>` command that overturns it. Everything else is asked as before:
539
+ phase approvals, open questions an agent logged, an answer that named another option, and any
540
+ answer whose option the CLI cannot tell. The watcher's keep never carries your name. In the
541
+ decision log it reads `kept <date> (kept by the autopilot watcher, not a person)`, and its
542
+ `answers.ndjson` record has `by: "the autopilot watcher"` and `watcher: true`. `aidlc autopilot
543
+ review <instance>` asks those entries again and your verdict replaces the watcher's; `--pending`
544
+ still walks only instances with an entry nobody judged. A watcher keep on an open question never
545
+ counts toward an automatic merge. The question text of a logged call names the roadmap item's title
546
+ and what the agent chose, in one line of at most 240 characters.
547
+
503
548
  **Triage from the command line** is `aidlc roadmap triage <item> backlog [--rank <n>] [--run
504
549
  autopilot|attended]`, which moves an `inbox/` item to `backlog/`, ranks it as `roadmap rank` does and
505
550
  writes its `run:` line, or `aidlc roadmap triage <item> park|decline --reason "<why>"`, which moves it
@@ -230,6 +230,10 @@ agent's advice prompt by prompt was recorded as having judged every call. Promot
230
230
  `.aidlc/guidance/decisions.md`, which every later item reads: a rejection asks what the call should
231
231
  have been, and a non-empty answer is written there as a `Correction:` entry beside the original
232
232
  decision. Why: before, a rejection kept nothing, so the next run could make the same call again.
233
+ In a worktree, the review leaves alone every instance the local `main` branch already holds: one
234
+ instance is refused with the `cd` to run in the main checkout instead, `--pending` skips and counts
235
+ them, and `--from` lists them as problems. Why: after the merge the log's home is main, and verdicts
236
+ written into the old worktree were deleted with it, 16 of them on 2026-10-28.
233
237
  Completing testing is the normal end: the agent writes the release plan and stops, and whatever runs
234
238
  it owns the push, merge and release. The list of stops came from two dry runs on 2026-10-02 that
235
239
  logged the same thirteen on two machines. The mode is a rule the agent reads, not a switch the CLI
@@ -261,7 +265,11 @@ any other command would be a cost every future change pays.
261
265
  Skill?), one file each. `packages/cli/src/compile/rules.ts` emits them to `.aidlc/resources/rules/`
262
266
  on `init` and `update`. They used to be sections of the overview, and following one cross-reference
263
267
  cost the reader the whole 24KB file; now it costs the rule. The overview keeps a one-line pointer per
264
- rule and states none of them.
268
+ rule and states none of them — except the hand-off rule (`handoff.md`), which it has no room for
269
+ under its 12,000-byte limit. That rule is reached through the next-steps rule, the Question
270
+ Protocol and the deployment, requirements and testing skills, and
271
+ `packages/content/test/handoff-rule.test.ts` fails a phase skill that hands work to a person
272
+ without naming it.
265
273
  - `packages/content/glossary.yaml` — canonical vocabulary, resolved into skill bodies where they write
266
274
  `{{glossary:<term>}}`. Deliberately not installable into a project: guidance is yours to edit,
267
275
  framework vocabulary is not, and a second copy drifts.
@@ -40,8 +40,16 @@ before anything ships. You can pause or stop the run at any time.
40
40
  ```
41
41
 
42
42
  Use `--all` instead of `--items` to keep going until nothing is ready. To change where
43
- this run stops, add `--stop-at pr`, `--stop-at merge` or `--stop-at release`. To change the
44
- phases it pauses after, add `--pause-after requirements,design`.
43
+ this run stops, add `--stop-at pr`, `--stop-at checked-merge`, `--stop-at merge` or
44
+ `--stop-at release`. To change the phases it pauses after, add
45
+ `--pause-after requirements,design`.
46
+
47
+ Under `pr` and `checked-merge`, once CI passes an agent that did not build the item checks
48
+ its pull request against the item's acceptance criteria. It posts PASS or REJECT on the pull
49
+ request, with evidence for each criterion, and adds the same text to `pr-check.md` in the
50
+ instance's state folder. Under `pr` the verdict only informs: the item still waits for you
51
+ to merge it. Under `checked-merge` a PASS merges it with no release. A first REJECT sends
52
+ the findings back to the agent once; a second parks the item.
45
53
 
46
54
  4. Watch it. Add `--watch` to keep the view live; `q` leaves and the run keeps going:
47
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "bugs": "https://github.com/rasensio/aidlc-feedback/issues",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,39 @@
1
+ # The hand-off rule
2
+
3
+ This file is the only statement of the rule. Skills and the other rules point here instead of restating it.
4
+
5
+ **A step you hand to a person stands on its own.** They should be able to do it on the first read, without scrolling back, opening another file or asking what you meant.
6
+
7
+ ## When it applies
8
+
9
+ Any step you ask a person to carry out: a command in their terminal, a sign-in, a file upload, clicks in an admin screen or a cloud console, a job to re-run. A decision is not a hand-off; ask it through the **Question Protocol** (`.aidlc/resources/rules/question-protocol.md`).
10
+
11
+ ## What a hand-off states
12
+
13
+ Written out in the hand-off itself, in this order:
14
+
15
+ 1. **What and why.** What the thing is and why it is needed, in one plain sentence.
16
+ 2. **Where.** The app or site, the account or login to use, full absolute file paths, and the URL when you know it.
17
+ 3. **How.** The literal command in a copyable block, or the click path from the page they land on, with any keyboard help they need.
18
+ 4. **Preconditions first.** A login that has probably expired goes first, as its own step. Anything that must already exist (a PR, a deploy, an earlier step) you check yourself before handing the step over.
19
+ 5. **When, and in what order.** Now, after X, or not until you confirm Y.
20
+ 6. **Success, and what to send back.** What they see when it worked, and what to paste back to you, with anything sensitive (keys, tokens, passwords) stripped from it.
21
+ 7. **No pointer in place of the step.** Never "see step 5", "as in my previous message" or "per the runbook" instead of the step. A link may be added; it never replaces the step.
22
+ 8. **When it does not match.** What to do if what they see differs: which message to look for, and what to send you instead.
23
+
24
+ ## Example — the 2026-10-30 certificate
25
+
26
+ **Bad:**
27
+
28
+ > Upload the certificate (step 5), then revoke the old tokens (step 6).
29
+
30
+ **Good:**
31
+
32
+ > Salesforce needs the public certificate of the new signing key, so the ingest job can sign in without a password. Do this after I confirm the deploy finished.
33
+ >
34
+ > 1. Sign in to Salesforce at `https://login.salesforce.com` as `<admin-login>` (org `<org-name>`). If you were signed in yesterday, sign in again; the session has probably expired.
35
+ > 2. Click the gear icon, top right → **Setup** → type **App Manager** in Quick Find → on the `<app-name>` row, the arrow at the far right → **Edit** → tick **Use digital signatures** → **Choose File**.
36
+ > 3. Pick `/Users/<you>/projects/<repo>/certs/<name>.crt`. The `certs` folder is hidden in the file chooser on macOS: press `Cmd+Shift+.` to show it.
37
+ > 4. Click **Save**. Success: the page shows **Digital Signature: <name>.crt** under API settings. Send me that line.
38
+ >
39
+ > If **Use digital signatures** is missing, OAuth is turned off for the app: send me a screenshot of the API settings box, with nothing else on screen.
@@ -25,6 +25,8 @@ When both groups are empty, say so in one line.
25
25
 
26
26
  Close the turn with exactly one next step. It names a command the user can run as written — the real instance name, the real phase or artifact — or, when decisions are open, says to answer them first.
27
27
 
28
+ When the next step is one a person does outside the terminal — a sign-in, an upload, clicks in a console — end with that step written as a hand-off in place of a command, as **The hand-off rule** (`.aidlc/resources/rules/handoff.md`) says.
29
+
28
30
  - Decisions are open → answer them first; no command yet.
29
31
  - Fixes are offered and not yet applied → the fixes, then the command below.
30
32
  - The phase's exit criteria are met → `aidlc transition <instance>`. That is the step that marks the phase complete; `aidlc gate` only checks, and fails on an open phase until it runs.
@@ -1,6 +1,6 @@
1
1
  # Question Protocol
2
2
 
3
- Ask when **different answers would change an artifact, a design decision, or scope** — the trigger is consequence, not volume. A question whose answers change nothing is not asked. Building something other than what was agreed is always asked: `.aidlc/resources/rules/departures.md`.
3
+ Ask when **different answers would change an artifact, a design decision, or scope** — the trigger is consequence, not volume. A question whose answers change nothing is not asked. Building something other than what was agreed is always asked: `.aidlc/resources/rules/departures.md`. A step a person carries out is a hand-off: `.aidlc/resources/rules/handoff.md`.
4
4
 
5
5
  **Before asking, check the sources:** `.aidlc/config.yaml`, the roadmap item, the starting prompt, the answers already recorded in this instance, and the code. If one answers it, do not ask: write the answer into the artifact it was for, citing `path:line` or `path`. A question whose recommendation could only quote one of them is already answered. Ask when they disagree or none decides; an earlier answer is not re-asked — ask only the narrow follow-up.
6
6
 
@@ -20,7 +20,7 @@ When several questions in one file share a concept, open the file with one share
20
20
 
21
21
  The example shows what would really happen. One simplified until it changes the answer misleads as badly as jargon does, and it is harder to spot.
22
22
 
23
- Expand every identifier on first use, writing the thing out with the tag in parentheses — "the citation rule (AC-1)", not a bare `AC-1`: a bare tag assumes the reader carries a mapping they do not have.
23
+ Expand every identifier on first use, writing the thing out with the tag in parentheses — "the citation rule (AC-1)", not a bare `AC-1`.
24
24
 
25
25
  ## Rendering the spec
26
26
 
@@ -1,6 +1,6 @@
1
1
  # The unattended rule
2
2
 
3
- This file is the only statement of the rule. Skills point here instead of restating it, so there is no second copy to drift.
3
+ This file is the only statement of the rule.
4
4
 
5
5
  Unattended mode is on exactly when the environment variable `AIDLC_UNATTENDED` is `1`. The launch prompt says so (`AIDLC_UNATTENDED=1`); run `printenv AIDLC_UNATTENDED` only when the prompt does not say, since a preset may refuse it. 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
 
@@ -14,7 +14,7 @@ A situation no stop below covers is decided and logged when its choice lies insi
14
14
 
15
15
  ## The log
16
16
 
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` — a design detail not followed that changes no scope and no chosen option, never a departure, 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
+ 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` — a design detail not followed that changes no scope and no chosen option, never a departure, 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. A hard stop needing a person to act writes that step in as a hand-off: `.aidlc/resources/rules/handoff.md`.
18
18
 
19
19
  ## Waiting for a command
20
20
 
@@ -137,7 +137,7 @@ To change a criterion after its phase closed:
137
137
  current one, re-arming their gates, and records a `type: reopen` entry in
138
138
  `transitions.log` so the churn is visible in history rather than reading as a normal
139
139
  forward pass. From testing onwards it requires `--confirm`, which only a person can give: the
140
- command refuses it without a terminal or under `AIDLC_UNATTENDED=1`, so ask the user to run it.
140
+ command refuses it without a terminal or under `AIDLC_UNATTENDED=1`, so ask the user to run it, as a hand-off (`.aidlc/resources/rules/handoff.md`).
141
141
 
142
142
  When the correction is confined to the phase you are in — nothing in a completed phase
143
143
  cites what you retired — write `Reopens: none` (naming the current phase means the same).
@@ -10,7 +10,7 @@ tier: mechanical
10
10
 
11
11
  ## Purpose
12
12
 
13
- Verify that the implementation satisfies all acceptance criteria. Produce evidence of correctness through automated tests and manual verification where needed.
13
+ Verify that the implementation satisfies all acceptance criteria. Produce evidence of correctness through automated tests and manual verification where needed; a step a person runs is handed over as `.aidlc/resources/rules/handoff.md` says.
14
14
 
15
15
  ## Entry Criteria
16
16
 
@@ -93,6 +93,8 @@ Deployment is inherently sensitive. You MUST:
93
93
  4. Wait for explicit user approval before executing any deployment command
94
94
  5. If deploying to production, require additional confirmation stating the environment name
95
95
 
96
+ Every step a person runs — a command, a console click path, an upload, a sign-in — is written as a hand-off, as **The hand-off rule** (`.aidlc/resources/rules/handoff.md`) defines.
97
+
96
98
  Never deploy without explicit user confirmation. If the user cancels, halt and log the cancellation.
97
99
 
98
100
  ## Guidance
@@ -37,7 +37,7 @@ The CLI does the work. This skill starts it and says how to watch and stop it. D
37
37
 
38
38
  6. **Where it stops for a person.** Three stops. The first two are set in `aidlc autopilot setup` or `aidlc init` and on by default; the third needs no setting:
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. A requirements or design phase that wrote "Nothing open" into its artifact, with no unanswered question, is not waited on: the item carries on, and the run log says so.
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.
40
+ - **At the pull request** — autopilot opens it, waits for CI, then has an agent that did not build it check the change against the instance's acceptance criteria. The verdict, PASS or REJECT with evidence per criterion, is posted on the pull request and added to `pr-check.md` in the instance's state directory. Under `stop_at: pr` the verdict only informs: the item waits for the user to merge whatever it says. Merging is the approval: autopilot then closes the instance out on main and runs no release.
41
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, and rejecting one asks what the call should have been and adds that answer there as a correction (Enter skips) — then merges.
42
42
 
43
43
  **Preparing that review.** When the person asks for help with the logged calls, write a proposal for them; never run `aidlc autopilot review` yourself. Write it to `<git common dir>/aidlc/review-proposal.yaml` (`git rev-parse --git-common-dir`), outside every working tree, so no commit picks it up. It is YAML with one key, `instances`, mapping each instance to its entries by number. Give every entry without a `**Review:**` line, in each instance you name, a verdict: `keep`, `reject` or `promote` — the CLI refuses a proposal that leaves one out. Promote only an `interpretation`, a `deviation` or an entry with no `**Type:**` line. An entry needs the person when it is an `open-question` or you propose reject or promote: write it as a mapping with `verdict` and three parts in plain words, each under 1,000 characters — `what_happened`, `example` (one concrete case), and `what_changes` (what each answer would change):
@@ -55,17 +55,20 @@ The CLI does the work. This skill starts it and says how to watch and stop it. D
55
55
 
56
56
  Then give the person the command to run in their own terminal: `aidlc autopilot review --from <file>`. It checks the whole proposal against the logs first and names every problem, writes the routine keeps at once as accepted from the agent's proposal, and stops only on the entries that need the person, showing your explanation and your answer first. `aidlc autopilot review --pending` walks every instance with an unreviewed entry when there is no proposal.
57
57
 
58
- 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.
58
+ `stop_at: checked-merge` lets that check earn the merge: once CI and the check pass, autopilot merges with no release. A first REJECT sends the criteria not met back to the build agent once; a second parks the item. A check that could not decide, or an unreviewed open question, waits for the user as `pr` does.
59
+
60
+ 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, `--stop-at checked-merge` to merge on a passing check). 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.
59
61
 
60
62
  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, and under it each open decision — the question, why it matters, the options with the recommended one marked, and the file to answer in. Answering is writing the chosen option after that question's `[Answer]:`, then the approve command. When they ask how the items are getting on, run `aidlc autopilot status --watch`: called from here it prints each item's phase, tasks done, time in its step and last event once, and returns.
61
63
 
62
64
  7. **Stay on watch while the run is active.** The run's agents can ask nobody, so every decision only a person can make ends up in a file. You are the one session a person is watching: ask them. Do not build, review or fix any item yourself.
63
- - **Read what waits.** Run `aidlc autopilot pending --json`. Each entry has a `fingerprint`, a `kind`, `blocks` (it blocks the run) or not (it only waits), a `question`, a `summary`, an `artifact` to read, and `options`, the recommended one first. Each option has an `id`, a `label`, a one-line `consequence`, `person` (only the person may apply it, in their own terminal), `applies` (what it comes down to) and the `command` that applies it.
65
+ - **Read what waits.** Run `aidlc autopilot pending --json`. Each entry has a `fingerprint`, a `kind`, `blocks` (it blocks the run) or not (it only waits), `routine` (a call the agent made the way its item or question file recommended), a `question`, a `summary`, an `artifact` to read, and `options`, the recommended one first. Each option has an `id`, a `label`, a one-line `consequence`, `person` (only the person may apply it, in their own terminal), `applies` (what it comes down to) and the `command` that applies it.
66
+ - **Keep the routine calls yourself.** For each entry marked `routine: true`, run its `watcher-keep` option's `command` without asking. It records the keep as the watcher's, not the person's, and `aidlc autopilot review <instance>` can still overturn it before the merge. In the same message as your next round of questions — or alone, when nothing else waits — say in one line per item what you kept and the `aidlc autopilot review <instance>` command that overturns it. Ask the person only about the entries marked `routine: false`.
64
67
  - **Ask.** At most four questions a round: blocking entries first, then the oldest. Before each round, write one message with what the person needs to answer: which item, what the agent did, the artifact path, and every command an option will run or hand to them — the question UI cannot copy text, so commands go in the message, never in a question. Ask each entry as a multiple-choice question: its `question`, and its options by `label`, recommended first, each with its `consequence` on one line. For a triage entry the rank and the run mode are one answer. When nothing new waits, say nothing.
65
68
  - **Apply each answer** by running exactly the chosen option's `command` — `aidlc autopilot answer <fingerprint> <option>` — and report what it printed. A triage answer with another rank ("rank 2, attended") is that option with `--rank 2`. A park or decline takes the person's reason as `--note "<reason>"`. An answer you cannot map to an option, run as `aidlc autopilot answer <fingerprint> other --note "<their words>"`, and repeat their words back; never guess an option from it. Approving an item, and keeping or rejecting a decision its agent logged, are applied by `answer` itself, in the person's name: run that option only when the person chose it. A person-only option prints the command for them to run in their own terminal: pass it on as printed. When the person does not answer, run nothing; the run carries on with everything else.
66
69
  - **Wait to be woken.** Then run `aidlc autopilot wait --pending` as a background command and end your turn. It exits when something new waits, after 30 minutes with nothing new, or when the run ends, and its exit wakes you. On waking, read `aidlc autopilot pending --json` again: ask what you have not asked this session, stay silent when there is nothing new, and start the wait again. When it prints `run ended`, say so in one line and stop watching. This is the one place a session ends its turn to wait: `rules/unattended.md` "Waiting for a command" binds unattended agents, not you.
67
70
  - **No background command?** Where this agent cannot be woken by a background command's exit, check `aidlc autopilot pending --json` every 20–30 minutes with a scheduled check instead. Failing both, say once that the person must run `aidlc autopilot status` themselves to see what waits.
68
- - **Never** answer a question yourself, approve or review unless the person chose that option this round (and then only through its `answer` command; `aidlc autopilot approve` and `aidlc autopilot review` are theirs to run in their own terminal), change `pause_after` or `stop_at`, merge or release beyond what the run's stops allow, or build an item. An answer already given in another session is refused by `answer` with who gave it; report that and move on.
71
+ - **Never** answer a question yourself, approve or review unless the person chose that option this round — the one exception is `watcher-keep` on an entry marked `routine: true`; every other option, a phase approval and an open question an agent logged are the person's — (and then only through its `answer` command; `aidlc autopilot approve` and `aidlc autopilot review` are theirs to run in their own terminal), change `pause_after` or `stop_at`, merge or release beyond what the run's stops allow, or build an item. An answer already given in another session is refused by `answer` with who gave it; report that and move on.
69
72
 
70
73
  8. **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.
71
74
 
@@ -75,6 +78,7 @@ The CLI does the work. This skill starts it and says how to watch and stop it. D
75
78
  - 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.
76
79
  - 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.
77
80
  - 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.
81
+ - After each close-out, after its own merge or a person's, runs the item's retrospective: one agent, unattended, in the primary checkout, one at a time in the merge lane — nothing else merges or closes out while it runs, though builds carry on. Autopilot commits and pushes only its files: the instance's `retrospective.md`, up to three lessons appended to `.aidlc/guidance/lessons.md`, up to two new files in `.aidlc/roadmap/inbox/`, and the instance's `costs.ndjson`. Any other path that changed is left as it is and named. A retrospective that fails, breaks a limit, runs past 30 minutes or past the cost cap commits nothing, undoes its changes and leaves its marker for `aidlc autopilot pending`; it never parks the item. Consolidating `lessons.md` and rewriting `.aidlc/guidance/lessons-digest.md` stay a person's step.
78
82
  - 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.
79
83
  - Sends a desktop notification, once each, when an item is parked, fails, waits for the user, or is done, and when the run ends. `notify: false` under `autopilot:` in `.aidlc/config.yaml` turns them off.
80
84
  - 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.
@@ -42,6 +42,10 @@ Run the retro **before** any completion cleanup (worktree removal, claim release
42
42
  9. **Commit** `retrospective.md` and the lessons append to the **current branch** now, before any worktree cleanup runs.
43
43
  10. **Remove the retro-pending marker** if one exists.
44
44
 
45
+ ### Unattended
46
+
47
+ Under `AIDLC_UNATTENDED=1` nobody can confirm, so step 8 changes: append the lessons without the confirmation, inside the instance's section, under the line "Drafted by the agent from the record; not reviewed by a person." That line is what tells every later reader the text passed no injection gate. Still at most three lessons and two queued follow-ups; never consolidate, even when a trigger fires; never rewrite `lessons-digest.md` or `index.yaml`. A follow-up is a new inbox file — appending to an existing roadmap item is a person's choice. When the prompt says autopilot commits, as it does after an autopilot close-out, step 9 is skipped: commit nothing, push nothing, write only the files the prompt names, and remove the marker as step 10 says.
48
+
45
49
  ## Lessons Layer — Write Rules
46
50
 
47
51
  Target: `.aidlc/guidance/lessons.md` in the **current checkout/worktree**, on the instance's branch (entries travel with the merge — never write another checkout's copy).
@@ -94,5 +98,5 @@ Run only in the **primary checkout** (not a linked worktree — check `git rev-p
94
98
 
95
99
  - The retro never blocks completion: it is non-blocking, declinable, and its absence is never an error.
96
100
  - The follow-up cap is never a reason to *not notice* something. Merge first — if an open roadmap item already owns the area, append a dated `## Received from <instance>` section to it rather than spending one of the two slots on a file that duplicates it.
97
- - Never write lessons without the step-8 confirmation. Never record credentials or secrets.
101
+ - Never write lessons without the step-8 confirmation, except unattended under the line above. Never record credentials or secrets.
98
102
  - Lessons are historical observations, not directives — phrase them as what was learned, not as instructions to obey.