@zalom/plastic 1.3.0 → 1.4.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.
Files changed (52) hide show
  1. package/PLASTIC-reference.md +8 -6
  2. package/PLASTIC.md +24 -3
  3. package/hooks/hooks.json +5 -0
  4. package/hooks/links-gate +3 -0
  5. package/package.json +1 -1
  6. package/scripts/doctor.rb +164 -58
  7. package/scripts/end-intent +347 -43
  8. package/scripts/hook-links-gate +74 -0
  9. package/scripts/lib/bridge.rb +29 -1
  10. package/scripts/lib/config_asks.rb +110 -0
  11. package/scripts/lib/graph_rebuild.rb +30 -6
  12. package/scripts/lib/hook_registry.rb +2 -1
  13. package/scripts/lib/installer_core.rb +30 -7
  14. package/scripts/lib/intent_validator.rb +38 -10
  15. package/scripts/lib/links_gate.rb +140 -0
  16. package/scripts/lib/links_projection.rb +71 -12
  17. package/scripts/lib/power_tools.rb +57 -14
  18. package/scripts/lib/project_validator.rb +113 -0
  19. package/scripts/lib/qmd_hook.rb +12 -8
  20. package/scripts/lib/restore_intent_v1.rb +154 -0
  21. package/scripts/lib/roadmap_queue.rb +1 -1
  22. package/scripts/lib/roadmap_savepoint.rb +38 -10
  23. package/scripts/lib/store_discovery.rb +77 -0
  24. package/scripts/lib/store_provisioning.rb +21 -12
  25. package/scripts/new-intent +10 -12
  26. package/scripts/project-links +132 -35
  27. package/scripts/provision-project-store +18 -5
  28. package/scripts/read-config +1 -0
  29. package/scripts/rebuild-graph +42 -17
  30. package/scripts/restore-intent-v1 +288 -0
  31. package/scripts/roadmap-next +9 -2
  32. package/scripts/roadmap-savepoint +9 -1
  33. package/scripts/update.rb +50 -1
  34. package/scripts/validate-intent +3 -1
  35. package/scripts/validate-project +53 -0
  36. package/scripts/write-config +105 -0
  37. package/skills/auto/SKILL.md +16 -10
  38. package/skills/auto/references/end-tail.md +27 -13
  39. package/skills/install/SKILL.md +4 -4
  40. package/skills/intent-creating/SKILL.md +5 -0
  41. package/skills/intent-ending/SKILL.md +49 -36
  42. package/skills/project-creating/SKILL.md +29 -1
  43. package/skills/releasing/SKILL.md +37 -19
  44. package/skills/roadmap/SKILL.md +9 -7
  45. package/skills/roadmap/references/file-format.md +14 -10
  46. package/skills/roadmap/references/operations.md +22 -18
  47. package/skills/roadmap-continuing/SKILL.md +5 -5
  48. package/skills/roadmap-continuing/evals/evals.json +3 -3
  49. package/skills/roadmap-continuing/references/liveness-ranking.md +6 -5
  50. package/skills/tutorial/references/track-3-projects-and-roadmaps.md +10 -10
  51. package/skills/update/SKILL.md +30 -17
  52. package/templates/roadmap.md +8 -8
@@ -33,19 +33,33 @@ purge-eligible. Disarming also purges stale bridge files from the temp directory
33
33
  automatically (it keeps the current bridge, any live run, and any bridge whose intent
34
34
  still holds a delivery lock), so no manual `/tmp` cleanup is needed.
35
35
 
36
- **Worktree cleanup (mandatory, intent 73c3).** Disarming performs the worktree release:
37
- `disarm_auto` calls `Worktree.release`, which removes both per-intent worktrees (the code
38
- worktree under `<repo>/.claude/worktrees/{id}--{slug}` and the paired store worktree under
39
- `<plastic_home>/.worktrees/{id}--{slug}`), prunes both repos, and clears the worktree block
40
- from the bridge. This is the plain remove path: the disarm route does NOT merge, so use it
41
- only when no release merges the branch (the branch survives and can be reclaimed).
42
-
43
- When the work is being shipped through a release, do NOT rely on this plain remove. The
44
- release path (Completion step 4, via `plastic-releasing`) is responsible for merging the
45
- intent's code branch (`plastic/{id}--{slug}`) back to the repo's default branch BEFORE the
46
- worktree is removed, so the integrated work is not lost. It does this with
47
- `Worktree.finish(bridge_data, merge: true)` (merge-then-remove). Never leave an orphaned
48
- worktree, and run `git worktree prune` if you hit a stale reference.
36
+ **Mechanized since intent 188.** `scripts/end-intent` performs this disarm itself, as its
37
+ own step 5, after steps 1-4 (outcome/INDEX/savepoint/commit) commit. No agent needs to run
38
+ a separate `Bridge.disarm_auto` one-liner any more on the auto mode / curator path: the
39
+ single `end-intent` call in `SKILL.md`'s Completion section already does it. A pre-flight
40
+ lock guard (before anything is written) refuses on a live foreign session (exit 4) and
41
+ reclaims a stale foreign lock automatically (audited to savepoint.md); a dirty code
42
+ worktree refuses before removal (exit 5, `--discard-worktree-changes` overrides
43
+ deliberately); and the durable lock file is checked again after disarm, never merely
44
+ trusted (exit 3 if it is somehow still present).
45
+
46
+ **Worktree cleanup (mandatory, intent 73c3).** `end-intent`'s step 5 calls
47
+ `Bridge.disarm_auto` by default, which calls `Worktree.release`, which removes both
48
+ per-intent worktrees (the code worktree under `<repo>/.claude/worktrees/{id}--{slug}` and
49
+ the paired store worktree under `<plastic_home>/.worktrees/{id}--{slug}`), prunes both
50
+ repos, and clears the worktree block from the bridge. This is the plain remove path: the
51
+ disarm route does NOT merge, so use it only when no release merges the branch (the branch
52
+ survives and can be reclaimed).
53
+
54
+ When the work is being shipped through a release, do NOT rely on this plain remove.
55
+ `skills/releasing/SKILL.md` reorders its own two steps for exactly this reason (intent 188,
56
+ D7): its worktree-merge step now runs BEFORE its `end-intent` call, merging the intent's
57
+ code branch (`plastic/{id}--{slug}`) back to the repo's default branch BEFORE the worktree
58
+ is removed, via `Worktree.finish(bridge_data, merge: true)` (merge-then-remove), so the
59
+ integrated work is not lost. By the time `end-intent`'s own step 5 runs afterward, the
60
+ worktree is already gone (a harmless no-op) and only the delivery lock is left to clear,
61
+ correctly, for the first time on that path. Never leave an orphaned worktree, and run
62
+ `git worktree prune` if you hit a stale reference.
49
63
 
