@rasensio/aidlc-content 2.15.0 → 2.17.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
@@ -601,6 +601,27 @@ An item that has left a projected status keeps its open issue and is reported ev
601
601
  a user-side step, and a shipped action would start firing in every project on the next
602
602
  `aidlc update`.
603
603
 
604
+ ### Milestones on GitHub
605
+
606
+ With a valid `.aidlc/roadmap/milestones.yaml`, `sync` also projects each milestone to a GitHub
607
+ milestone, in file order and before any issue write. The milestone's title is its `title`, and its
608
+ description is its exit test followed by a line `aidlc-milestone: <id>` — that line, not the title, is
609
+ how the next run finds it, so renaming a milestone in the file renames it on GitHub. A milestone whose
610
+ status is done is closed; one that gains an open item again is reopened. Each projected issue is put
611
+ under its item's milestone, or has its milestone cleared when the item is Unassigned. This goes by
612
+ milestone number through `gh api`, because `gh issue edit --milestone` only finds open milestones and
613
+ an issue could then never sit under a done one. An issue the same run creates gets its milestone in
614
+ that run.
615
+
616
+ It is push-only like the rest. A milestone retitled on GitHub, or an issue moved to another milestone
617
+ there, is put back on the next sync; nothing is read back into the files. A GitHub milestone that
618
+ carries a marker the file no longer lists is reported as `milestone-orphan` and left alone — deleting
619
+ it is yours. `sync` refuses, writing nothing, when the file does not parse, when two GitHub milestones
620
+ carry the same marker, or when a milestone's title is already used by another entry or by a GitHub
621
+ milestone that is not its own. Only projected issues are counted, so a milestone's GitHub total
622
+ leaves out items whose status `sync` does not project. Without a milestones file, `sync` makes the
623
+ same calls as before and never touches an issue's milestone.
624
+
604
625
  ### Moving a Project board
605
626
 
606
627
  Put the issues on a GitHub Project and they all land in one column. That is the projection stopping
@@ -646,7 +667,7 @@ the two differ.
646
667
  - `packages/cli/src/roadmap/sync` — the GitHub projection: `plan.ts` is pure and imports no
647
668
  filesystem, no subprocess and not the `gh` seam, so planning is testable with no network at all;
648
669
  `execute.ts` is the only writer and imports no `node:fs`; `gh.ts` is the single subprocess boundary,
649
- argument-array only. `body.ts` renders the projection-owned region and merges it into an existing
670
+ argument-array only. `milestone-projection.ts` plans the GitHub milestones, as pure as `plan.ts`. `body.ts` renders the projection-owned region and merges it into an existing
650
671
  issue; `sanitize.ts` defuses item prose; `markdown.ts` is the one place that decides what counts as
651
672
  code, shared by the sanitizer and the marker scanner so the two cannot disagree.
652
673
  - `packages/cli/src/commands/roadmap.ts` — the `sync`, `import` and `board-workflow` commands,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "2.15.0",
3
+ "version": "2.17.0",
4
4
  "bugs": "https://github.com/rasensio/aidlc-feedback/issues",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -249,11 +249,12 @@ Move the item to `hold/` and append the `history` entry, with a reason prefixed
249
249
 
250
250
  Optional, opt-in, and inert until a `roadmap.sync` section exists in `.aidlc/config.yaml`. When a user asks how the roadmap can be visible to people who will not clone the repo, or how it can appear where their team already triages, the answer is `aidlc roadmap sync` — see `docs/roadmap.md`.
251
251
 
252
- Four things to know before you offer it:
252
+ Five things to know before you offer it:
253
253
 
254
254
  - It is a **projection, not sync**. Disk stays the source of truth; nothing is written back to disk, so no item gains a `remote:` field and no flow above changes. The link lives on the issue as a marker carrying the item `id`.
255
255
  - **`inbox/` and `hold/` are not projected by default**, because an untriaged idea and a parked one are not decisions anybody has published. Do not widen that list on a user's behalf.
256
256
  - **Every write needs consent.** Suggest `aidlc roadmap sync --dry-run` first, always. It prints the plan, names the target repository, and touches nothing.
257
+ - **Milestones follow the file.** With a `milestones.yaml`, sync creates, retitles, closes and reopens one GitHub milestone per entry and sets each issue's milestone from its item's `milestone:` line. Change a milestone in the file, never on GitHub — a GitHub-side edit is overwritten on the next sync.
257
258
  - **The issue body carries the whole item** — its frontmatter facts, its prose, and links to its file and to the items it names — inside a region marked `<!-- aidlc-body:begin -->` … `<!-- aidlc-body:end -->`, regenerated on every sync. Text outside that region is preserved, so a note added to an issue description survives. When somebody asks why a projected issue is out of date, the answer is that a sync has not run since the item changed, not that the body is frozen.
258
259
 
259
260
  Editing an item's body is therefore a publishing act on a repo with `roadmap.sync` configured. That is not a reason to hesitate, but it is a reason not to paste anything into an item you would not put on the tracker. Item prose is sanitized on the way out — HTML comments removed, `@name` and `#123` made inert — so no sync notifies anybody; secrets are not sanitized, and never were. If a user's braindump contains credentials, the existing hard rule applies: flag it and leave them out of the file.
@@ -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