@zalom/plastic 1.14.1 → 2.0.0-alpha.10

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 (213) hide show
  1. package/PLASTIC.md +101 -294
  2. package/README.md +5 -6
  3. package/agents/plastic-advisor.md +18 -17
  4. package/agents/plastic-enforcer.md +57 -69
  5. package/agents/plastic-executor.md +34 -20
  6. package/agents/plastic-faux-advisor.md +18 -18
  7. package/bin/lib/context_budget.rb +453 -0
  8. package/bin/plastic-bench +78 -0
  9. package/config_asks.yml +38 -0
  10. package/hooks/capture +4 -0
  11. package/hooks/close +5 -0
  12. package/hooks/hooks.json +14 -42
  13. package/hooks/message-display +81 -0
  14. package/hooks/record +4 -0
  15. package/hooks/savepoint +5 -5
  16. package/package.json +3 -2
  17. package/scripts/agent-report +15 -10
  18. package/scripts/append-ledger +208 -0
  19. package/scripts/codex-hook +78 -90
  20. package/scripts/dashboard.rb +43 -14
  21. package/scripts/day-summary +53 -0
  22. package/scripts/doctor.rb +269 -43
  23. package/scripts/end-intent +170 -76
  24. package/scripts/exec-worktree +11 -20
  25. package/scripts/file-session-intent +61 -0
  26. package/scripts/hook-capture +255 -0
  27. package/scripts/hook-close +36 -0
  28. package/scripts/hook-message-display +74 -0
  29. package/scripts/hook-record +157 -0
  30. package/scripts/hook-savepoint +45 -0
  31. package/scripts/hook-session-start +128 -12
  32. package/scripts/install.rb +8 -6
  33. package/scripts/intent-screen +77 -0
  34. package/scripts/lib/agent_models.rb +1 -7
  35. package/scripts/lib/arm.rb +308 -0
  36. package/scripts/lib/backfill_intent.rb +316 -0
  37. package/scripts/lib/bridge.rb +24 -1597
  38. package/scripts/lib/compact_instructions.rb +56 -0
  39. package/scripts/lib/day_summary.rb +211 -0
  40. package/scripts/lib/doctor_core.rb +66 -88
  41. package/scripts/lib/doctor_session_ledger.rb +158 -0
  42. package/scripts/lib/exec_worktree.rb +14 -60
  43. package/scripts/lib/handoff.rb +184 -0
  44. package/scripts/lib/harness_text.rb +5 -4
  45. package/scripts/lib/hook_registry.rb +57 -106
  46. package/scripts/lib/insights.rb +3 -4
  47. package/scripts/lib/installer_core.rb +136 -41
  48. package/scripts/lib/intent_screen.rb +309 -0
  49. package/scripts/lib/intent_screen_ansi.rb +262 -0
  50. package/scripts/lib/lock.rb +6 -26
  51. package/scripts/lib/message_display.rb +290 -0
  52. package/scripts/lib/outcome_guard.rb +7 -5
  53. package/scripts/lib/project_validator.rb +30 -1
  54. package/scripts/lib/report_screen.rb +648 -0
  55. package/scripts/lib/roadmap_queue.rb +3 -3
  56. package/scripts/lib/roadmap_savepoint.rb +1 -1
  57. package/scripts/lib/rule_catalog.rb +6 -3
  58. package/scripts/lib/savepoint.rb +334 -0
  59. package/scripts/lib/scaffold_intent.rb +13 -179
  60. package/scripts/lib/screen_paint.rb +276 -0
  61. package/scripts/lib/session_backfill.rb +184 -0
  62. package/scripts/lib/session_close.rb +104 -0
  63. package/scripts/lib/session_git.rb +500 -0
  64. package/scripts/lib/session_ledger.rb +621 -0
  65. package/scripts/lib/store_discovery.rb +1 -1
  66. package/scripts/lib/store_provisioning.rb +1 -1
  67. package/scripts/maintenance-run +7 -7
  68. package/scripts/new-intent +63 -4
  69. package/scripts/plastic-lock +101 -41
  70. package/scripts/promote-session-item +150 -0
  71. package/scripts/read-config +3 -0
  72. package/scripts/rebuild-graph +1 -1
  73. package/scripts/report-screen +120 -0
  74. package/scripts/roadmap-next +2 -2
  75. package/scripts/rollback.rb +48 -3
  76. package/scripts/savepoint-note +67 -0
  77. package/scripts/scaffold-intent +37 -63
  78. package/scripts/session-commit +116 -0
  79. package/scripts/spawn-preamble +14 -7
  80. package/scripts/update.rb +7 -3
  81. package/scripts/write-handoff +60 -0
  82. package/skills/agent-advisor/SKILL.md +3 -3
  83. package/skills/agent-advisor/references/advisor-protocol.md +20 -20
  84. package/skills/auto/SKILL.md +223 -317
  85. package/skills/auto/evals/evals.json +10 -10
  86. package/skills/auto/references/agent-architecture.md +102 -90
  87. package/skills/auto/references/agent-report-contract.md +4 -21
  88. package/skills/auto/references/end-tail.md +47 -53
  89. package/skills/auto/references/human-report-contract.md +62 -56
  90. package/skills/conventions/SKILL.md +1 -3
  91. package/skills/conventions/references/lifecycle-and-savepoints.md +35 -1
  92. package/skills/conventions/references/locks-and-worktrees.md +62 -58
  93. package/skills/conventions/references/maintenance-and-revisions.md +12 -12
  94. package/skills/dashboard/SKILL.md +1 -1
  95. package/skills/direct/SKILL.md +66 -0
  96. package/skills/direct/references/request-signals.md +59 -0
  97. package/skills/doctor/SKILL.md +58 -11
  98. package/skills/doctor/report.md +3 -1
  99. package/skills/install/SKILL.md +11 -9
  100. package/skills/intent-continuing/SKILL.md +142 -91
  101. package/skills/intent-continuing/references/boarding-matrix.md +34 -0
  102. package/skills/intent-continuing/references/context-management.md +3 -3
  103. package/skills/intent-creating/SKILL.md +2 -2
  104. package/skills/intent-creating/references/lifecycle.md +1 -1
  105. package/skills/intent-ending/SKILL.md +34 -37
  106. package/skills/intent-ending/evals/evals.json +4 -4
  107. package/skills/intent-executing/SKILL.md +15 -46
  108. package/skills/intent-executing/plan-reviewer-prompt.md +39 -0
  109. package/skills/intent-speccing/SKILL.md +108 -51
  110. package/skills/intent-speccing/evals/evals.json +5 -5
  111. package/skills/intent-speccing/references/per-section-fill-rules.md +4 -4
  112. package/skills/intent-speccing/references/self-verify-checklist.md +1 -2
  113. package/skills/project-creating/SKILL.md +1 -1
  114. package/skills/releasing/SKILL.md +7 -8
  115. package/skills/tutorial/SKILL.md +2 -2
  116. package/skills/tutorial/references/track-1-guided.md +16 -18
  117. package/skills/tutorial/references/track-2-auto.md +12 -13
  118. package/skills/tutorial/references/track-3-projects-and-roadmaps.md +2 -2
  119. package/templates/agents.md +4 -7
  120. package/templates/config.yml +5 -0
  121. package/templates/intent-screen.md +17 -0
  122. package/templates/outcome.md +14 -1
  123. package/templates/project.yml +7 -0
  124. package/templates/report-state.md +11 -0
  125. package/templates/roadmap.md +1 -1
  126. package/templates/savepoint.md +2 -2
  127. package/templates/session-intent.md +29 -0
  128. package/agents/plastic-brainstorming.md +0 -48
  129. package/agents/plastic-future-intent-researcher.md +0 -35
  130. package/agents/plastic-intent-curator.md +0 -47
  131. package/agents/plastic-intent-discovery.md +0 -43
  132. package/agents/plastic-planner.md +0 -56
  133. package/agents/plastic-spec-specialist.md +0 -53
  134. package/hooks/auto-arm +0 -5
  135. package/hooks/bash-gate +0 -3
  136. package/hooks/continue +0 -31
  137. package/hooks/edit-gates +0 -3
  138. package/hooks/future-intent-check +0 -25
  139. package/hooks/gate-check +0 -12
  140. package/hooks/power-tools +0 -8
  141. package/scripts/hook-auto-arm +0 -51
  142. package/scripts/hook-bash-gate +0 -78
  143. package/scripts/hook-code-gate +0 -38
  144. package/scripts/hook-continue +0 -48
  145. package/scripts/hook-create-gate +0 -51
  146. package/scripts/hook-edit-gates +0 -58
  147. package/scripts/hook-future-intent-check +0 -90
  148. package/scripts/hook-gate-check +0 -169
  149. package/scripts/hook-links-gate +0 -54
  150. package/scripts/hook-lock-gate +0 -47
  151. package/scripts/hook-power-tools +0 -38
  152. package/scripts/hook-savepoint-pre +0 -32
  153. package/scripts/lib/codex_edit_gates.rb +0 -138
  154. package/scripts/lib/edit_gates.rb +0 -398
  155. package/scripts/lib/links_gate.rb +0 -140
  156. package/scripts/lib/qmd_hook.rb +0 -41
  157. package/scripts/lib/spec_header.rb +0 -83
  158. package/scripts/lib/start_intent.rb +0 -296
  159. package/scripts/start-intent +0 -89
  160. package/skills/_active-intent-gate.md +0 -26
  161. package/skills/auto/references/tiers.md +0 -100
  162. package/skills/continuing/SKILL.md +0 -34
  163. package/skills/continuing/evals/evals.json +0 -91
  164. package/skills/conventions/references/gates-and-enforcement.md +0 -53
  165. package/skills/conventions/references/tiers-and-dispatch.md +0 -135
  166. package/skills/doctor/references/gates-stuck-detection.md +0 -43
  167. package/skills/intent-brainstorming/SKILL.md +0 -118
  168. package/skills/intent-brainstorming/evals/evals.json +0 -67
  169. package/skills/intent-continuing/evals/evals.json +0 -145
  170. package/skills/intent-discovering/SKILL.md +0 -56
  171. package/skills/intent-grilling/SKILL.md +0 -108
  172. package/skills/intent-linking/SKILL.md +0 -128
  173. package/skills/intent-linking/evals/evals.json +0 -22
  174. package/skills/intent-linking/references/zettelkasten.md +0 -45
  175. package/skills/intent-locking/SKILL.md +0 -64
  176. package/skills/intent-planning/SKILL.md +0 -145
  177. package/skills/intent-planning/evals/evals.json +0 -81
  178. package/skills/intent-planning/references/plan-format.md +0 -130
  179. package/skills/intent-researching/SKILL.md +0 -123
  180. package/skills/intent-researching/evals/evals.json +0 -22
  181. package/skills/intent-savepoint/SKILL.md +0 -83
  182. package/skills/intent-savepoint/references/context-management.md +0 -32
  183. package/skills/intent-starting/SKILL.md +0 -151
  184. package/skills/intent-starting/evals/evals.json +0 -117
  185. package/skills/intent-starting/references/boarding-matrix.md +0 -35
  186. package/skills/project-continuing/SKILL.md +0 -119
  187. package/skills/project-continuing/evals/evals.json +0 -100
  188. package/skills/roadmap-continuing/SKILL.md +0 -89
  189. package/skills/roadmap-continuing/evals/evals.json +0 -82
  190. package/skills/skill-creating/SKILL.md +0 -75
  191. package/skills/skill-creating/evals/evals.json +0 -108
  192. package/skills/skill-creating/references/agents.md +0 -168
  193. package/skills/skill-creating/references/defaults-first.md +0 -23
  194. package/skills/skill-creating/references/evals.md +0 -41
  195. package/skills/skill-creating/references/hooks.md +0 -251
  196. package/skills/skill-creating/references/progressive-disclosure.md +0 -176
  197. package/skills/skill-creating/references/scripts.md +0 -166
  198. package/skills/skill-creating/references/skills.md +0 -169
  199. package/skills/skill-creating/scripts/scaffold.rb +0 -313
  200. package/skills/skill-evaluating/SKILL.md +0 -141
  201. package/skills/skill-evaluating/assets/eval-template.json +0 -12
  202. package/skills/skill-evaluating/evals/evals.json +0 -75
  203. package/skills/skill-evaluating/references/convention-checks.md +0 -76
  204. package/skills/skill-evaluating/references/eval-methodology.md +0 -154
  205. package/skills/store-curating/SKILL.md +0 -64
  206. package/skills/store-curating/evals/evals.json +0 -38
  207. package/skills/store-indexing/SKILL.md +0 -93
  208. package/skills/store-indexing/evals/evals.json +0 -22
  209. package/skills/store-indexing/references/zettelkasten-linking.md +0 -32
  210. package/skills/store-provisioning/SKILL.md +0 -55
  211. /package/skills/{project-continuing → intent-continuing}/references/board-fill.md +0 -0
  212. /package/skills/{roadmap-continuing → intent-continuing}/references/liveness-ranking.md +0 -0
  213. /package/skills/{intent-brainstorming → intent-speccing}/references/design-principles.md +0 -0
