@rasensio/aidlc-content 1.87.0 → 1.88.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/index.yaml CHANGED
@@ -106,6 +106,11 @@ entries:
106
106
  undocumented: []
107
107
 
108
108
  historical_paths:
109
+ - path: .claude/hooks/aidlc-approval-guard.mjs
110
+ reason: >-
111
+ Written into a user's project by `aidlc hook install` (agent-cannot-approve-itself);
112
+ lifecycle.md names where it lands. This repo has not installed it, so the path
113
+ does not resolve here.
109
114
  - path: packages/web
110
115
  reason: >-
111
116
  Deleted at the website cutover (nextjs-website-revamp, T27). Named in
package/docs/lifecycle.md CHANGED
@@ -71,7 +71,7 @@ instance, phase and artifact names filled in. When the `CI` environment variable
71
71
  words that block for a pipeline and names no command that changes lifecycle state. `--json` output
72
72
  carries no such block.
73
73
 
74
- Two gates are worth knowing because they block real work (three, in verified mode):
74
+ Three gates are worth knowing because they block real work (four, in verified mode):
75
75
 
76
76
  - The **traceability gate** requires every active acceptance criterion in `requirements.md` to be
77
77
  referenced by some test. Criteria are written `- AC-1: <text>`, and tests refer to them as