50
64
  ## QMD reindex ordering rationale
51
65
 
@@ -103,10 +103,10 @@ Non-interactive sessions (no tty) skip the question entirely: the install ships
103
103
  shipped default, advisor enabled with no `--advisor` flag (the `plastic-agent-advisor`
104
104
  skill's own routing falls back to `plastic-faux-advisor` at consult time).
105
105
 
106
- Update flow: if `advisor.enabled` or `advisor.claude.default` are already set in
107
- `~/.plastic/config.yml`, do not re-ask; the existing value is respected, the same
108
- ask-once-when-unset rule the statusline choice below already follows. Either flag can
109
- also be passed again on `install --reinstall` to change a prior answer.
106
+ Update flow: pending config questions, including this one, are now announced
107
+ generically by `plastic-update`'s Step 2, sourced from `config_asks.yml` - not
108
+ duplicated here. A value already set by either path is never re-asked by the
109
+ other.
110
110
 
111
111
  **Statusline**
112
112
 
@@ -69,6 +69,11 @@ Having a "parent" in mind does NOT automatically mean branch. Choose by meaning:
69
69
  `--sources` when it was genuinely created from / emerged from that intent's lifecycle.
70
70
  Topic similarity alone is not a `sources` edge.
71
71
 
72
+ When a branch intent exists because a late ruling arrived AFTER its parent was already
73
+ completed (the owner's late-ruling rule), the parent is restored to v1 via
74
+ `scripts/restore-intent-v1`, never by a hand-run `git checkout`/revert. See `PLASTIC.md` >
75
+ Terminal immutability for the rule and the tool.
76
+
72
77
  `## Links` is a DERIVED view of `sources`/`chain`. Never hand-write a `## Links` line; add the
73
78
  frontmatter edge and reproject. Links are decided by context influence (a `chain` edge has a high
74
79
  bar: the candidate's context must materially help deliver this intent), not by shared files or a
@@ -24,15 +24,16 @@ failure branch: only outcome.md content and the INDEX section differ.
24
24
  | 2 | INDEX.md terminal move (Active -> Completed/Abandoned) | `scripts/end-intent` |
25
25
  | 3 | savepoint `Done` bookend | `scripts/end-intent` |
26
26
  | 4 | store auto-commit | `scripts/end-intent` |
27
- | 5 | disarm (worktree + lock) | You, after end-intent exits 0 |
27
+ | 5 | disarm (worktree + lock) | `scripts/end-intent` (intent 188) |
28
28
  | 6 | QMD reindex, async, LAST | You |
29
29
  | 7 | EM-to-CTO report | You |
30
30
 
31
- Steps 1-4 are ONE callable script, not four separate one-liners: this is
32
- exactly what the failure mode this intent fixes looked like (releasing hand
31
+ Steps 1-5 are ONE callable script call, not several separate one-liners: this
32
+ is exactly what the failure mode this intent fixes looked like (releasing hand
33
33
  authored the close in prose and dropped the savepoint bookend for two real
34
- deliveries). Never restate outcome/INDEX/savepoint prose inline again; call
35
- `scripts/end-intent`.
34
+ deliveries; separately, one session delivered four intents back to back and
35
+ never ran the old step-5 one-liner at all, intent 188). Never restate
36
+ outcome/INDEX/savepoint/disarm prose inline again; call `scripts/end-intent`.
36
37
 
37
38
  ### Step 0. Precondition (the gate is section-blind, not selective)
38
39
 
@@ -55,7 +56,7 @@ for orchestrator-owned or completion-tracking items.
55
56
  (tick it if the described work is actually done, or do the remaining
56
57
  work); do not attempt outcome.md and fight the gate's deny.
57
58
 
58
- ### Step 1-4. Run `scripts/end-intent`
59
+ ### Step 1-5. Run `scripts/end-intent`
59
60
 
60
61
  First author outcome.md for real (never leave the scaffold placeholder in
61
62
  place): copy `templates/outcome.md`, set the frontmatter to
@@ -72,40 +73,52 @@ Then call the script once:
72
73
  ```bash
73
74
  ruby ~/.plastic/scripts/end-intent \
74
75
  --store <store_path> --id <intent_id> --disposition delivered|abandoned \
76
+ --session "$CLAUDE_CODE_SESSION_ID" \
75
77
  --outcome-summary "<one-line ## Outcome summary for the intent file>" \
76
78
  --index-note "<rich Completed/Abandoned entry description>"
77
79
  ```
78
80
 
79
- This does all of steps 1-4 in order: guards outcome.md (refuses a missing,
81
+ This does all of steps 1-5 in order: guards outcome.md (refuses a missing,
80
82
  still-placeholder, or wrong-disposition file with exit 2 and authors
81
83
  nothing), stamps the intent file's `## Outcome` section, moves the INDEX.md
82
84
  line from `## Active` to `## Completed` or `## Abandoned` (dated today,
83
- idempotent) with the `--index-note` text appended after the date so the
84
- entry stays rich, appends the savepoint `Done` bookend, and commits the
85
- store repo. Omit `--index-note` for a thin id+date entry, add `--no-commit`
86
- when a separate commit step already covers the store, and `--dry-run` to
87
- preview with no writes. Exit 0 is success; exit 1 is a usage or resolution
88
- failure; exit 2 is the outcome.md guard refusing (fix outcome.md and re-run,
89
- nothing was written).
90
-
91
- ### Step 5. Disarm (worktree + lock)
92
-
93
- Two branches, decided by how this intent ships:
94
-
95
- - **Shipped through a release** (the `plastic-releasing` flow reached this
96
- close): merge the code branch back BEFORE removing the worktrees, via
97
- `Worktree.finish(bridge_data, merge: true)`. Releasing's own workflow
98
- already drives this; this skill's job here is only the outcome/INDEX/
99
- savepoint/commit core above.
100
- - **Auto mode or the curator path** (no release involved): plain remove,
101
- branch survives for reclaim.
102
- ```bash
103
- ruby -r ~/.plastic/scripts/lib/bridge -e \
104
- 'Bridge.disarm_auto(ENV["CLAUDE_CODE_SESSION_ID"], intent_id: "<ID>")'
105
- ```
106
- `disarm_auto` releases both worktrees, clears the `delivery.lock`, and only
107
- then makes the bridge purge-eligible, in that order. Never leave an
108
- orphaned worktree; run `git worktree prune` on a stale reference.
85
+ idempotent, accepting either a real em dash or a plain hyphen as the id/
86
+ title separator on read while always emitting the real em dash on write)
87
+ with the `--index-note` text appended after the date so the entry stays
88
+ rich, appends the savepoint `Done` bookend, commits the store repo, and
89
+ disarms (releases the code worktree and clears `delivery.lock`, verified
90
+ against the durable lock file on disk, never merely trusted). Omit
91
+ `--index-note` for a thin id+date entry, add `--no-commit` when a separate
92
+ commit step already covers the store (this never skips disarm), and
93
+ `--dry-run` to preview steps 1-5 with no writes.
94
+
95
+ A pre-flight lock guard runs before anything is written: it resolves the
96
+ calling session (`--session`, else `CLAUDE_CODE_SESSION_ID`, else the
97
+ existing lock's own recorded owner, else a no-op) and checks it against any
98
+ existing `delivery.lock`. A live foreign session refuses the whole run
99
+ (exit 4, nothing written); a stale foreign lock is reclaimed automatically
100
+ (audited to savepoint.md) and the run proceeds as the new owner. Before
101
+ removing the worktree, step 5 also refuses on an unexpectedly dirty code
102
+ worktree (exit 5, naming the worktree path) rather than force-discarding
103
+ uncommitted changes; pass `--discard-worktree-changes` only when you mean
104
+ to override that deliberately.
105
+
106
+ On the auto mode / curator path (no release), this single call performs the
107
+ FULL disarm (plain worktree remove, since the branch survives for later
108
+ reclaim). On a release-shipped path, `skills/releasing/SKILL.md` merges and
109
+ removes the worktree FIRST (its own step 8, merge-then-remove) before ever
110
+ calling this script, so by the time this call's step 5 runs, the worktree is
111
+ already gone (a harmless no-op) and only the lock is left to clear,
112
+ correctly, for the first time on that path (D7).
113
+
114
+ Exit codes: 0 success (the intent is closed AND its delivery lock is gone);
115
+ 1 a usage or resolution failure, OR an INDEX id that resolves to neither
116
+ `## Active` nor the terminal section; 2 the outcome.md guard refusing (fix
117
+ outcome.md and re-run, nothing was written); 3 steps 1-4 already committed
118
+ but disarm could not verify the lock is gone afterward (run `/plastic-doctor
119
+ check the lock status`); 4 a live foreign session holds the lock (back off);
120
+ 5 the code worktree is dirty (commit/stash first, or pass
121
+ `--discard-worktree-changes` deliberately).
109
122
 
110
123
  ### Step 6. QMD reindex, LAST
111
124
 
@@ -146,6 +159,6 @@ historical record of what was planned.
146
159
 
147
160
  `plastic-releasing`, `plastic-auto`, the curator agent, `store-curating`, and
148
161
  `store-indexing` all delegate their mechanical close to this skill (or call
149
- `scripts/end-intent` directly for steps 1-4). None of them restate the
150
- outcome/INDEX/savepoint prose inline any more; if you find one that does,
151
- that surface has drifted and should route here instead.
162
+ `scripts/end-intent` directly for steps 1-5). None of them restate the
163
+ outcome/INDEX/savepoint/disarm prose inline any more; if you find one that
164
+ does, that surface has drifted and should route here instead.
@@ -122,7 +122,35 @@ ruby ~/.plastic/scripts/qmd-sync register --store ~/.plastic/projects/<slug>/sto
122
122
  `qmd-sync` no-ops when QMD is absent, so run it unconditionally. This adds the
123
123
  `plastic-<slug>` collection and indexes it.
124
124
 
125
- ### 12. Announce
125
+ ### 12. Self-Check with validate-project
126
+
127
+ Before announcing, verify the spawn actually landed everything it claims to
128
+ have created. Run:
129
+
130
+ ```bash
131
+ ruby ~/.plastic/scripts/validate-project <slug>
132
+ ```
133
+
134
+ If this exits 0, proceed to step 13. If it exits non-zero, STOP: do not
135
+ proceed to Announce. Read the `missing:` and error lines it printed to
136
+ stderr, fix the named gap(s), for example:
137
+
138
+ - missing `project.yml` or `INDEX.md` or `store/`: re-run
139
+ `ruby ~/.plastic/scripts/provision-project-store <slug>` (step 7), then
140
+ re-check
141
+ - missing project-root `AGENTS.md`: repeat step 4 (populate AGENTS.md at the
142
+ project root, not `~/.plastic/projects/<slug>/`)
143
+ - project directory missing on disk: repeat step 2
144
+ - not registered in projects.yml: repeat step 6
145
+
146
+ Re-run `validate-project <slug>` after each fix until it exits 0. Only a
147
+ project spawn that passes this self-check moves on to be announced as
148
+ created. A spawn that never verifies itself is exactly the bug this step
149
+ exists to close (intent 190; the intent-26 spawn shipped with no
150
+ `project.yml` and no root `AGENTS.md`, caught only weeks later by a doctor
151
+ sweep).
152
+
153
+ ### 13. Announce
126
154
 
127
155
  Log in `## Insights` of each founding intent:
128
156
  > "Project `<slug>` created at `<path>`. Tactical mirror: `project-<slug>:1` (autonomous)"
@@ -21,8 +21,8 @@ Project configuration drives the workflow - no hardcoded assumptions.
21
21
  - [ ] Push to remote with tags
22
22
  - [ ] Run post-push actions (GitHub release, npm publish, etc.)
23
23
  - [ ] Verify release sync (npm dist-tag, GitHub "Latest", git tag all show the new version)
24
- - [ ] Complete active intent
25
24
  - [ ] Clean up the intent's worktrees (merge-then-remove)
25
+ - [ ] Complete active intent
26
26
 
27
27
  ## Workflow
28
28
 
@@ -232,25 +232,19 @@ If the GitHub "Latest" badge is on an older tag (the common drift), fix it witho
232
232
  gh release edit <tag-name> --latest
233
233
  ```
234
234
 
235
- ### 8. Complete Active Intent
236
-
237
- A release IS a delivery. The active intent that drove this work must be completed as part of the release process. This is NOT optional. The mechanical close (outcome/INDEX/savepoint/commit) is `plastic-intent-ending`'s job, not this skill's: run its backing script rather than restating that prose here.
238
-
239
- 1. Read `~/.plastic/INDEX.md` (or the project's INDEX.md) - find active intent(s) related to this release.
240
- 2. For each active intent being delivered:
241
- a. Write a real `outcome.md` (never leave the scaffold placeholder), `disposition: delivered`, referencing the release tag.
242
- b. Update `## Insights` with final observations.
243
- c. Run the mechanical close (steps 1-4 of `plastic-intent-ending`): this stamps the intent file's `## Outcome` summary, moves the INDEX.md line to `## Completed` (dated today, with a rich entry description via `--index-note`), appends the savepoint `Done` bookend, and commits the store, all in one call:
244
- ```bash
245
- ruby ~/.plastic/scripts/end-intent --store <store_path> --id <ID> --disposition delivered \
246
- --outcome-summary "delivered in <tag-name>: <one-line summary>" \
247
- --index-note "<tag-name>, <mode/tier>; <what shipped>; <suite result>"
248
- ```
249
- d. Update clusters to show `_(completed)_` (the store-curating skill's job on its next pass).
250
-
251
- **If no active intent exists for this release**, that itself is a problem - work happened outside the intent system. Log it and move on, but flag it.
235
+ ### 8. Clean Up the Intent's Worktrees (merge-then-remove)
252
236
 
253
- ### 9. Clean Up the Intent's Worktrees (merge-then-remove)
237
+ This step now runs BEFORE step 9's `end-intent` call (intent 188, D7): `scripts/end-intent`
238
+ gained its own step 5 that disarms (releases the worktree, clears `delivery.lock`) as part
239
+ of every close. Its plain-remove shape does not merge, so if `end-intent` ran first on a
240
+ release, its step 5 would remove the worktree WITHOUT merging the code branch first,
241
+ stranding the integrated work (`Worktree.finish` returns early once the worktree block it
242
+ needs is gone, per `worktree.rb`'s own "no-op if nothing was provisioned" contract).
243
+ Running this merge-then-remove step first means the worktree is already gone by the time
244
+ step 9 runs, so `end-intent`'s own disarm becomes a harmless no-op for the worktree
245
+ (nothing left to remove), while for the FIRST time on this path it also clears the delivery
246
+ lock correctly (G5): before intent 188 this path left the lock stranded, exactly the class
247
+ of bug closed by the End-tail enforcement work.
254
248
 
255
249
  This is the release branch of `plastic-intent-ending`'s Step 5 disarm (`merge: true`), not a
256
250
  separate concern: a release is the merge-then-remove path for the intent's worktrees (intent
@@ -272,6 +266,30 @@ prune` in the affected repo if you hit a stale reference. For why this is the on
272
266
  merge-vs-remove policy lands on merge, and the fail-open/idempotent guarantees of `finish`,
273
267
  read `references/promotion-and-tagging.md`.
274
268
 
269
+ ### 9. Complete Active Intent
270
+
271
+ A release IS a delivery. The active intent that drove this work must be completed as part of the release process. This is NOT optional. The mechanical close (outcome/INDEX/savepoint/commit, AND disarm since intent 188) is `plastic-intent-ending`'s job, not this skill's: run its backing script rather than restating that prose here.
272
+
273
+ 1. Read `~/.plastic/INDEX.md` (or the project's INDEX.md) - find active intent(s) related to this release.
274
+ 2. For each active intent being delivered:
275
+ a. Write a real `outcome.md` (never leave the scaffold placeholder), `disposition: delivered`, referencing the release tag.
276
+ b. Update `## Insights` with final observations.
277
+ c. Run the mechanical close (`scripts/end-intent`'s steps 1-5): this stamps the intent file's `## Outcome` summary, moves the INDEX.md line to `## Completed` (dated today, with a rich entry description via `--index-note`), appends the savepoint `Done` bookend, commits the store, and disarms (releases the worktree - already gone from step 8 above - and clears `delivery.lock`), all in one call:
278
+ ```bash
279
+ ruby ~/.plastic/scripts/end-intent --store <store_path> --id <ID> --disposition delivered \
280
+ --session "$CLAUDE_CODE_SESSION_ID" \
281
+ --outcome-summary "delivered in <tag-name>: <one-line summary>" \
282
+ --index-note "<tag-name>, <mode/tier>; <what shipped>; <suite result>"
283
+ ```
284
+ A non-zero exit needs attention: 4 means a live foreign session holds the lock (back
285
+ off), 5 means the code worktree is still dirty (should not happen here, since step 8
286
+ already removed it; investigate before overriding with `--discard-worktree-changes`),
287
+ 3 means disarm ran but the lock is still present (run `/plastic-doctor check the lock
288
+ status`).
289
+ d. Update clusters to show `_(completed)_` (the store-curating skill's job on its next pass).
290
+
291
+ **If no active intent exists for this release**, that itself is a problem - work happened outside the intent system. Log it and move on, but flag it.
292
+
275
293
  ## Release lines and channels
276
294
 
277
295
  Two lanes get code to a release, on top of the workflow above.
@@ -13,10 +13,12 @@ to a release (completion-side, `CHANGELOG.md`). It lives at `roadmaps/{slug}.md`
13
13
  project's `INDEX.md` and `project.yml`). It never sits inside `store/`, which holds intent
14
14
  directories, not project artifacts.
15
15
 
16
- A roadmap file has four parts: a title/meta header, `## Goal` (prose), `## Waves` (ordered; entries
17
- inside a wave are parallel-safe, waves run sequentially), and an append-only dated `## Log`. Each
18
- wave entry mirrors that intent's status in `INDEX.md` (`queued`/`delivering`/`delivered`/
19
- `abandoned`/`blocked`).
16
+ A roadmap file has four parts: a title/meta header, `## Goal` (prose), `## Batches` (ordered;
17
+ entries inside a batch are parallel-safe, batches run sequentially), and an append-only dated
18
+ `## Log`. A roadmap written before owner ruling 145 may instead use the legacy `## Waves` heading;
19
+ reading accepts both, but every new roadmap is scaffolded with `## Batches`, and an existing
20
+ roadmap file's heading is never renamed to migrate it. Each batch entry mirrors that intent's
21
+ status in `INDEX.md` (`queued`/`delivering`/`delivered`/`abandoned`/`blocked`).
20
22
 
21
23
  **`INDEX.md` is the single writer of intent status; on any conflict INDEX wins and the roadmap
22
24
  entry is corrected to match.**
@@ -31,9 +33,9 @@ Read/Edit-only.
31
33
  | Verb | When | Mechanics |
32
34
  |------|------|-----------|
33
35
  | Create | user wants to start a new roadmap / plan a delivery batch | `references/operations.md#create` |
34
- | Add / reorder entries | user wants to add intents to a wave or resequence waves | `references/operations.md#add--reorder-entries` |
36
+ | Add / reorder entries | user wants to add intents to a batch or resequence batches | `references/operations.md#add--reorder-entries` |
35
37
  | Sync status mirror | an entry's status may be stale against INDEX | `references/operations.md#sync-status-mirror` |
36
- | Append log line | a roadmap event just happened (created, wave done, closed) | `references/operations.md#append-a-log-line` |
38
+ | Append log line | a roadmap event just happened (created, batch done, closed) | `references/operations.md#append-a-log-line` |
37
39
  | Read / consume | a human or a coordinator needs the roadmap's current state | `references/operations.md#read--consume` |
38
40
  | Close / archive | the roadmap's `## Goal` is reached | `references/operations.md#close--archive` |
39
41
 
@@ -47,7 +49,7 @@ verb above.
47
49
  layout per project. The general rule: `roadmaps/` is a sibling of `INDEX.md`, wherever `INDEX.md`
48
50
  lives.
49
51
  - `## Goal` is a checkable prose condition read by a human or agent, not an executable checker.
50
- - Wave entries render as checkboxes (`- [x] ... — delivered` / `- [ ] ... — <status>`); a human
52
+ - Batch entries render as checkboxes (`- [x] ... — delivered` / `- [ ] ... — <status>`); a human
51
53
  reading cold should see shipped/running/next within a minute. `## Log` lines are one-sentence,
52
54
  EM-to-CTO-voice, dated, and link each entry-intent's `outcome.md` (lossless-by-reference).
53
55
  - Additive: this skill introduces no gate, lock, or hook, and does not change `INDEX.md`'s section
@@ -21,15 +21,19 @@ it in the same Close/archive step.
21
21
  roadmap delivers and which tier (project or global) it lives in.
22
22
  2. **`## Goal`** — a checkable prose condition: one or a few sentences a human or coordinator reads
23
23
  to decide the roadmap is done. Not an executable checker, not a list of tasks.
24
- 3. **`## Waves`** — ordered waves (`### Wave 1`, `### Wave 2`, ...). Entries inside a wave are
25
- parallel-safe (can be dispatched together); waves run top to bottom, sequentially (wave 2 does
26
- not start until wave 1's entries are no longer `queued`/`delivering`).
24
+ 3. **`## Batches`** — ordered batches (`### Batch 1`, `### Batch 2`, ...). Entries inside a batch
25
+ are parallel-safe (can be dispatched together); batches run top to bottom, sequentially (batch 2
26
+ does not start until batch 1's entries are no longer `queued`/`delivering`). A roadmap written
27
+ before owner ruling 145 may instead use `## Waves` / `### Wave N`; both headings are accepted
28
+ when reading, but every new roadmap is scaffolded with `## Batches`, and an existing roadmap
29
+ file's heading is never renamed to migrate it.
27
30
  4. **`## Log`** — append-only, dated, one line per event. Newest entry at the bottom. Never edit or
28
31
  remove an existing log line.
29
32
 
30
33
  ## Entry line shape
31
34
 
32
- One line per intent, inside its wave, as a Markdown checkbox:
35
+ One line per intent, inside its batch (or wave, on a roadmap still using the legacy heading), as a
36
+ Markdown checkbox:
33
37
 
34
38
  ```
35
39
  - [x] <intent-id> <title> — delivered
@@ -80,8 +84,8 @@ Line shape, one event per line, append-only, newest at the bottom:
80
84
 
81
85
  Two-space fields, mirroring the intent-dir cycle-step ledger (`savepoint.md`). The controlled event
82
86
  vocabulary: `created`, `dispatched`, `parked`, `merged`, `release`, `handoff`, `closed`, and
83
- optionally `added`, `reordered`, `wave`. The `(event, detail)` pair is the idempotency key, so
84
- re-appending the same pair is a no-op.
87
+ optionally `added`, `reordered`, `wave`, `batch`. The `(event, detail)` pair is the idempotency key,
88
+ so re-appending the same pair is a no-op.
85
89
 
86
90
  `## Log` and the ledger record the same events in two voices: the Log is the dated, one-sentence,
87
91
  EM-to-CTO-plain-language record a human reads cold; the ledger is the terse, machine-timestamped,
@@ -102,16 +106,16 @@ Delivery-side collection of intents that close out the pre-1.0 hardening pass, p
102
106
  ## Goal
103
107
  All intents below are delivered, the suite is green, and a 1.0.0 release is cut.
104
108
 
105
- ## Waves
106
- Entries in a wave are parallel-safe; waves run top to bottom. The checkbox tracks delivered/not;
109
+ ## Batches
110
+ Entries in a batch are parallel-safe; batches run top to bottom. The checkbox tracks delivered/not;
107
111
  the token after the em-dash carries the precise mirrored status (queued | delivering | delivered |
108
112
  abandoned | blocked); INDEX wins on any conflict.
109
113
 
110
- ### Wave 1
114
+ ### Batch 1
111
115
  - [x] 121 Fix bash gate redirect parsing — delivered
112
116
  - [ ] 130 Proportional cycle tiers — delivering
113
117
 
114
- ### Wave 2
118
+ ### Batch 2
115
119
  - [x] 124 Roadmap feature — delivered
116
120
 
117
121
  ## Log
@@ -16,7 +16,7 @@ next" in under a minute, just from this one file.
16
16
  3. Copy `templates/roadmap.md` to `roadmaps/{slug}.md`.
17
17
  4. Fill the header (`# Roadmap: <title>` + the one-line meta) and write a real `## Goal` prose
18
18
  condition.
19
- 5. Add at least one `## Waves` wave with real entries (see Add / reorder below), each entry's
19
+ 5. Add at least one `## Batches` batch with real entries (see Add / reorder below), each entry's
20
20
  status mirroring that intent's current `INDEX.md` status.
21
21
  6. Append the first `## Log` line, a short `YYYY-MM-DD HH:MM UTC`-prefixed plain-language note
22
22
  that the roadmap was created.
@@ -28,18 +28,20 @@ next" in under a minute, just from this one file.
28
28
 
29
29
  ## Add / reorder entries
30
30
 
31
- - **Add**: append an entry line (`- <intent-id> <title> — <status>`) to the target wave. Pick the
31
+ - **Add**: append an entry line (`- <intent-id> <title> — <status>`) to the target batch. Pick the
32
32
  intent's title and status straight from `INDEX.md`.
33
- - **New wave**: add a new `### Wave N` heading after the last wave; entries in it are gated behind
34
- every earlier wave's entries leaving `queued`/`delivering`.
35
- - **Reorder**: move an entry line to a different wave, or move a `### Wave` heading (with its
36
- entries) earlier or later. Reordering never changes an entry's status; it only changes when the
37
- entry is eligible to run.
33
+ - **New batch**: add a new `### Batch N` heading after the last batch; entries in it are gated
34
+ behind every earlier batch's entries leaving `queued`/`delivering`. A roadmap still on the legacy
35
+ `## Waves` heading keeps using `### Wave N` for a new entry; never migrate an existing roadmap's
36
+ heading to add one.
37
+ - **Reorder**: move an entry line to a different batch, or move a `### Batch` (or, on a legacy
38
+ roadmap, `### Wave`) heading (with its entries) earlier or later. Reordering never changes an
39
+ entry's status; it only changes when the entry is eligible to run.
38
40
  - After any add/reorder, append a `## Log` line describing the change (e.g.
39
- `- <YYYY-MM-DD HH:MM UTC> added 132 to wave 2`).
41
+ `- <YYYY-MM-DD HH:MM UTC> added 132 to batch 2`).
40
42
  - Append the ledger event (derived, idempotent, safe to re-run; never writes INDEX or roadmap
41
43
  status): `ruby ~/.plastic/scripts/roadmap-savepoint append --roadmap roadmaps/<slug>.md --event
42
- added --detail "<id> to wave N"` for an add, or `--event reordered` for a reorder (describe the
44
+ added --detail "<id> to batch N"` for an add, or `--event reordered` for a reorder (describe the
43
45
  move in `<detail>`).
44
46
  - Refresh the QMD index for this roadmap (no-op when QMD is absent), in the background so it
45
47
  never blocks: `ruby ~/.plastic/scripts/qmd-sync reindex --store <roadmaps-dir> --async`.
@@ -70,7 +72,7 @@ next" in under a minute, just from this one file.
70
72
  edit or delete an existing line (append-only).
71
73
  - Every line is plain language a non-expert can read, never a codename or a raw `field -> value`.
72
74
  A delivery event follows the EM-to-CTO one-line shape with an `outcome.md` link (see
73
- `file-format.md`); bookkeeping events (created, an intent added to a wave, a wave completed, a
75
+ `file-format.md`); bookkeeping events (created, an intent added to a batch, a batch completed, a
74
76
  roadmap closed) are short dated plain-language lines.
75
77
  - Append the matching ledger event (derived, idempotent, never writes INDEX or roadmap status):
76
78
  when the line records a release cut, `ruby ~/.plastic/scripts/roadmap-savepoint append --roadmap
@@ -81,14 +83,16 @@ next" in under a minute, just from this one file.
81
83
 
82
84
  ## Read / consume
83
85
 
84
- - A human reading the file gets the current picture directly: `## Goal` for the target, `## Waves`
85
- for what is queued/delivering/delivered per wave (checkboxes give the shipped/not-shipped view at
86
- a glance), `## Log` for a one-line, plain-language history with a link into each intent's
87
- `outcome.md` for detail.
88
- - A future coordinator (for example, an auto-mode dispatcher) reads `## Waves` top to bottom:
89
- a wave is eligible to dispatch once every entry in the previous wave is no longer
90
- `queued`/`delivering`; within an eligible wave, entries still `queued` are parallel-dispatchable.
91
- Always re-sync against `INDEX.md` before dispatch decisions, since INDEX is the source of truth.
86
+ - A human reading the file gets the current picture directly: `## Goal` for the target, `## Batches`
87
+ (or, on a roadmap still using the legacy `## Waves` heading, that section instead) for what is
88
+ queued/delivering/delivered per batch (checkboxes give the shipped/not-shipped view at a glance),
89
+ `## Log` for a one-line, plain-language history with a link into each intent's `outcome.md` for
90
+ detail.
91
+ - A future coordinator (for example, an auto-mode dispatcher) reads the grouping section
92
+ (`## Batches`, or legacy `## Waves`) top to bottom: a batch is eligible to dispatch once every
93
+ entry in the previous batch is no longer `queued`/`delivering`; within an eligible batch, entries
94
+ still `queued` are parallel-dispatchable. Always re-sync against `INDEX.md` before dispatch
95
+ decisions, since INDEX is the source of truth.
92
96
 
93
97
  ## Close / archive
94
98
 
@@ -2,7 +2,7 @@
2
2
  name: plastic-roadmap-continuing
3
3
  description: >-
4
4
  Use when the user wants to continue or resume a roadmap, pick up a mid-flight delivery batch,
5
- asks "where is the roadmap", or wants to resume the wave that was shipping, including an
5
+ asks "where is the roadmap", or wants to resume the batch that was shipping, including an
6
6
  indirect ask that never names a roadmap directly (for example "where did that batch of
7
7
  intents land"). This is the roadmap route of plastic-continuing: it finds the tier's
8
8
  mid-flight roadmap, presents its state, then asks how to proceed exactly once.
@@ -27,7 +27,7 @@ roadmap handoff had to be resumed by hand, carried as a free-prose note in `171`
27
27
  2. For each candidate, also read its paired ledger `roadmaps/<slug>.savepoint.md` when present
28
28
  (see `plastic-roadmap`'s `references/file-format.md#savepoint-ledger`): its last line(s) are a
29
29
  cheaper, precise last-event signal (for example `dispatched 134` or `merged 172`), read
30
- alongside the existing `## Waves`/`## Log` judgment. The ledger is read-only here, a derived
30
+ alongside the existing `## Batches` (or legacy `## Waves`) / `## Log` judgment. The ledger is read-only here, a derived
31
31
  signal, never a new status field; INDEX.md stays the sole status writer.
32
32
  3. Rank liveness by calling the shared reader in which mode (one implementation across the
33
33
  auto loop and this skill):
@@ -47,7 +47,7 @@ roadmap handoff had to be resumed by hand, carried as a free-prose note in `171`
47
47
 
48
48
  ## Present state
49
49
 
50
- Present the chosen roadmap's `## Goal`, the current wave with each entry's mirrored status, the
50
+ Present the chosen roadmap's `## Goal`, the current batch with each entry's mirrored status, the
51
51
  ledger's newest line(s) (the last mechanized event) alongside the newest `## Log` line, before any
52
52
  ask, so the coordinator sees the machine last-event at a glance.
53
53
 
@@ -56,7 +56,7 @@ ask, so the coordinator sees the machine last-event at a glance.
56
56
  Ask "auto or guided?" exactly once, after presenting state, mirroring
57
57
  `plastic-intent-starting`'s single-ask contract:
58
58
  - **guided** -> continue step by step with the user.
59
- - **auto** -> hand off to `plastic-auto` to drive the next wave or entry.
59
+ - **auto** -> hand off to `plastic-auto` to drive the next batch or entry.
60
60
 
61
61
  Never re-ask. No new roadmap or INDEX status field is invented anywhere in this flow.
62
62
 
@@ -78,7 +78,7 @@ This skill is a reader, not a writer, of `roadmaps/<slug>.savepoint.md`. The coo
78
78
  ~/.plastic/scripts/roadmap-savepoint append` at their own dispatch, merge, park, handoff, and
79
79
  release points, the same events `plastic-roadmap`'s verbs append at their closing steps. A
80
80
  resuming coordinator therefore both reads the ledger here and writes to it as it drives the next
81
- wave or entry.
81
+ batch or entry.
82
82
 
83
83
  ## References
84
84
 
@@ -35,8 +35,8 @@
35
35
  },
36
36
  {
37
37
  "id": 4, "scope": "behavior", "set": "train",
38
- "prompt": "Does the skill rank liveness correctly when a wave entry is delivering or blocked?",
39
- "expected_output": "A roadmap with any delivering/blocked wave entry wins the ranking outright over every other candidate.",
38
+ "prompt": "Does the skill rank liveness correctly when a batch entry is delivering or blocked?",
39
+ "expected_output": "A roadmap with any delivering/blocked batch entry wins the ranking outright over every other candidate.",
40
40
  "files": ["skills/roadmap-continuing/references/liveness-ranking.md"],
41
41
  "assertions": [
42
42
  { "type": "convention", "check": "delivering/blocked-wins rule documented as step 2 of the algorithm", "observed": "present", "result": "pass" }
@@ -54,7 +54,7 @@
54
54
  {
55
55
  "id": 6, "scope": "behavior", "set": "train",
56
56
  "prompt": "Does the skill present the roadmap state before asking?",
57
- "expected_output": "The '## Present state' section (Goal, current wave, newest Log line) runs before the '## Ask once' section.",
57
+ "expected_output": "The '## Present state' section (Goal, current batch, newest Log line) runs before the '## Ask once' section.",
58
58
  "files": ["skills/roadmap-continuing/SKILL.md"],
59
59
  "assertions": [
60
60
  { "type": "convention", "check": "Present state precedes Ask once in document order", "observed": "present", "result": "pass" }
@@ -19,8 +19,9 @@ tier's live `roadmaps/*.md` files (excluding `roadmaps/archived/`), by `RoadmapQ
19
19
 
20
20
  1. **Enumerate.** List every `roadmaps/*.md` at the tier (project or global), skipping
21
21
  `roadmaps/archived/`.
22
- 2. **Delivering/blocked wins outright.** If any candidate roadmap has at least one `## Waves`
23
- entry whose mirrored status token is `delivering` or `blocked`, it is in flight right now.
22
+ 2. **Delivering/blocked wins outright.** If any candidate roadmap has at least one grouping-section
23
+ entry (`## Batches`, or legacy `## Waves`) whose mirrored status token is `delivering` or
24
+ `blocked`, it is in flight right now.
24
25
  That candidate wins the ranking immediately; skip the rest of the ranking for it.
25
26
  3. **Otherwise, newest `## Log` entry wins.** Among the remaining candidates (none have a
26
27
  `delivering`/`blocked` entry), read each file's last `## Log` line (append-only, newest at
@@ -42,8 +43,8 @@ tier's live `roadmaps/*.md` files (excluding `roadmaps/archived/`), by `RoadmapQ
42
43
 
43
44
  Before this skill existed, nothing resumed a mid-flight roadmap automatically. The `171`
44
45
  (consistency-dividend) roadmap handoff had to be resumed by hand: a free-prose "SESSION
45
- HANDOFF" note written into `171`'s own `## Insights`, because nothing read `## Waves` +
46
- `## Log` and reconstructed where the batch stood. This ranking, now a deterministic reader
46
+ HANDOFF" note written into `171`'s own `## Insights`, because nothing read the grouping section
47
+ (`## Batches`/legacy `## Waves`) + `## Log` and reconstructed where the batch stood. This ranking, now a deterministic reader
47
48
  rather than a by-eye judgment, is the mechanism that replaces that hand-carried note.
48
49
 
49
50
  ## Grammar pointer (do not duplicate)
@@ -52,5 +53,5 @@ The roadmap file's four sections, entry line shape, and status vocabulary
52
53
  (`queued|delivering|delivered|abandoned|blocked`) are owned by `plastic-roadmap`:
53
54
  `skills/roadmap/references/file-format.md` for the shape, and
54
55
  `skills/roadmap/references/operations.md#read--consume` for how a reader (human or
55
- coordinator) is meant to walk `## Waves` and `## Log`. This page assumes that grammar and adds
56
+ coordinator) is meant to walk `## Batches` (or legacy `## Waves`) and `## Log`. This page assumes that grammar and adds
56
57
  only the liveness-ranking judgment on top of it.