@@ -13,7 +13,7 @@ Doctor has three scopes. Pick the right one for the situation:
13
13
  | Scope | Flag | When it runs | States |
14
14
  |-------|------|--------------|--------|
15
15
  | Core check | `--core` | SessionStart hook (automatic), also available on demand | Binary: pass or error |
16
- | Store check | `--store [global\|<slug>]` | Dashboard load, `plastic-project-continuing` | Three-state: pass / warn / fail |
16
+ | Store check | `--store [global\|<slug>]` | Dashboard load, the project route of `plastic-intent-continuing` | Three-state: pass / warn / fail |
17
17
  | Full check | (no flag) | After every update (automatic), or `/plastic-doctor` | Three-state: pass / warn / fail |
18
18
 
19
19
  ### `--core` (binary, operational-readiness only)
@@ -51,8 +51,12 @@ Each manifest maps a file path to its SHA256.
51
51
 
52
52
  Checks the operations Plastic itself depends on in one store: QMD search reachability (scoped
53
53
  to that store's own collection; global uses `plastic-global`, a project slug uses
54
- `plastic-<slug>`), sources/chain resolution, cross-store resolution, INDEX parsing, and links
55
- projection. A project slug also checks tool readiness (Serena, Enola): each is a pass whether
54
+ `plastic-<slug>`), sources/chain resolution, cross-store resolution, INDEX parsing, links
55
+ projection, done signals (including `backfilled_complete`: a terminal intent still missing a
56
+ real spec.md, plan.md, or action file), and, for the global store only, the session ledger
57
+ (`orphaned_session_tmp`: a `.tmp/<session>/` directory whose heartbeat is older than 24
58
+ hours; `day_ledger_shape`: a `.sessions/` entry that is not a `YYYYMMDD` day directory with
59
+ its `<day>.md`). A project slug also checks tool readiness (Serena, Enola): each is a pass whether
56
60
  present or absent, present naming it available, absent noting it as an optional integration
57
61
  never installed by doctor. Scope options:
58
62
 
@@ -86,10 +90,6 @@ per-project finding**; that is `--store <slug>`'s job (see above). This is what
86
90
  - When hooks aren't firing, skills aren't loading, or something seems broken
87
91
  - When the user says "check plastic", "diagnose", "what's wrong with plastic"
88
92
 
89
- Read `../plastic-conventions/references/gates-and-enforcement.md` for the transition-gate
90
- mechanics, the audited escape, and gate logging before diagnosing a stuck or misbehaving gate.
91
- This path resolves relative to this skill's own installed directory.
92
-
93
93
  ## Procedure
94
94
 
95
95
  ### Step 1: Run the diagnostic script
@@ -159,10 +159,13 @@ Use the `fix_hint` value to determine the correct action:
159
159
  | "Add missing entries to INDEX.md" | Add orphaned intents to the appropriate INDEX.md section |
160
160
  | "Remove stale references from INDEX.md" | Edit INDEX.md to remove ghost references |
161
161
  | "Inject the missing required frontmatter field(s)" | Edit the intent's `{ID}--{slug}.md` frontmatter to add the missing key (e.g. `chain: []`) without touching other keys |
162
- | "Run: provision-project-store {slug}" | Run `provision-project-store <slug>` (or invoke the `plastic-store-provisioning` skill) to create the missing store |
162
+ | "Run: provision-project-store {slug}" | Run `provision-project-store <slug>` (see Provisioning a project store below) to create the missing store |
163
163
  | "Re-run installer" | Run `npx -y @zalom/plastic@<channel> install --claude` (or `--codex`/`--hermes`/`--all` for that agent; channel: -alpha->@alpha, -beta->@beta, else @latest) |
164
164
  | "Run the Plastic installer to bootstrap the store" | Run `npx -y @zalom/plastic@<channel> install --claude` (or `--codex`/`--hermes`/`--all`; channel: -alpha->@alpha, -beta->@beta, else @latest) to restore the global store's plastic_home directory or INDEX.md |
165
- | "Dispatch plastic-store-curating ... revisions.md ..." | Invoke the `plastic-store-curating` (or the agent) to relocate the flagged section or ref into the intent's `revisions.md` via move-and-record (one dated, `[rule: <tag>]`-tagged entry per item), per plastic-conventions > references/maintenance-and-revisions.md. For a missing required section, restore or reproject it instead. |
165
+ | "Relocate ... revisions.md ..." | Relocate the flagged section or ref into the intent's `revisions.md` via move-and-record (one dated, `[rule: <tag>]`-tagged entry per item), per plastic-conventions > references/maintenance-and-revisions.md. For a missing required section, restore or reproject it instead. |
166
+ | "Write the missing documents from the record via `scaffold-intent backfill ...`" | Run `ruby ~/.plastic/scripts/scaffold-intent backfill --store <store> --id <id> --disposition <delivered\|abandoned>` for each listed intent; it fills only missing or placeholder files and never touches real content |
167
+ | "Remove each listed .tmp/<session>/ directory after confirming that session is gone" | For each listed directory, confirm no live session uses it (a live session rewrites its heartbeat on every prompt and edit), then remove that directory by hand; never remove an unlisted one |
168
+ | "For a day directory missing its <day>.md, run `file-session-intent --day <day> ...`" | Run `ruby ~/.plastic/scripts/file-session-intent --day <day> --carry-to <today> --store <store>` for the named day; rename or remove an entry that is not a `YYYYMMDD` day directory |
166
169
  | "Run scripts/project-links ... PRESERVES ... --drop-unbacked-links" | Run `ruby ~/.plastic/scripts/maintenance-run --tool project-links --intent <id> --apply` for the one flagged id (never run bare `project-links` against a real store outside the rare owner-approved batch exception, D2) |
167
170
 
168
171
  For fixes the agent cannot handle automatically, explain what the user needs
@@ -247,6 +250,50 @@ removes exactly the dead rows through the same writer and commit, but holds back
247
250
  intent dir carries a fresh lock or has not gone terminal yet (nothing to suppress there yet),
248
251
  naming both as kept.
249
252
 
250
- ## References
253
+ ## Locks (auto teams only)
254
+
255
+ Locks exist for auto teams: a `delivery.lock` file in the intent directory names the owning
256
+ session, and the `record` hook refreshes its mtime on every edit (the lease heartbeat; stale
257
+ means older than the TTL). Direct work takes no lock. When a lock reads held by a session
258
+ that is gone, when work resumes after a crash, reboot, or `/tmp` wipe, or when the user says
259
+ "fix the lock", "who holds the lock", or "reclaim the lock", use the CLI (intent 304 folded
260
+ the former locking skill here):
261
+
262
+ | Verb | What it does | When |
263
+ |---|---|---|
264
+ | `who` | Owner, heartbeat, claims, delegates, from durable files only | Safe inspection; needs `--intent-dir` |
265
+ | `status` | Lock file, freshness, the derived worktree, whether this session's pointer names the intent, claims | Always safe; run first |
266
+ | `fix` | Idempotent repair from disk truth for this session; never touches a fresh foreign lock | Interrupted work, corrupt state, `/tmp` wiped |
267
+ | `release` | The owner clears the lock | Ending or abandoning an auto delivery |
268
+ | `reclaim` | Explicit takeover of a stale lock; appends an audit line to `savepoint.md` | The owner is gone and the lease expired |
269
+ | `delegate` | The owner registers a subagent session, or marks it `finished` or `failed` | Auto-team orchestration |
270
+
271
+ ```
272
+ ruby ~/.plastic/scripts/plastic-lock status --intent-dir <store>/<id>--<slug>
273
+ ruby ~/.plastic/scripts/plastic-lock who --intent-dir <store>/<id>--<slug>
274
+ ruby ~/.plastic/scripts/plastic-lock fix --intent-dir <store>/<id>--<slug>
275
+ ruby ~/.plastic/scripts/plastic-lock reclaim --intent-dir <store>/<id>--<slug>
276
+ ```
277
+
278
+ `fix` exits non-zero when another session holds a fresh lock: back off, `status` shows the
279
+ owner. `reclaim` refuses a fresh lock; every takeover is audited. The lock file's mtime is the
280
+ sole freshness truth. Never delete a lock file by hand. Read
281
+ `../plastic-conventions/references/locks-and-worktrees.md` when a lock question goes beyond
282
+ these verbs (claims, worktrees, the station ledger).
283
+
284
+ ## Provisioning a project store
285
+
286
+ When a project is registered in `~/.plastic/projects.yml` but has no store on disk (doctor
287
+ reports `project_store_dir`), provision it (intent 304 folded the former provisioning skill
288
+ here). The slug is the project's key under `projects`; an unregistered slug exits non-zero and
289
+ creates nothing, and this procedure never edits `projects.yml`.
290
+
291
+ ```bash
292
+ ruby ~/.plastic/scripts/provision-project-store <slug>
293
+ ruby ~/.plastic/scripts/qmd-sync register --store ~/.plastic/projects/<slug>/store
294
+ ```
251
295
 
252
- - Read `references/gates-stuck-detection.md` for the full gate enforcement table, bridge file pattern, and the recorded stuck-detection signals when diagnosing gate failures or stuck agents
296
+ The provisioner is pure filesystem and idempotent: it creates
297
+ `~/.plastic/projects/<slug>/store/` with `.gitkeep`, writes `INDEX.md` and `project.yml` only
298
+ when missing, and never clobbers. The QMD registration is a separate, optional step that
299
+ no-ops when QMD is absent. New projects are provisioned by `plastic-project-creating`, not here.
@@ -18,6 +18,8 @@
18
18
  core_files -> "Core Files"
19
19
  project_stores -> "Project Stores"
20
20
  deprecations -> "Deprecations"
21
+ done_signals -> "Done Signals"
22
+ session_ledger -> "Session Ledger" (global store only)
21
23
  4. For each check within a category, emit one line with the status icon
22
24
  and the check message. If the check has non-empty details, list them
23
25
  as indented sub-items.
@@ -59,7 +61,7 @@ Checked at: {{timestamp}}
59
61
  - [PASS] Claude Code adapter registered
60
62
  - [FAIL] 2 hook scripts not executable
61
63
  - ~/.claude/hooks/plastic-session-start
62
- - ~/.claude/hooks/plastic-gate-check
64
+ - ~/.claude/hooks/plastic-record
63
65
 
64
66
  <!-- =====================================================================
65
67
  Repeat the above pattern for each category found in the checks array.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plastic-install
3
- description: 'Use when initializing Plastic globally (~/.plastic/) or locally in a project, or to re-install/repair a broken installation. Accepts channel flags (--alpha, --beta, --latest) to select release channel. First install defaults to --latest (stable); reinstalls match the already-installed channel. Global install is recommended: it creates the global intent store as a git-backed repository. Local install creates .plastic/ in the current project for testing.'
3
+ description: 'Use when initializing Plastic globally (~/.plastic/) or locally in a project, or to re-install/repair a broken installation. The package pin selects the channel (@latest, @beta, @alpha; the channel flags were removed in 2.0). First install defaults to @latest (stable); reinstalls match the already-installed channel. Global install is recommended: it creates the global intent store as a git-backed repository. Local install creates .plastic/ in the current project for testing.'
4
4
  user-invocable: true
5
5
  ---
6
6
 
@@ -16,8 +16,10 @@ user-invocable: true
16
16
 
17
17
  If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
18
18
  `-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed
19
- (first install), default to `@latest`. The user can always override with
20
- `--alpha` / `--beta` / `--latest`.
19
+ (first install), default to `@latest`. To change channel, pin the package instead of
20
+ passing a flag: `npx -y @zalom/plastic@alpha install --claude` (or a version such as
21
+ `@2.0.0-alpha.1`); the `--alpha`, `--beta`, and `--latest` flags were removed in 2.0
22
+ (intent 310) because they never selected a package.
21
23
 
22
24
  ## Re-install / repair
23
25
 
@@ -31,13 +33,13 @@ npx -y @zalom/plastic@<channel> install --reinstall --claude
31
33
 
32
34
  Then **run `/plastic-doctor`** and report what it found.
33
35
 
34
- ## Channel Flags
36
+ ## Channels
35
37
 
36
- | Flag | Behavior |
37
- |------|----------|
38
- | `--latest` | Install from the stable channel (default on a first install) |
39
- | `--beta` | Install from the beta channel |
40
- | `--alpha` | Install from the alpha channel |
38
+ | Package | Channel |
39
+ |---------|---------|
40
+ | `@zalom/plastic@latest` | stable (default on a first install) |
41
+ | `@zalom/plastic@beta` | beta |
42
+ | `@zalom/plastic@alpha` | alpha; `npx -y @zalom/plastic@alpha install --claude` is the 2.0 alpha path |
41
43
 
42
44
  When invoked from within Claude Code (re-install or channel switch), the skill
43
45
  runs the appropriate npx command:
@@ -1,103 +1,154 @@
1
1
  ---
2
2
  name: plastic-intent-continuing
3
3
  description: >-
4
- Use when a specific intent is named to resume, by id or by description, or on `continuing
5
- --intent {id}`. Reads that intent's savepoint ledger and hands off to plastic-intent-starting.
6
- The general "continue" / new-session triggers belong to the plastic-continuing router, not
7
- here, so a bare "continue" does not settle on this skill directly. Boot (health check, core
8
- context, version, statusline) is owned by the SessionStart hook, not this skill. Does not
9
- drive work autonomously (that is plastic-auto).
4
+ The front door for resuming work. Use when the user says "continue", "resume", "pick up
5
+ where we left off", "where was I", "what should I work on", names a specific intent to
6
+ resume (by id or description, or `--intent {id}`), or names a roadmap or delivery batch to
7
+ resume (`--roadmap {slug}`, "where is the roadmap", "where did that batch land"). Presents
8
+ state and resumes at the last delivered stage; it never asks auto or guided, never boots
9
+ (the SessionStart hook owns boot), and never drives work autonomously (plastic-auto does).
10
+ Absorbs the former continuing, project-continuing, and roadmap-continuing skills and the
11
+ read half of the former intent-starting skill (intent 304).
10
12
  user-invocable: true
11
13
  ---
12
14
 
13
- # Continuing (intent route)
14
-
15
- `plastic-intent-continuing` is the intent route of `plastic-continuing`. It resumes ONE
16
- specific intent by its savepoint ledger, then hands off to `plastic-intent-starting`. It does
17
- NOT land on a dashboard and does NOT execute work autonomously (that is `plastic-auto`); both
18
- of those are other routes' jobs.
19
-
20
- **Boot is not this skill's job.** The `hook-session-start` hook already runs by construction on
21
- every session start: it runs the core health check (`doctor --core`), primes `PLASTIC.md` +
22
- store/project state, and prints the `Plastic Core loaded - v{version}` banner. The
23
- `plastic-statusline` hook sets the statusline. So by the time this skill runs, core is loaded
24
- and healthy (or the banner already warned otherwise). This skill picks up from there and
25
- resumes the named intent. This is the seam future continue-flags build on (see [[39]]).
26
-
27
- ## When to Use
28
- - A specific intent is named to resume, by id or by description
29
- - `continuing --intent {id}`
30
-
31
- ## Determine Store
32
-
33
- 1. **Global store** - `~/.plastic/INDEX.md` exists global mode.
34
- 2. **Local store** - a project store under `~/.plastic/projects/{slug}/` whose registered
35
- path (in `~/.plastic/projects.yml`) matches the current working directory → project mode.
36
- The SessionStart hook already detects this; here you only need the slug to scope the
37
- named intent's store.
38
- 3. If neither exists announce "No Plastic store found. Run /plastic-install."
39
-
40
- ## Conditional Ledger-Resume
41
-
42
- Fires ONLY when the user explicitly asks to continue a SPECIFIC intent, or an agent is
43
- instructed to continue one. It is not part of every boot.
44
-
45
- QMD-first (when available): when the user names the intent by description rather than id, before
46
- scanning the store with grep/Read run `ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to
47
- surface the candidate intent, then open the authoritative intent file for the hit you resume. The
48
- command is a no-op when QMD is absent, so fall back to the existing INDEX.md / file scan.
49
-
50
- Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
51
- report-home contract behind the resume below. This path resolves relative to this skill's own
52
- installed directory.
53
-
54
- For that intent's directory:
55
-
56
- 1. **Read `savepoint.md` FIRST (intent 81).** It is a deterministic, append-only ledger
57
- (one line per event, newest at the bottom): `{utc-iso8601} {Stage} {milestone}`. Classify
58
- the state from the **last line** alone, then verify ONLY that line's artifact. The bookends
59
- are fixed: first line `What created`, last line either a cycle position or
60
- `Done delivered|abandoned`.
61
-
62
- | Last line | State | Verify only |
63
- |---|---|---|
64
- | `What {id}--{slug}.md` | born / parked | intent file exists |
65
- | `Why started` | Why entered, no spec yet | spec.md not yet real; continue Why |
66
- | `Why spec.md created` | Why done | spec.md present; continue to How |
67
- | `How started` / `How plan.md created` | How in progress | plan.md; continue How |
68
- | `How checklist.md created` / `Exec started` | ready for / in Exec | plan.md + checklist.md present; continue Exec |
69
- | `Exec outcome.md created` | Exec done | outcome.md present; ready to complete |
70
- | `Done delivered` / `Done abandoned` | terminal | do NOT cycle-resume; INDEX is authoritative |
71
-
72
- 2. **Verify the stage file.** Confirm only the last line's artifact exists and is non-empty
73
- (ledger `How plan.md created` `plan.md` must be present and non-empty). Do not re-probe
74
- every lifecycle file.
75
- 3. **Drift handling.** If the ledger's last line disagrees with files-on-disk, rebuild the
76
- ledger from filesystem state and note the correction. A rebuilt ledger is the file-landing
77
- skeleton (no `started`/`Done` lines), which still pins cycle position:
15
+ # Continuing: the front door for resuming work
16
+
17
+ One skill with three routes. It reads state and presents it; the work itself continues in
18
+ whatever mode the session is in (direct by default, `plastic-auto` when the owner says auto).
19
+ There is no lock to take and no mode to ask here: locks exist only for auto teams, and the
20
+ mode is the owner's word, not a question this skill puts.
21
+
22
+ **Boot is not this skill's job.** `hook-session-start` runs on every session start: the core
23
+ health check (`doctor --core`), `PLASTIC.md` and store or project state, the
24
+ `Plastic Core loaded - v{version}` banner. By the time this skill runs, core is loaded and
25
+ healthy or the banner already warned.
26
+
27
+ ## Route
28
+
29
+ | Args or context | Route |
30
+ |---|---|
31
+ | `--intent {id}`, or the user names one specific intent to resume (by id or description) | Intent route (below) |
32
+ | `--roadmap {slug}`, or the user asks to continue or resume a roadmap or delivery batch | Roadmap route (below) |
33
+ | bare "continue", "resume", "what should I work on", or no target (the default) | Project route (below) |
34
+
35
+ State the chosen route in one line before doing anything ("Landing on the project board: no
36
+ specific intent or roadmap named.").
37
+
38
+ ## Determine store
39
+
40
+ 1. A project store under `~/.plastic/projects/{slug}/` whose registered path in
41
+ `~/.plastic/projects.yml` matches the working directory means project mode; the
42
+ SessionStart hook already detected this, the slug scopes the reads below.
43
+ 2. Otherwise the global store, `~/.plastic/store/`.
44
+ 3. Neither exists: announce "No Plastic store found. Run /plastic-install." and stop.
45
+
46
+ ## Project route: land on the board
47
+
48
+ Land on the Markdown board through the `plastic-dashboard` skill; rendering belongs there.
49
+ Run the data payload and fill the matching template:
50
+ - project loaded: `ruby ~/.plastic/scripts/dashboard.rb project <slug> --data`
51
+ - otherwise (the global fallback): `ruby ~/.plastic/scripts/dashboard.rb continue --data`
52
+
53
+ Fill the template from `plastic-dashboard`'s `templates/` and present the filled Markdown in
54
+ your reply, every time: tool-call stdout and hook context are invisible to the user. Read
55
+ `references/board-fill.md` for the fill mechanics and the store-health line when filling the
56
+ board. The board load runs the scoped store check (`doctor --store <scope>`); its result
57
+ arrives in the payload as `store_health` and is shown as one line of data, never a blocker.
58
+
59
+ Priority order on the board: active intents first, then project context (governing plus
60
+ tactical intents in a registered project), then stale future intents for triage, then fresh
61
+ future intents as next work. A future intent older than `stale_threshold_days` (default 3) is
62
+ surfaced for triage without action: activate, abandon, or leave. Activating moves it to
63
+ `## Active` in `INDEX.md` and auto-commits. The board's ranked next-work order is computed by
64
+ `dashboard.rb`; cite the rule names only (Effort, Value, Flags, Override, Caps) and read
65
+ `plastic-dashboard`'s `references/classification.md` for their definitions.
66
+
67
+ When the tier root (the directory holding `INDEX.md`) has a mid-flight roadmap
68
+ (`ruby ~/.plastic/scripts/roadmap-next --roadmaps-dir <root>/roadmaps` reports a `state`
69
+ other than `none`), say so in one line and offer the roadmap route; the board still presents
70
+ project state and stops.
71
+
72
+ Then stop: "here is the state, what next?". Do not start executing work. When the user names
73
+ an intent, take the intent route.
74
+
75
+ ## Intent route: resume one intent from its ledger
76
+
77
+ QMD-first when the intent is named by description: run
78
+ `ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to find the candidate, then open the
79
+ authoritative intent file. The command is a no-op when QMD is absent; fall back to
80
+ `INDEX.md`.
81
+
82
+ If the intent is terminal (`## Completed` or `## Abandoned` in `INDEX.md`): print the
83
+ intent screen (Status shows the terminal section, Next is empty), summarize its
84
+ `outcome.md`, and ask what is next; never reopen it.
85
+
86
+ For a live intent's directory:
87
+
88
+ 1. **Read `savepoint.md` first.** It is a deterministic, append-only ledger, one line per
89
+ event, newest at the bottom: `{utc-iso8601} {Stage} {milestone}`. Classify the stage
90
+ from the last line alone (the table in `references/boarding-matrix.md`, read when
91
+ classifying), then verify only that line's artifact is real (sentinel-aware:
92
+ `Savepoint.stage_file_present?`). Do not re-probe every lifecycle file.
93
+ 2. **Stale ledger.** When the last line disagrees with the files on disk, rebuild the ledger from
94
+ disk and note the correction. A rebuilt ledger is the file-landing skeleton, which still
95
+ pins the stage:
78
96
  ```bash
79
- ruby -r ~/.plastic/scripts/lib/bridge -e 'Bridge.rebuild_savepoint("<intent_dir>")'
97
+ ruby -r ~/.plastic/scripts/lib/savepoint -e 'Savepoint.rebuild_savepoint("<intent_dir>")'
80
98
  ```