@@ -85,6 +85,13 @@ Two gates are worth knowing because they block real work (three, in verified mod
85
85
  - The **ownership gate** checks that the session transitioning a phase is the one that claimed it.
86
86
  This one has an override, and the honest observation from the retrospectives is that having the
87
87
  override meant it got waved through by reflex on every phase.
88
+ - The **blocking-action gate** runs your own checks. An `on-phase-exit` action marked
89
+ `blocking: true` in `.aidlc/actions.yaml` runs once every other gate has passed and before anything
90
+ is written; if it fails, the transition does not happen. `on-phase-enter` and `on-instance-complete`
91
+ actions run after the move, so a blocking failure there keeps the move, says so, and exits 1 —
92
+ undoing a written move would mean restoring four files and a log line, and a crash part way would
93
+ leave state no command expects. Up to v1.87.0 none of this happened: blocking actions ran after the
94
+ move and their failures were not even printed, so put a check that must pass on `on-phase-exit`.
88
95
  - The **receipt gate** exists because `test-results.md` is written by the agent, and nothing ran the
89
96
  tests to check it. Opt in with `assurance: { default: verified }` and a person-chosen
90
97
  `verify: { command: pnpm test }` in `.aidlc/config.yaml`. `aidlc verify <instance>` then runs that
@@ -98,6 +105,20 @@ Two gates are worth knowing because they block real work (three, in verified mod
98
105
  nothing changes. The receipt is not tamper-proof yet: an agent could still write the file by hand
99
106
  until a guard on that lands.
100
107
 
108
+ **Commands that need a person.** Three commands exist so that a person can say yes:
109
+ `aidlc autopilot approve`, `aidlc transition --override` and `aidlc amend --confirm`. An agent that
110
+ ran one would be approving its own work, so each refuses — exit code 2, before it reads or writes
111
+ anything — when stdin is not a terminal or `AIDLC_UNATTENDED=1`, and names the reason. No agent
112
+ harness gives its shell a terminal, so that check covers every harness. At a terminal they work as
113
+ they always did; `transition` without `--override` and `amend` without `--confirm` are unaffected.
114
+ In Claude Code the approval guard (`.claude/hooks/aidlc-approval-guard.mjs`, written by
115
+ `aidlc hook install` and `aidlc init`) blocks the same commands earlier, and blocks file edits to the
116
+ autopilot approval record. It fails closed: a missing script, a missing `node` or a crash blocks the
117
+ call and says to reinstall. A shell guard can be talked around, which is why the terminal check is the
118
+ line and the guard is the early warning. Every refusal, from either, is one line in
119
+ `<git-common-dir>/aidlc/refusals.ndjson`. An existing project gets the guard by running
120
+ `aidlc hook install`.
121
+
101
122
  Bare `aidlc`, or `aidlc menu`, opens the console if you would rather not remember the commands:
102
123
  `/help` lists them, `/doctor` runs one, plain words go to your agent, and autopilot changes print
103
124
  as they happen.
@@ -221,6 +242,8 @@ during implementation and never on `main`.
221
242
  - `packages/cli/src/traceability` — the acceptance-criteria parser and the test scanner behind the
222
243
  traceability gate. The AC grammar is closed on purpose; near-misses warn rather than vanish.
223
244
  - `packages/cli/src/tasks` — the `tasks.md` breakdown parser, including the `(wave: <n>)` marker.
245
+ - `packages/cli/src/hooks/human-only.ts` and `approval-guard.ts` — the commands only a person may
246
+ run, the terminal check, the refusal log, and the Claude Code guard rendered from the same table.
224
247
  - `packages/cli/src/change` — the amendment grammar, the read-only impact walk, and the `reopen`
225
248
  transition. `parser.ts` is fence-aware and treats a wrapped bullet as one bullet, because the first
226
249
  version truncated a wrapped `Retires:` list to half its ids and dropped three fields silently.
package/docs/roadmap.md CHANGED
@@ -88,6 +88,15 @@ worktree flow disagreed — one linked the item by hand, the other left it in `b
88
88
  listed items and never opened as a path, and an item that already has a `promoted_to` is refused before
89
89
  anything is created. The move is left uncommitted; committing it is the caller's.
90
90
 
91
+ **The instance's copy is the fallback when an item loses its link.** When no item names a completing
92
+ instance, `roadmap-done` reads the instance's own `roadmap-item.md`. If that copy's `promoted_to`
93
+ names the instance, every open item with the copy's `id` and `promoted_to: null` is linked and moved
94
+ to `done/`, with a line saying it was matched by id. `aidlc doctor` files such items for instances
95
+ that already completed. Why: on 2026-10-09 two items reached `in-progress/` with `promoted_to: null`
96
+ while their instances' copies still carried the link, and completion filed neither. What reverted
97
+ them was never reproduced, so the fix makes the outcome right whatever the cause. An item linked to
98
+ another instance is never taken.
99
+
91
100
  **Picking the next item** is `aidlc roadmap next`: the `backlog/` item with the lowest `priority`
92
101
  among those whose `depends_on` are all done, unranked items last, ties by file name. `--explain` shows
93
102
  the whole order and why anything was skipped; `--json` is for scripts. It only reads. A script that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "1.87.0",
3
+ "version": "1.88.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -87,7 +87,7 @@ On each lifecycle event — `on-instance-start`, `on-phase-enter`, `on-phase-exi
87
87
  2. Select actions where `enabled: true`, `event` matches, and any `phase` filter matches the current phase.
88
88
  3. For each matched action with a `run` script: execute it as a shell command with these environment variables set: `AIDLC_EVENT`, `AIDLC_INSTANCE`, `AIDLC_PHASE`, `AIDLC_TEMPLATE`.
89
89
  4. Actions marked `use` (built-ins) require the CLI — run `aidlc transition`/`aidlc start` for those, or tell the user the action needs the CLI.
90
- 5. If an action fails and it is `blocking: true`, stop and report the failure to the user before continuing the lifecycle. If `blocking: false`, report and continue.
90
+ 5. If a `blocking: true` action fails on `on-phase-exit`, do not move; on `on-phase-enter` or `on-instance-complete`, keep the move. Non-blocking: carry on.
91
91
  6. Report every action you ran and its outcome — never run configured automation silently.
92
92
 
93
93
  ## Question Protocol
@@ -136,7 +136,8 @@ To change a criterion after its phase closed:
136
136
  `aidlc amend <instance>`. It reopens that phase and every phase between it and the
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
- forward pass. From testing onwards it requires `--confirm`.
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
141
 
141
142
  When the correction is confined to the phase you are in — nothing in a completed phase
142
143
  cites what you retired — write `Reopens: none` (naming the current phase means the same).
@@ -29,7 +29,7 @@ Help the user create lifecycle actions from natural language descriptions. Trans
29
29
  - **event**: The lifecycle event from step 2
30
30
  - **phase_filter** (optional): Which phase(s) this applies to
31
31
  - **action**: A built-in action name (`git-branch`, `github-issue`, `doc-update`) or a custom shell command
32
- - **blocking**: `true` if the transition should halt on failure, `false` otherwise
32
+ - **blocking**: `true` if a failure should stop the lifecycle, `false` otherwise. What stops depends on the event: on `on-phase-exit` the transition does not happen and nothing is written; on `on-phase-enter` and `on-instance-complete` the move has already been recorded, so it stays and the command exits 1 naming the action; on `on-instance-start` the instance exists and `aidlc start` exits 1. Choose `on-phase-exit` for a check that must pass before work moves on.
33
33
  - **description**: Preserve the user's original natural language intent
34
34
 
35
35
  4. **Present for confirmation.** Show the user: