@rasensio/aidlc-content 2.16.0 → 2.18.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.
@@ -126,8 +126,8 @@ worktree removed, an instance abandoned.
126
126
  Some checks report and repair nothing, on purpose. A `report`-tier migration states a condition whose
127
127
  only remedy is a decision, and it never touches `doctor`'s exit code, so `--yes` cannot
128
128
  make it write. Among them: an out-of-date compliance pack, a configured roadmap projection with no
129
- `gh` on `PATH`, `knowledge-stale-sources`, `roadmap-item-summary`, and the three misfiled-item checks
130
- below.
129
+ `gh` on `PATH`, `knowledge-stale-sources`, `roadmap-item-summary`, `bare-ac-in-tests`, and
130
+ the three misfiled-item checks below.
131
131
 
132
132
  **`roadmap-item-summary`** names every `inbox/` item with no complete six-line executive summary, and
133
133
  the labels each one is missing. Two paths write into the inbox — the capture flow, which has always
@@ -182,6 +182,17 @@ once resolved, is reported as a defect in the entry and **never passed to a file
182
182
  tracked YAML file is not a trusted one, and it must not be able to make `doctor` probe paths outside
183
183
  the repo.
184
184
 
185
+ **`bare-ac-in-tests`** names the test lines that cite a criterion as a bare `AC-<n>` instead of
186
+ `<instance>/AC-<n>`, as `path:line` followed by the ids on that line. A bare reference counts toward
187
+ coverage only while exactly one instance defines that id, so it stops counting, with nothing failing,
188
+ the day a second instance reuses the number; `lessons.md` records that five times. It reads the files
189
+ the traceability gate reads, through the gate's own globs and scanner, so the two cannot disagree
190
+ about which files count. It lists every bare reference, not only ones already ambiguous, because the
191
+ gate warns about those. It lists the first 20 lines and ends with `… and <N> more`, as
192
+ `knowledge-stale-sources` does; the count at the top still covers every line. It is report tier because qualifying a reference means choosing the instance it meant. A test
193
+ that plants references in a fixture should build them at run time, or it becomes a bare reference
194
+ itself.
195
+
185
196
  `compliance remove` and `upgrade` follow the same rule for the pack record in `.aidlc/config.yaml`.
186
197
  They delete only files whose recorded path stays inside `.aidlc/guidance/`, and only when that
187
198
  entry's own recorded hash matches what is on disk. The record is tracked, so a cloned repo writes
@@ -113,6 +113,14 @@ The lessons file is capped at three new entries per retrospective, and follow-up
113
113
  `dropped` — keeping one requires a stated reason. Both caps exist because finishing work reliably
114
114
  generates more work than it retires.
115
115
 
116
+ Every new lesson also ends with one resolution tag naming what stops it next time —
117
+ `[test: <path>]`, `[check: <name or path>]`, `[guidance: <file>]` or `[observation]` — and the
118
+ retrospective searches `lessons.md` and the digest first. A lesson that repeats one already on file
119
+ cannot be `[observation]`: it names the artifact, or it takes a follow-up slot whose smallest change
120
+ builds one. The reason is in the digest itself: three lessons were re-learned five to seven times
121
+ each as prose, and recurrences stopped only once a check was filed. Nothing parses the tag; the
122
+ person confirming the retro is the check, which is why that confirmation shows a `repeats:` line.
123
+
116
124
  ## Where the code lives
117
125
 
118
126
  - `packages/cli/src/review` — `findings-parser.ts` parses the findings format that the phase gate
package/docs/roadmap.md CHANGED
@@ -99,6 +99,17 @@ not remove. Why: on 2026-10-10 two agent-written items had no `promoted_to:` lin
99
99
  at the link but kept everything it had made, and the retry failed with "already registered".
100
100
  Recovery took `git worktree remove`, `git branch -D` and `aidlc doctor` for each item.
101
101
 
102
+ That covers every step of a `--worktree` start, not only the link. `git worktree add -b` makes the
103
+ branch before the folder, so when it cannot create the folder, `aidlc start` deletes the branch it
104
+ just made. A blocking `on-instance-start` action that fails undoes the start too, roadmap move
105
+ included; without `--worktree` the instance is kept, because the shipped branch action has already
106
+ switched your own checkout. A registry entry for the same name whose worktree is gone and whose branch
107
+ is deleted or merged — the test `aidlc doctor` prunes by — is removed and the start goes on; any other
108
+ entry is refused before a branch or worktree exists. Autopilot also checks that its agent command can
109
+ be found before it runs `aidlc start`, and starts nothing when it cannot. Why: on 2026-10-15 a sandbox
110
+ refused the worktree folder, the branch survived, and every retry failed with "branch already
111
+ exists". Each earlier fix had covered one step of the start; this one audited all of them.
112
+
102
113
  **The instance's copy is the fallback when an item loses its link.** When no item names a completing
103
114
  instance, `roadmap-done` reads the instance's own `roadmap-item.md`. If that copy's `promoted_to`
104
115
  names the instance, every open item with the copy's `id` and `promoted_to: null` is linked and moved
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "2.16.0",
3
+ "version": "2.18.0",
4
4
  "bugs": "https://github.com/rasensio/aidlc-feedback/issues",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,9 +32,11 @@ Run the retro **before** any completion cleanup (worktree removal, claim release
32
32
  3. **Draft, then ask — one round-trip.** Draft your own answers to the three questions — what surprised us? what would we do differently? what took longer than expected? — from the record: `transitions.log`, the question files, `.aidlc/state/<instance>/unattended-stops.md`, `test-results.md` and the cost summary. Cite what each answer rests on. Show the three drafts in a single message and ask the user to correct them; a reply that changes nothing keeps them. For **Micro scope**, compress to one drafted answer covering all three. Unattended (`AIDLC_UNATTENDED=1`), write the drafts into `retrospective.md` under the line "Drafted by the agent from the record; not reviewed by a person." Declining the retro is fine: remove the marker, write nothing.
33
33
  4. **Write `retrospective.md`** in the instance state dir: the answers, as the user corrected the drafts; instance metadata (template, scope); per-phase durations (pair each transitions.log `to: X` with the next `from: X`; fall back to the phase YAML's `entered_at`/`completed_at`; note inconsistencies rather than guessing); and the cost summary when available.
34
34
  5. **Distill lessons — 0 to 3.** A lesson is a durable, project-general observation ("NDJSON merge=union false-dedups identical same-second events"), not an instance anecdote ("we finished late"). If nothing generalizes, write no lesson — an empty distillation is a valid outcome.
35
- 6. **Cap the follow-ups — 0 to 2 queued roadmap items.** Rank what the work turned up and queue at most the top two into `.aidlc/roadmap/inbox/`, each with its six-line executive summary (see **aidlc-roadmap**) and, when `.aidlc/roadmap/milestones.yaml` exists, a `milestone:` line naming a milestone id or `none`. **Zero is a valid outcome**, and often the right one. This is the same cap, in the same shape, as the 0–3 on lessons, and it exists because the lessons cap alone was half a brake: the framework capped what an instance *learned* and capped nothing about what it *queued*, so closing an instance reliably grew the backlog. One measured project emitted five to nine items per close; triage kept three of eighteen.
35
+
36
+ **Before distilling, search** `.aidlc/guidance/lessons.md` and `.aidlc/guidance/lessons-digest.md` for an earlier lesson making the same claim — the same mechanism, not the same words. Then end every lesson with **exactly one resolution tag**, naming what stops it next time: `[test: <path>]`, `[check: <name or path>]`, `[guidance: <file>]`, or `[observation]` when nothing does. A lesson the search matched **cannot be tagged `[observation]`**: the project has already paid for it as prose. It names the test, check or guidance file that now stops it, or it becomes one of the step 6 follow-ups with that artifact as its smallest change, and its tag names the artifact that follow-up will build.
37
+ 6. **Cap the follow-ups — 0 to 2 queued roadmap items.** Rank what the work turned up and queue at most the top two into `.aidlc/roadmap/inbox/`, each with its six-line executive summary (see **aidlc-roadmap**) and, when `.aidlc/roadmap/milestones.yaml` exists, a `milestone:` line naming a milestone id or `none`. **Zero is a valid outcome**, and often the right one. This is the same cap, in the same shape, as the 0–3 on lessons, and it exists because the lessons cap alone was half a brake: the framework capped what an instance *learned* and capped nothing about what it *queued*, so closing an instance reliably grew the backlog. One measured project emitted five to nine items per close; triage kept three of eighteen. A repeated lesson queued under step 5 takes one of the two slots; it does not add a third.
36
38
  7. **Record the rest as observed, not queued.** Everything past the cap goes into `retrospective.md` under `## Observed, not queued`, one line each. **The cap is on queued items, not on observations** — a retro that noticed nine things writes nine and queues two. Findable, attributable, and costing nobody a triage decision. If one of them matters later, it is already written down; promote it then, with the same summary rule.
37
- 8. **Confirm, then append.** Show the distilled entry verbatim and get one confirmation for the whole entry. Never append unconfirmed text — lessons are auto-loaded into every future session, so this confirmation is the injection gate. Redact anything resembling credentials or secrets. On confirm, append to the lessons layer per the write rules below.
39
+ 8. **Confirm, then append.** Show the distilled entry verbatim and get one confirmation for the whole entry. Each lesson shows its resolution tag, and under each lesson the step-5 search matched, a line `repeats: <earlier lesson>` quoting the earlier lesson and its `— from <instance>, <date>` source — so the person can refuse a tag that leaves a paid-for mistake as prose. Never append unconfirmed text — lessons are auto-loaded into every future session, so this confirmation is the injection gate. Redact anything resembling credentials or secrets. On confirm, append to the lessons layer per the write rules below.
38
40
  9. **Commit** `retrospective.md` and the lessons append to the **current branch** now, before any worktree cleanup runs.
39
41
  10. **Remove the retro-pending marker** if one exists.
40
42
 
@@ -62,7 +64,7 @@ description: Lessons from completed instances — historical observations, not d
62
64
  ---
63
65
  ```
64
66
 
65
- The body is **append-only between consolidations**: one `## <instance> — <YYYY-MM-DD>` section per retro run, containing 1–3 bullet lessons, each ending with `— from <instance>, <date>`. A lesson that belongs in a context doc gets the suffix `[promote-to-context]` instead of editing `.aidlc/context/` directly — the retro never touches context docs.
67
+ The body is **append-only between consolidations**: one `## <instance> — <YYYY-MM-DD>` section per retro run, containing 1–3 bullet lessons, each ending with `— from <instance>, <date>`. The resolution tag from step 5 sits just before that source: `<lesson> <resolution tag> — from <instance>, <date>`. Lessons written before tags existed carry none and stay valid. A lesson that belongs in a context doc gets the suffix `[promote-to-context]` instead of editing `.aidlc/context/` directly — the retro never touches context docs. `[promote-to-context]` says where a lesson should live, not what stops it: it is not a resolution, and the lesson still carries one of the four tags.
66
68
 
67
69
  **Re-runs supersede by appending**: write a new dated section for the same instance rather than editing the old one; readers use the latest section per instance; consolidation collapses the rest.
68
70