81
- 4. **Derive the next step:**
82
- - First unchecked item in `checklist.md` if it exists, else
83
- - "advance to the next lifecycle stage" (e.g. ledger shows Why/spec.md next is How).
84
- - The newest `## Insights` entry supplies human-readable context (Insights are
85
- append-only, newest at the bottom).
86
- 5. **Announce, then hand off to `plastic-intent-starting`:**
87
- ```
88
- Resuming intent [ID] - [name]
89
- Store: [global | project:<slug> | local]
90
- Stage: [from ledger last line]
91
- Next step: [first unchecked checklist item | advance to <stage>]
92
- Context: [newest ## Insights entry]
93
- Drift: [none | ledger rebuilt from filesystem]
99
+ 3. **Read the hand-off.** The newest `~/.plastic/store/.sessions/<day>/handoff--*.md` (today,
100
+ else the newest prior day) is the prior session's own account of where things stand; read
101
+ it after the ledger, never instead of it.
102
+ 4. **Derive the next step:** the first unchecked item in `checklist.md` when it exists, else
103
+ the next thing the stage needs (see the matrix). The newest `## Insights` entry supplies
104
+ the human-readable context; an entry marked `(autonomous)` means an auto team was
105
+ delivering it, so say so and offer to hand back to `plastic-auto`.
106
+ 5. **Print the report screen as the first thing in the reply, then continue at that stage.**
107
+ The screen must open the message with nothing before it. On Claude Code, a fail-open
108
+ `MessageDisplay` hook recognizes a reply that opens this way and substitutes a styled ANSI
109
+ rendering for it there; the transcript and every other harness keep exactly this plain
110
+ form. For "where are we" on one named intent, run
111
+ `ruby ~/.plastic/scripts/report-screen state <intent_dir>` and print its output as it is:
112
+ the title, the field table, the `Changed` row, and the Steps table come from the record,
113
+ never by eye. For "where are we" with no intent named, run
114
+ `ruby ~/.plastic/scripts/report-screen state --all <store_root>` for the roster across every
115
+ in-delivery intent. Route "why did X take so long" to
116
+ `ruby ~/.plastic/scripts/report-screen delay <intent_dir>` instead - every verb prints the
117
+ same plain screen on any harness, painted only where the harness supports it, with no
118
+ branching on harness name. Under the `state` screen
119
+ write **What this means** as two to four bullets in plain words (what the intent is for,
120
+ what has landed, what is left, any defect named by step), then close with **needs input:**
121
+ naming the first open step. Then continue the work in the
122
+ session's current mode. In auto mode the running team already holds the delivery lock; if a
123
+ lock is held by a session that is gone, the `plastic-doctor` skill's lock section repairs or
124
+ reclaims it.
125
+
126
+ ## Roadmap route: resume the mid-flight roadmap
127
+
128
+ 1. Resolve the tier root (project or global) and run the shared reader in which mode:
129
+ ```bash
130
+ ruby ~/.plastic/scripts/roadmap-next --roadmaps-dir <root>/roadmaps --which
94
131
  ```
