devlyn-cli 1.12.4 → 1.12.5

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.
@@ -402,9 +402,37 @@ Skip if `--skip-docs` was set.
402
402
 
403
403
  Spawn a subagent using the Agent tool with `mode: "bypassPermissions"`.
404
404
 
405
- Agent prompt — pass this to the Agent tool:
405
+ Agent prompt — pass this to the Agent tool (include the original task description from `<pipeline_config>` so the agent can detect spec paths):
406
+
407
+ You are the Docs phase of the auto-resolve pipeline. You have two jobs, in this order.
408
+
409
+ **Job 1 — Roadmap Sync** (run first, only if this task implemented a roadmap item)
410
+
411
+ The ideate skill produces specs at `docs/roadmap/phase-N/{id}-{slug}.md` and tracks them in `docs/ROADMAP.md`. When auto-resolve finishes a task for one of those specs, the index lies until someone flips it — and nobody does, so it rots. Your job is to flip it.
412
+
413
+ 1. **Detect whether this task was a spec implementation.** Look at the original task description you were passed. Match against this regex: `docs/roadmap/phase-\d+/[^\s"'\`)]+\.md`. If there is no match, or if `docs/ROADMAP.md` does not exist in the repo, Job 1 is a no-op — skip straight to Job 2.
414
+ 2. **Sanity-check against the diff.** Run `git diff main --stat` (or `git diff HEAD~N --stat` if on main). If the diff is empty or contains only doc changes, the build phase produced nothing — do NOT flip any status. Leave Job 1 untouched and continue to Job 2.
415
+ 3. **Read the spec file** at the matched path. If its frontmatter already has `status: done`, Job 1 is already done — skip to Job 2. Otherwise:
416
+ - Set `status: done` in the frontmatter.
417
+ - Add a `completed: YYYY-MM-DD` field (use today's date from `date +%Y-%m-%d`).
418
+ - Do not change any other fields, and do not touch the body of the spec.
419
+ 4. **Update `docs/ROADMAP.md`.** Find the row whose `#` column matches the spec's `id` (e.g., row starting `| 2.3 |`). Change its Status column to `Done`. Do not touch any other row, and do not reformat the table.
420
+ 5. **Check whether the phase is now fully Done.** Read every row of the phase's table (the one containing the just-flipped row). If every row's Status is `Done`, archive the phase:
421
+ - Cut the phase's `## Phase N: …` heading and table out of the active section of ROADMAP.md.
422
+ - If no `## Completed` section exists at the bottom of the file, create one just above end-of-file (below Decisions if Decisions exists).
423
+ - Add a `<details>` block for the phase inside Completed, using the format defined in the devlyn:ideate skill's Context Archiving section. Pull each item's completion date from its spec file's `completed:` frontmatter; if a spec has none, use today's date.
424
+ - Item spec files stay on disk — do not delete them. Only the index row moves.
425
+ 6. **Report.** In your summary, say explicitly what you did: "Flipped spec 2.3 to done, updated ROADMAP.md row." And if applicable: "Phase 2 was fully Done — archived to Completed block."
426
+
427
+ **Safety invariants** — violating any of these means stop Job 1 and report it:
428
+ - Never flip a spec to `done` without a non-empty `git diff` touching non-doc files.
429
+ - Never flip multiple specs in one run — one task, one spec.
430
+ - Never edit a row whose `#` doesn't exactly match the spec's `id`.
431
+ - Never delete spec files.
432
+
433
+ **Job 2 — General doc sync**
406
434
 
407
- Synchronize documentation with recent code changes. Use `git log --oneline -20` and `git diff main` to understand what changed. Update any docs that reference changed APIs, features, or behaviors. Do not create new documentation files unless the changes introduced entirely new features with no existing docs. Preserve all forward-looking content: roadmaps, future plans, visions, open questions.
435
+ Synchronize the rest of the documentation with recent code changes. Use `git log --oneline -20` and `git diff main` to understand what changed. Update any docs that reference changed APIs, features, or behaviors. Do not create new documentation files unless the changes introduced entirely new features with no existing docs. Preserve all forward-looking content: future plans, visions, open questions. (Job 1 already handled the roadmap index — don't second-guess it here.)
408
436
 
409
437
  **After the agent completes**:
410
438
  1. **Checkpoint**: Run `git add -A && git commit -m "chore(pipeline): docs updated"` if there are changes
@@ -115,7 +115,8 @@ Expand is the most common mode after initial setup — the user already has Visi
115
115
  **On entry:**
116
116
  1. Read `docs/VISION.md`, `docs/ROADMAP.md`, and existing phase `_overview.md` files to understand the established context
117
117
  2. Scan existing item specs to understand what's built and what's planned
118
- 3. Summarize your understanding: "Here's what exists: [phases, item count, current status]. You want to add [new area]. Does this expand an existing phase or warrant a new one?"
118
+ 3. **Run the Archive Pass** (see Context Archiving below) before summarizing. Summarizing a stale roadmap to the user wastes the exchange they'll see "Phase 1 has 4 items" when really all 4 are already Done and the phase should be collapsed.
119
+ 4. Summarize your understanding: "Here's what exists: [phases, item count, current status]. You want to add [new area]. Does this expand an existing phase or warrant a new one?"
119
120
 
120
121
  **During ideation:**
121
122
  - FRAME is lighter — the vision already exists, focus on framing the NEW area only
@@ -129,7 +130,7 @@ Expand is the most common mode after initial setup — the user already has Visi
129
130
  - New item specs can reference existing items in their Dependencies section
130
131
  - If new items change the meaning of existing items, flag this: "Adding [X] may affect the scope of existing item [Y]. Should we update [Y]'s spec?"
131
132
 
132
- In Replan mode, also read existing docs first, then focus on the Converge phase to reprioritize.
133
+ In Replan mode: read existing docs first, **run the Archive Pass** (see Context Archiving below) before any reprioritization — you can't sensibly reorder work that's already finished — then focus on the Converge phase to reprioritize what remains. The Archive Pass also surfaces Backlog items whose Revisit date has passed, which are natural candidates when replanning.
133
134
 
134
135
  ### Quick Add Mode Detail
135
136
 
@@ -137,8 +138,9 @@ Quick Add is for when the user has a single concrete idea, bug report, or improv
137
138
 
138
139
  **On entry:**
139
140
  1. Read `docs/ROADMAP.md` and relevant phase `_overview.md` files
140
- 2. Identify the best-fit phase for the new item (or suggest a new phase if it doesn't fit)
141
- 3. Determine the next available item ID (e.g., if phase 2 has 2.1-2.4, the new item is 2.5)
141
+ 2. **Run the Archive Pass first** (see Context Archiving below). Do this *before* you figure out where the new item goes a stale roadmap will mislead phase selection and ID numbering. If the pass moves a phase out of the active section, the new item's natural home may change.
142
+ 3. Identify the best-fit phase for the new item (or suggest a new phase if it doesn't fit)
143
+ 4. Determine the next available item ID (e.g., if phase 2 has 2.1-2.4, the new item is 2.5)
142
144
 
143
145
  **Workflow (minimal — no full Frame/Explore/Converge):**
144
146
  1. Confirm the idea with the user: "I'll add this as [item title] in Phase [N]. That sound right?"
@@ -157,12 +159,25 @@ To implement:
157
159
 
158
160
  ### Context Archiving
159
161
 
160
- As projects progress, completed work accumulates and dilutes the active roadmap. Archive stale context at these trigger points:
162
+ ROADMAP.md is the tactical index. Every row that isn't Planned / In Progress / Blocked is noise — it dilutes attention, pads the file past its 150-line target, and makes future ideation sessions read stale context they'll have to mentally filter out. Done work should move; it shouldn't disappear.
161
163
 
162
- **When an entire phase is complete:**
163
- 1. Move the phase's table from the active section to a `## Completed` section at the bottom of ROADMAP.md
164
- 2. Keep it collapsed — just phase name, completion date, and item count
165
- 3. Item spec files stay in place (they're self-contained and may be referenced by dependencies)
164
+ The goal state: the active section of ROADMAP.md only lists work that still needs doing. Everything completed lives under a collapsed `## Completed` block at the bottom. Item spec files themselves stay in place — they remain on disk at `docs/roadmap/phase-N/{id}.md` because other specs may reference them — only the index row moves.
165
+
166
+ #### The Archive Pass
167
+
168
+ Run this at the start of every Quick Add, Expand, and Replan session (each mode's "On entry" checklist tells you when). It's deterministic and cheap. Never skip it to "save time" — the time you save by skipping it is immediately spent by you and the user arguing about a roadmap that shows phantom work.
169
+
170
+ 1. **Read `docs/ROADMAP.md`.** For each phase, look at the Status column of every row.
171
+ 2. **For each phase where every row is `Done`:** archive the whole phase.
172
+ - Cut the phase's `## Phase N: …` heading and table out of the active section.
173
+ - If no `## Completed` section exists yet at the bottom of the file, create one.
174
+ - Add a `<details>` block inside Completed for this phase (see format below). Use the latest completion date you can find in the item spec frontmatter (`completed:` field, or today's date if absent). Item count is the row count.
175
+ 3. **For individual `Done` rows inside an otherwise-active phase:** leave them in place. A row only moves when its whole phase is finished. (Mixed-state phases stay mixed so the user can see recent wins alongside open work.)
176
+ 4. **Scan the Backlog table.** Surface any row whose "Revisit" date has passed — mention it to the user as a replan candidate. Don't auto-promote it; that's a conversation.
177
+ 5. **Scan `docs/roadmap/decisions/`.** Flag any decision whose status is `accepted` but whose reasoning is visibly contradicted by the work that's now Done. Don't silently edit decisions; raise them as open questions.
178
+ 6. **Report what you did.** Before moving on to the mode's main work, tell the user in one short paragraph: "Archived Phase 1 (3 items). Active roadmap is now Phase 2 (2 items). Proceeding with [Quick Add / Expand / Replan]." Skip the report only if nothing changed.
179
+
180
+ **Completed block format** (place at the bottom of ROADMAP.md, below Decisions):
166
181
 
167
182
  ```markdown
168
183
  ## Completed
@@ -178,16 +193,13 @@ As projects progress, completed work accumulates and dilutes the active roadmap.
178
193
  </details>
179
194
  ```
180
195
 
181
- **When entering Expand or Replan mode:**
182
- 1. Scan ROADMAP.md for items marked Done — if all items in a phase are Done, archive that phase
183
- 2. Check Backlog for items whose "Revisit" date has passed — surface them as candidates for the new phase
184
- 3. Review decisions — flag any marked `accepted` that may need revisiting given new context
196
+ If the `## Completed` section already exists and you're archiving an additional phase, append a new `<details>` block — don't rewrite existing ones.
185
197
 
186
- **When a decision becomes outdated:**
187
- - Don't delete it — mark status as `superseded` and add a note pointing to the replacement decision
188
- - This preserves the reasoning history for future reference
198
+ #### Outdated decisions
189
199
 
190
- The goal: ROADMAP.md's active section should only show work that's planned, in-progress, or blocked. Everything else moves to Completed or gets re-evaluated.
200
+ When a decision becomes wrong because the world changed under it:
201
+ - Don't delete it — set its `status:` to `superseded` in the decision file's frontmatter and add a one-line pointer to the replacement decision record.
202
+ - This preserves the reasoning history for future reference, which matters more than a tidy decisions table.
191
203
 
192
204
  ## Phase 1: FRAME
193
205
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devlyn-cli",
3
- "version": "1.12.4",
3
+ "version": "1.12.5",
4
4
  "description": "AI development toolkit for Claude Code — ideate, auto-resolve, and ship with context engineering and agent orchestration",
5
5
  "homepage": "https://github.com/fysoul17/devlyn-cli#readme",
6
6
  "bin": {