95
- Hand off to `plastic-intent-starting`: it takes the lock, boards at this station, and is
96
- where the single "auto or guided?" ask for the intent route lives, asked there exactly
97
- once and never duplicated here. Its auto branch is the one that hands off to `plastic-auto`;
98
- this skill never hands to `plastic-auto` directly.
132
+ Read `state` and the winning `roadmap`. A `tie` lists `tie_candidates` to present side by
133
+ side and let the user pick; never pick silently. The reader ranks liveness the way
134
+ `references/liveness-ranking.md` describes (read it when a ranking needs explaining): a
135
+ `delivering` or `blocked` entry wins, else the newest ledger or `## Log` timestamp.
136
+ `roadmaps/<slug>.savepoint.md` is a derived signal read here, never a status field;
137
+ `INDEX.md` stays the sole status writer.
138
+ 2. **Present state:** the roadmap's `## Goal`, the current batch with each entry's mirrored
139
+ status, the ledger's newest line beside the newest `## Log` line. Read
140
+ `../plastic-conventions/references/roadmaps.md` for the file format and the status-mirror
141
+ rule when a roadmap file needs interpreting.
142
+ 3. Then continue with the next dispatchable entry in the session's mode: direct work on it,
143
+ or `plastic-auto` when the owner says auto. The coordinator that drives a batch appends
144
+ to `roadmaps/<slug>.savepoint.md` at its dispatch, merge, park, and handoff points with
145
+ `ruby ~/.plastic/scripts/roadmap-savepoint append`; this skill only reads it.
99
146
 
100
147
  ## References
101
148
 
102
- - Read `references/context-management.md` for the save/continue protocol and for
103
- debugging the resume flow.
149
+ | Trigger | Read |
150
+ |---|---|
151
+ | Filling the board on the project route | `references/board-fill.md` |
152
+ | Classifying the stage from the ledger's last line | `references/boarding-matrix.md` |
153
+ | Explaining why one roadmap ranked above another | `references/liveness-ranking.md` |
154
+ | Saving or restoring context across a long session, or debugging a resume | `references/context-management.md` |
@@ -0,0 +1,34 @@
1
+ # Boarding matrix: which stage a resume lands at
2
+
3
+ The stage is derived from `savepoint.md`'s last line plus the real artifacts on disk.
4
+ Classify from the last line alone, then verify only that line's artifact is real
5
+ (sentinel-aware). When the ledger is stale, rebuild it from disk and note it.
6
+
7
+ | savepoint last line | latest delivered | lands at | continue with |
8
+ |---|---|---|---|
9
+ | `What {id}--{slug}.md` (born) | What | **Why** | the thinking conversation (`plastic-intent-speccing`) or direct work |
10
+ | `Why started` (spec still sentinel) | What | **Why** | continue the conversation; rulings land as insights |
11
+ | `Why spec.md created` | Why | **How** | the action files, `plan.md`, `checklist.md` |
12
+ | `How started` / `How plan.md created` | (How in progress) | **How** | finish `plan.md` and `checklist.md` |
13
+ | `How checklist.md created` / `Exec started` | How | **Exec** | do the work, check off the checklist |
14
+ | `Exec outcome.md created` | Exec | **ready to complete** | the ending procedure (`plastic-intent-ending`) |
15
+ | `Done delivered` / `Done abandoned` | terminal | **report only** | immutable; ask what is next |
16
+
17
+ ## Per-stage behaviour (what "continue" means)
18
+
19
+ - **Why**: continue the conversation, or run the work directly when the request is already
20
+ clear; every ruling is recorded as it lands.
21
+ - **How**: write or finish the action files, `plan.md`, and `checklist.md`.
22
+ - **Exec**: verify what is delivered, then continue (or restart) the delivery or research.
23
+ The first unchecked `checklist.md` item is the next step; the newest `## Insights` entry
24
+ supplies the context.
25
+ - **ready to complete**: `outcome.md` is real; run the ending procedure.
26
+ - **Done**: terminal. Report the outcome, ask what is next. Never reopen; `INDEX.md` is
27
+ authoritative.
28
+
29
+ ## Notes
30
+
31
+ - A Plastic 1.x ledger may carry a `Tier <letter>` line under the `Why spec.md created` line
32
+ (the intent tier was removed in 2.0, intent 304). It is inert: skip it when classifying.
33
+ - An `## Insights` entry marked `(autonomous)` means an auto team was delivering the intent;
34
+ say so and offer to hand back to `plastic-auto`.
@@ -19,10 +19,10 @@ step looks stale):
19
19
  (see `SKILL.md`'s `## Conditional Ledger-Resume` for the full state table).
20
20
  2. Confirm the artifact that line implies (`plan.md`, `checklist.md`, `outcome.md`, ...) is
21
21
  present and non-empty on disk.
22
- 3. If the two disagree, the ledger has drifted: rebuild it rather than hand-editing:
23
- `ruby -r ~/.plastic/scripts/lib/bridge -e 'Bridge.rebuild_savepoint("<intent_dir>")'`
22
+ 3. If the two disagree, the ledger is stale: rebuild it rather than hand-editing:
23
+ `ruby -r ~/.plastic/scripts/lib/savepoint -e 'Savepoint.rebuild_savepoint("<intent_dir>")'`
24
24
  4. Re-read the rebuilt last line and re-derive the next step from `checklist.md`'s first
25
25
  unchecked item.
26
26
 
27
27
  The general "land on the board / priority order / stale future intents" flow now lives in
28
- `plastic-project-continuing`; this file no longer duplicates it.
28
+ `plastic-intent-continuing`; this file no longer duplicates it.
@@ -12,7 +12,7 @@ user-invocable: true
12
12
  - User explicitly says "new intent" or "create intent"
13
13
  - An agent discovers work needed during implementation
14
14
 
15
- ## Determine Tier
15
+ ## Determine the store
16
16
 
17
17
  **Global intent** (strategic): created when working outside a registered project, or when the user expresses a high-level goal. Stored in `~/.plastic/store/`.
18
18
 
@@ -79,7 +79,7 @@ rule and the tool.
79
79
  frontmatter edge and reproject. Links are decided by context influence (a `chain` edge has a high
80
80
  bar: the candidate's context must materially help deliver this intent), not by shared files or a
81
81
  similarity score. To gather candidates with their context and record an edge, use the
82
- `plastic-intent-linking` skill and `scripts/link-suggest`.
82
+ `scripts/link-suggest` and `scripts/project-links`.
83
83
 
84
84
  Read `../plastic-conventions/references/knowledge-graph.md` for the full linking doctrine: the
85
85
  tiers of influence, sources versus chain, and how the `## Links` projection is derived. This path
@@ -78,4 +78,4 @@ State is derived from what exists, not from what's declared.
78
78
 
79
79
  The intent file is born complete with all five sanctioned `##` sections; the lifecycle files (`spec.md`/`plan.md`/`checklist.md`/`outcome.md`) are sentinel placeholders that read as "stage not reached" until an agent fills them and deletes the `<!-- plastic:placeholder -->` first line.
80
80
 
81
- Always scaffold through `new-intent` (or this skill). Never hand-author intent files: the write-time create gate blocks an incomplete or malformed intent file, and hand-authoring is the bypass this contract is designed to remove.
81
+ Always scaffold through `new-intent` (or this skill). Never hand-author intent files: `new-intent` validates the file it writes (`scripts/validate-intent`) and `end-intent` checks it again at close, and hand-authoring is the bypass this contract is designed to remove.