@zalom/plastic 1.0.0-alpha.9 → 1.0.0-beta.2

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 (99) hide show
  1. package/PLASTIC.md +163 -469
  2. package/README.md +95 -58
  3. package/agents/plastic-brainstorming.md +37 -0
  4. package/agents/plastic-enforcer.md +36 -0
  5. package/agents/plastic-executor.md +37 -0
  6. package/agents/{future-intent-researcher.md → plastic-future-intent-researcher.md} +1 -1
  7. package/agents/{intent-curator.md → plastic-intent-curator.md} +1 -1
  8. package/agents/plastic-planner.md +37 -0
  9. package/agents/plastic-spec-specialist.md +37 -0
  10. package/bin/plastic.js +57 -0
  11. package/bin/test +28 -0
  12. package/deprecations.yml +1 -10
  13. package/hooks/auto-arm +5 -0
  14. package/hooks/bash-gate +3 -0
  15. package/hooks/check-update +12 -8
  16. package/hooks/code-gate +12 -0
  17. package/hooks/create-gate +3 -0
  18. package/hooks/gate-check +3 -1
  19. package/hooks/hooks.json +52 -0
  20. package/hooks/qmd-search +8 -0
  21. package/package.json +2 -2
  22. package/scripts/dashboard.rb +687 -0
  23. package/scripts/doctor.rb +1054 -628
  24. package/scripts/hook-auto-arm +51 -0
  25. package/scripts/hook-bash-gate +41 -0
  26. package/scripts/hook-code-gate +27 -0
  27. package/scripts/hook-continue +15 -114
  28. package/scripts/hook-create-gate +59 -0
  29. package/scripts/hook-gate-check +47 -32
  30. package/scripts/hook-qmd-search +44 -0
  31. package/scripts/hook-session-start +106 -38
  32. package/scripts/install.rb +91 -529
  33. package/scripts/lib/boot_banner.rb +28 -0
  34. package/scripts/lib/bridge.rb +404 -19
  35. package/scripts/lib/installer_core.rb +807 -0
  36. package/scripts/lib/intent_validator.rb +235 -0
  37. package/scripts/lib/qmd_hook.rb +44 -0
  38. package/scripts/lib/qmd_sync.rb +209 -0
  39. package/scripts/lib/store_provisioning.rb +100 -0
  40. package/scripts/migrate-to-global +1 -1
  41. package/scripts/new-intent +226 -0
  42. package/scripts/provision-project-store +53 -0
  43. package/scripts/qmd-sync +92 -0
  44. package/scripts/select-update-target +93 -0
  45. package/scripts/spawn-preamble +121 -0
  46. package/scripts/uninstall.rb +53 -0
  47. package/scripts/update.rb +164 -0
  48. package/scripts/validate-intent +54 -0
  49. package/scripts/versions.rb +141 -0
  50. package/skills/_active-intent-gate.md +1 -1
  51. package/skills/add-project-store/SKILL.md +54 -0
  52. package/skills/auto/SKILL.md +77 -7
  53. package/skills/auto/evals/evals.json +207 -0
  54. package/skills/auto/references/agent-architecture.md +135 -0
  55. package/skills/brainstorming/SKILL.md +9 -9
  56. package/skills/brainstorming-grill-me/SKILL.md +6 -6
  57. package/skills/continuing/SKILL.md +92 -82
  58. package/skills/continuing/evals/evals.json +136 -0
  59. package/skills/continuing/references/context-management.md +32 -0
  60. package/skills/creating-intent/SKILL.md +74 -36
  61. package/skills/creating-intent/evals/evals.json +56 -0
  62. package/skills/creating-intent/references/lifecycle.md +76 -0
  63. package/skills/creating-intent/references/wikilinks.md +8 -0
  64. package/skills/creating-project/SKILL.md +40 -8
  65. package/skills/creating-project/references/hubs-projects.md +55 -0
  66. package/skills/dashboard/SKILL.md +121 -0
  67. package/skills/dashboard/templates/dashboard-global.md +31 -0
  68. package/skills/dashboard/templates/dashboard-project.md +40 -0
  69. package/skills/doctor/SKILL.md +51 -4
  70. package/skills/doctor/references/gates-stuck-detection.md +38 -0
  71. package/skills/doctor/report.md +4 -0
  72. package/skills/evaluating-skills/SKILL.md +140 -0
  73. package/skills/evaluating-skills/assets/eval-template.json +12 -0
  74. package/skills/evaluating-skills/evals/evals.json +75 -0
  75. package/skills/evaluating-skills/references/convention-checks.md +76 -0
  76. package/skills/evaluating-skills/references/eval-methodology.md +154 -0
  77. package/skills/executing-plan/SKILL.md +5 -3
  78. package/skills/install/SKILL.md +69 -8
  79. package/skills/intent-curator/SKILL.md +3 -3
  80. package/skills/linking-intents/SKILL.md +16 -7
  81. package/skills/linking-intents/references/zettelkasten.md +38 -0
  82. package/skills/managing-index/SKILL.md +5 -1
  83. package/skills/managing-index/references/zettelkasten-linking.md +1 -1
  84. package/skills/releasing/SKILL.md +80 -23
  85. package/skills/releasing/references/deprecations.md +60 -0
  86. package/skills/research/SKILL.md +2 -2
  87. package/skills/savepoint/SKILL.md +46 -37
  88. package/skills/savepoint/references/context-management.md +32 -0
  89. package/skills/uninstall/SKILL.md +39 -28
  90. package/skills/update/SKILL.md +41 -44
  91. package/skills/versions/SKILL.md +65 -0
  92. package/skills/writing-instructions/SKILL.md +159 -0
  93. package/skills/writing-instructions/references/agentskills-spec.md +135 -0
  94. package/skills/writing-plans/SKILL.md +5 -5
  95. package/templates/agents.md +7 -7
  96. package/templates/outcome.md +13 -0
  97. package/templates/savepoint.md +14 -13
  98. package/templates/spec.md +25 -0
  99. package/bin/install.js +0 -29
@@ -0,0 +1,207 @@
1
+ {
2
+ "skill_name": "plastic-auto",
3
+ "notes": "Intent 27. Scopes: description triggering (1-8) and behavior/output quality (9). Assertions written after observing Step-3 runs (one clean subagent router per case). Intent 63 added cases 10-11 (auto-mode enforcer-led team spin-up and solo fallback).",
4
+ "results": {
5
+ "triggering": {
6
+ "cases": 8,
7
+ "passed": 8,
8
+ "pass_at_1": 1.0,
9
+ "run": "2026-06-10, one subagent per case"
10
+ },
11
+ "behavior": {
12
+ "cases": 1,
13
+ "passed": 1,
14
+ "evidence": "dogfood: intent 27 itself delivered via auto produced spec->plan->checklist before any code edit; code-gate unit test proves pre-How project-code edits are blocked"
15
+ }
16
+ },
17
+ "evals": [
18
+ {
19
+ "id": 1,
20
+ "scope": "triggering",
21
+ "set": "train",
22
+ "prompt": "auto",
23
+ "expected_output": "Activates plastic-auto (the bare 'auto' keyword is the documented trigger).",
24
+ "files": [],
25
+ "assertions": [
26
+ {
27
+ "type": "code",
28
+ "check": "router CHOICE == plastic-auto",
29
+ "observed": "plastic-auto",
30
+ "result": "pass"
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "id": 2,
36
+ "scope": "triggering",
37
+ "set": "train",
38
+ "prompt": "take it from here and deliver intent 27 end to end",
39
+ "expected_output": "Activates plastic-auto (autonomous delivery of an active intent).",
40
+ "files": [],
41
+ "assertions": [
42
+ {
43
+ "type": "code",
44
+ "check": "router CHOICE == plastic-auto",
45
+ "observed": "plastic-auto",
46
+ "result": "pass"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "id": 3,
52
+ "scope": "triggering",
53
+ "set": "validation",
54
+ "prompt": "go fully autonomous on the active intent, don't ask me questions",
55
+ "expected_output": "Activates plastic-auto.",
56
+ "files": [],
57
+ "assertions": [
58
+ {
59
+ "type": "code",
60
+ "check": "router CHOICE == plastic-auto",
61
+ "observed": "plastic-auto",
62
+ "result": "pass"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "id": 4,
68
+ "scope": "triggering",
69
+ "set": "train",
70
+ "prompt": "deliver this intent for me",
71
+ "expected_output": "Activates plastic-auto.",
72
+ "files": [],
73
+ "assertions": [
74
+ {
75
+ "type": "code",
76
+ "check": "router CHOICE == plastic-auto",
77
+ "observed": "plastic-auto",
78
+ "result": "pass"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "id": 5,
84
+ "scope": "triggering",
85
+ "set": "train",
86
+ "prompt": "set up a hook to automatically format the file on every save",
87
+ "expected_output": "Does NOT activate plastic-auto. Near-miss: shares 'auto*' but is a settings/hooks task (update-config).",
88
+ "files": [],
89
+ "assertions": [
90
+ {
91
+ "type": "code",
92
+ "check": "router CHOICE != plastic-auto",
93
+ "observed": "update-config",
94
+ "result": "pass"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "id": 6,
100
+ "scope": "triggering",
101
+ "set": "validation",
102
+ "prompt": "deliver the built package to the dist directory",
103
+ "expected_output": "Does NOT activate plastic-auto. Near-miss: shares 'deliver' but is a build/file task.",
104
+ "files": [],
105
+ "assertions": [
106
+ {
107
+ "type": "code",
108
+ "check": "router CHOICE != plastic-auto",
109
+ "observed": "none",
110
+ "result": "pass"
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "id": 7,
116
+ "scope": "triggering",
117
+ "set": "train",
118
+ "prompt": "create a new intent for the dashboard idea",
119
+ "expected_output": "Does NOT activate plastic-auto; activates plastic-creating-intent.",
120
+ "files": [],
121
+ "assertions": [
122
+ {
123
+ "type": "code",
124
+ "check": "router CHOICE != plastic-auto",
125
+ "observed": "plastic-creating-intent",
126
+ "result": "pass"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "id": 8,
132
+ "scope": "triggering",
133
+ "set": "validation",
134
+ "prompt": "what's the status of my active intents?",
135
+ "expected_output": "Does NOT activate plastic-auto; this is a read/continuing/managing-index query.",
136
+ "files": [],
137
+ "assertions": [
138
+ {
139
+ "type": "code",
140
+ "check": "router CHOICE != plastic-auto",
141
+ "observed": "plastic-managing-index",
142
+ "result": "pass"
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "id": 9,
148
+ "scope": "behavior",
149
+ "set": "train",
150
+ "prompt": "Active intent X exists with only a '## Intent' section. Deliver it in auto mode.",
151
+ "expected_output": "Arms the lifecycle gate first, then produces spec.md (Why), then plan.md + actions/ + checklist.md (How), and edits NO project code before plan.md + checklist.md exist. Disarms on completion.",
152
+ "files": [],
153
+ "assertions": [
154
+ {
155
+ "type": "human",
156
+ "check": "spec.md written before plan.md before any project-code edit",
157
+ "observed": "dogfood run of intent 27 followed this order",
158
+ "result": "pass"
159
+ },
160
+ {
161
+ "type": "code",
162
+ "check": "code-gate blocks project-code Edit/Write while pre-How (test/code_gate_test.rb)",
163
+ "observed": "test green",
164
+ "result": "pass"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "id": 10,
170
+ "scope": "behavior",
171
+ "set": "train",
172
+ "prompt": "Active intent X exists. Deliver it in auto mode on a harness that supports subagents.",
173
+ "expected_output": "Spins up one enforcer-led team per intent (brainstorming, spec-specialist, planner, executor, plastic-enforcer). The enforcer IS the orchestrator. Dispatches one specialist per stage sequentially on one branch, gating each deliverable (Context+Decisions, then spec.md, then plan.md+actions+checklist, then code) against the stage exit criteria before handoff, and dispatches an independent reviewer subagent at the final gate only.",
174
+ "files": [],
175
+ "assertions": [
176
+ {
177
+ "type": "human",
178
+ "check": "five-role roster spun up; specialists dispatched stage-sequentially with per-stage gating; independent reviewer only at final gate",
179
+ "observed": "dogfood: intents 60-62 delivered by exactly this enforcer-led team on a shared branch",
180
+ "result": "pass"
181
+ },
182
+ {
183
+ "type": "code",
184
+ "check": "agents/plastic-*.md role files ship and install into the harness agent dir, manifest-tracked (test/install_packaging_test.rb)",
185
+ "observed": "test green",
186
+ "result": "pass"
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ "id": 11,
192
+ "scope": "behavior",
193
+ "set": "validation",
194
+ "prompt": "Active intent X exists. Deliver it in auto mode on a harness with no subagent dispatch.",
195
+ "expected_output": "Falls back to a single agent walking the full What, Why, How, Exec cycle itself, preserving current behavior. The enforcer gate discipline still applies (arm the gate first, no project-code edits before plan.md + checklist.md exist).",
196
+ "files": [],
197
+ "assertions": [
198
+ {
199
+ "type": "human",
200
+ "check": "solo agent walks the full cycle when subagent dispatch is unavailable; gate discipline preserved",
201
+ "observed": "SKILL.md Team Spin-Up documents the solo fallback explicitly",
202
+ "result": "pass"
203
+ }
204
+ ]
205
+ }
206
+ ]
207
+ }
@@ -0,0 +1,135 @@
1
+ # Agent Architecture
2
+
3
+ ## Main Orchestrator
4
+
5
+ The Main Orchestrator manages the global store (Main Knowledge Base). It:
6
+ - Recognizes, creates, updates, and groups intents
7
+ - Spawns Project Orchestrators for registered projects
8
+ - Receives contributions back from Project Orchestrators
9
+ - Is the only agent that runs in a loop (continuous Build, Observe, Repeat)
10
+
11
+ ## Project Orchestrators
12
+
13
+ Project Orchestrators manage project stores (Project Knowledge Bases). They:
14
+ - Care about intents and execution within their project
15
+ - Spin up an enforcer-led team to deliver an intent
16
+ - Contribute back to the Main Orchestrator when new intents are born
17
+ that could enrich the Main Knowledge Base
18
+
19
+ ## The Auto-Mode Team
20
+
21
+ Auto mode spins up exactly ONE enforcer-led team per intent. The plastic-enforcer
22
+ IS the auto orchestrator itself, not a separately dispatched agent. Making the
23
+ orchestrator the enforcer avoids the who-gates-the-gater regress (the gate-keeper
24
+ can never be ungated).
25
+
26
+ The team has five roles, one per place in the What, Why, How, Exec cycle:
27
+
28
+ - **plastic-brainstorming** (Why exploration): enriches `## Context` and records
29
+ `### Decisions` with rationale.
30
+ - **plastic-spec-specialist** (Why-to-How boundary): consolidates the Why into
31
+ `spec.md` (Problem, Goals, Non-Goals, Approach, Decisions, Acceptance Criteria).
32
+ - **plastic-planner** (How): produces `plan.md`, `actions/ACTION_N.md`, and
33
+ `checklist.md`.
34
+ - **plastic-executor** (Exec): writes the code, checks off `checklist.md`, appends
35
+ `## Insights`, and drives the suite green.
36
+ - **plastic-enforcer** (spans the whole cycle): orchestrates and gates.
37
+
38
+ ### Handoff Contracts
39
+
40
+ Each specialist receives the prior stage's deliverable and produces the next stage's
41
+ input. The enforcer dispatches one specialist per stage with a constructed context
42
+ bundle, gates that deliverable against the stage's exit criteria, and only then hands
43
+ off to the next stage. Dispatch is sequential on a single branch, because the stage
44
+ deliverables share files (a parked spec, plan, and checklist all live in the same
45
+ intent directory).
46
+
47
+ The chain: intent `## Intent` / `## Context`, then enriched `## Context` plus
48
+ `### Decisions`, then `spec.md`, then `plan.md` plus `actions/` plus `checklist.md`,
49
+ then the code changes plus a checked-off checklist plus `## Insights`.
50
+
51
+ ### Spawn Preamble (L2 live-state injection)
52
+
53
+ Every dispatched specialist is booted with a spawn preamble: the enforcer runs
54
+ `scripts/spawn-preamble <intent_dir> --role <role>` and prepends its output to the
55
+ specialist's prompt. The preamble is a pure function of the intent directory on disk
56
+ (no network, no clock, no randomness), so it is deterministic and rebuildable. It
57
+ carries the active intent id and intent line, the current lifecycle stage (the last
58
+ savepoint line, else stage derived from which lifecycle files exist), the cycle
59
+ role, and the honoring instruction that the agent must emit valid lifecycle artifacts
60
+ and not hallucinate intents or stages. This is the standard L2 live-state mechanism
61
+ for harnesses whose spawned sub-agents do not inherit the top-level session event. See
62
+ `docs/reference/harness-adapters.md` for how it slots into the per-harness contract.
63
+
64
+ ### Gate Ownership
65
+
66
+ The enforcer arms and verifies the lifecycle gate, then gates every stage transition.
67
+ It never delegates gate ownership. At the final gate only, it dispatches an
68
+ INDEPENDENT reviewer subagent to review the delivered work. That reviewer is not a
69
+ permanent sixth role, it exists only for the final review.
70
+
71
+ ### Headless Manual Gate
72
+
73
+ When running headless or in the background, the enforcer enforces gates manually and
74
+ does not rely on hooks, because `CLAUDE_SESSION_ID` may be unset in those runs (the
75
+ gate-check and savepoint hooks no-op without it). The enforcer arms via the bridge's
76
+ derived-key fallback and verifies state itself.
77
+
78
+ ### Delegation
79
+
80
+ The roles are thin handoff contracts, not a spawning engine. Dispatch and review run
81
+ by default through Plastic's own engine, `plastic-executing-plan` (implementer plus
82
+ two-stage review, no external plugin). When `superpowers:subagent-driven-development`
83
+ and `superpowers:dispatching-parallel-agents` are available, or the user asks for them,
84
+ they delegate to those as an enhancement. The team model defines who hands what to whom
85
+ and where the gates sit; the dispatch engine, native or superpowers, does the actual
86
+ spawning.
87
+
88
+ ### Fallback by Case
89
+
90
+ The default is always Plastic's native engine, so a user without superpowers still gets
91
+ the full behavior. If the harness supports subagents but superpowers is absent, auto
92
+ mode dispatches through `plastic-executing-plan`. If the harness has no subagent dispatch
93
+ at all, auto mode falls back to a single agent walking the full What, Why, How, Exec
94
+ cycle itself. The enforcer's gate discipline still applies in every case.
95
+
96
+ ### Dogfood Proof
97
+
98
+ Intents 60, 61, and 62 were delivered by exactly this enforcer-led team on a shared
99
+ branch, which is the dogfooded proof that the model works end to end.
100
+
101
+ ## Two Modes
102
+
103
+ - **Human-driven:** Human chats with the Main Orchestrator, creates intents,
104
+ brainstorms, then the Main Orchestrator dispatches Project Orchestrators and teams
105
+ for execution.
106
+ - **Autonomous:** Human gives the Main Orchestrator a starting intent with defined
107
+ outcomes. The enforcer-led team runs the full cycle (the specialists do the
108
+ lifecycle, the enforcer reviews Insights and gates), then the orchestrator spawns
109
+ next intents and dispatches again.
110
+
111
+ ## Autonomous Delivery
112
+
113
+ Human owns What and Why for human-initiated intents. The team assists (research,
114
+ exploration) but the human drives until handoff. When Why is complete, or the human
115
+ triggers `plastic-auto`, the enforcer-led team takes over How and Exec autonomously.
116
+
117
+ - **Safe-by-default:** the executor always prefers non-destructive routes (rename vs
118
+ delete, additive migrations, backups before changes). Destructive actions on
119
+ existing projects require human approval unless `--skip-permissions` is set.
120
+ - **Notification only on:** finish or hard stop (blocked on destructive action,
121
+ unresolvable error). No progress reports, `## Insights` tracks everything.
122
+ - **Greenfield autonomy:** during initial project creation, all decisions are
123
+ non-destructive (nothing to destroy), so the team has full autonomy for greenfield
124
+ choices.
125
+ - **Autonomous decisions** are logged in `## Insights` with the `(autonomous)` marker.
126
+
127
+ ## Coordinator Loop
128
+
129
+ When "work on Project X":
130
+ 1. Read `projects.yml`, find the project path
131
+ 2. Load global config (defaults)
132
+ 3. Load project config (overrides)
133
+ 4. Load global INDEX.md, find hub intents tagged `project-<name>`
134
+ 5. Load project INDEX.md, find tactical intents
135
+ 6. The coordinator has the full picture, spins up an enforcer-led team per intent
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plastic:brainstorming
2
+ name: plastic-brainstorming
3
3
  description: "Explore intent requirements and design before implementation. Produces spec.md in the active intent directory."
4
4
  ---
5
5
 
@@ -20,7 +20,7 @@ Do NOT invoke any implementation skill, write any code, scaffold any project, or
20
20
  Before proceeding, resolve the active intent:
21
21
 
22
22
  1. **Detect store:** Read `~/.plastic/projects.yml`, match CWD against registered project paths. If match → project store at `~/.plastic/projects/{slug}/store/`. If no match → global store at `~/.plastic/store/`.
23
- 2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic:creating-intent"
23
+ 2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic-creating-intent"
24
24
  3. **Resolve intent directory:** `{store}/store/{id}--{slug}/`
25
25
 
26
26
  All artifacts go to the intent directory. Never write to external paths.
@@ -40,7 +40,7 @@ You MUST create a task for each of these items and complete them in order:
40
40
  5. **Write spec** — save to `{intent_dir}/spec.md` and commit to store repo
41
41
  6. **Spec self-review** — placeholder scan, consistency, scope, ambiguity
42
42
  7. **User reviews written spec** — ask user to review before proceeding
43
- 8. **Transition to planning** — invoke `plastic:writing-plans`
43
+ 8. **Transition to planning** — invoke `plastic-writing-plans`
44
44
 
45
45
  ## Process Flow
46
46
 
@@ -54,7 +54,7 @@ digraph brainstorming {
54
54
  "Write spec" [shape=box];
55
55
  "Spec self-review\n(fix inline)" [shape=box];
56
56
  "User reviews spec?" [shape=diamond];
57
- "Invoke plastic:writing-plans" [shape=doublecircle];
57
+ "Invoke plastic-writing-plans" [shape=doublecircle];
58
58
 
59
59
  "Explore project context" -> "Ask clarifying questions";
60
60
  "Ask clarifying questions" -> "Propose 2-3 approaches";
@@ -65,11 +65,11 @@ digraph brainstorming {
65
65
  "Write spec" -> "Spec self-review\n(fix inline)";
66
66
  "Spec self-review\n(fix inline)" -> "User reviews spec?";
67
67
  "User reviews spec?" -> "Write spec" [label="changes requested"];
68
- "User reviews spec?" -> "Invoke plastic:writing-plans" [label="approved"];
68
+ "User reviews spec?" -> "Invoke plastic-writing-plans" [label="approved"];
69
69
  }
70
70
  ```
71
71
 
72
- **The terminal state is invoking `plastic:writing-plans`.** Do NOT invoke any other implementation skill. The ONLY skill you invoke after brainstorming is `plastic:writing-plans`.
72
+ **The terminal state is invoking `plastic-writing-plans`.** Do NOT invoke any other implementation skill. The ONLY skill you invoke after brainstorming is `plastic-writing-plans`.
73
73
 
74
74
  ## The Process
75
75
 
@@ -107,7 +107,7 @@ digraph brainstorming {
107
107
 
108
108
  ## After the Design
109
109
  **Documentation:**
110
- - Write the validated design (spec) to `{intent_dir}/spec.md`
110
+ - Write the validated design (spec) to `{intent_dir}/spec.md` using the `${CLAUDE_PLUGIN_ROOT}/templates/spec.md` form
111
111
  - Use elements-of-style:writing-clearly-and-concisely skill if available
112
112
  - Commit to the store repo:
113
113
  ```
@@ -130,8 +130,8 @@ After the spec review loop passes, ask the user to review the written spec befor
130
130
  Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
131
131
 
132
132
  **Implementation:**
133
- - Invoke `plastic:writing-plans` to create the implementation plan
134
- - Do NOT invoke any other skill. `plastic:writing-plans` is the next step.
133
+ - Invoke `plastic-writing-plans` to create the implementation plan
134
+ - Do NOT invoke any other skill. `plastic-writing-plans` is the next step.
135
135
 
136
136
  ## Key Principles
137
137
 
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: plastic:brainstorming-grill-me
2
+ name: plastic-brainstorming-grill-me
3
3
  description: >-
4
4
  Deep brainstorming that interviews the user relentlessly about a plan or design until reaching shared understanding.
5
5
  Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
6
- Complements superpowers:brainstorming — use brainstorming for quick ideation, grill-me for thorough interrogation.
6
+ Pair with plastic-brainstorming for quick ideation and use grill-me for thorough interrogation. If superpowers:brainstorming is installed it complements this skill, but it is not required.
7
7
  ---
8
8
 
9
9
  # Grill Me — Deep Brainstorming
@@ -83,18 +83,18 @@ If ALL items pass, offer autonomous delivery:
83
83
  >
84
84
  > Want to grill more, or should I go autonomous?"
85
85
 
86
- - If human says go → invoke `plastic:auto`
86
+ - If human says go → invoke `plastic-auto`
87
87
  - If human says grill more → continue grilling (reset to step 2)
88
88
  - If human says neither (wants to drive manually) → proceed as before (offer planning)
89
89
 
90
90
  This offer replaces the final question in Close Out ("Ready to plan implementation, or do you want another pass?"). The new options are:
91
- 1. Go autonomous (`plastic:auto`)
91
+ 1. Go autonomous (`plastic-auto`)
92
92
  2. Grill more (continue interrogation)
93
93
  3. Plan manually (invoke `superpowers:writing-plans` or proceed with human-driven planning)
94
94
 
95
95
  ## Relationship to superpowers:brainstorming
96
96
 
97
- | | superpowers:brainstorming | plastic:brainstorming-grill-me |
97
+ | | superpowers:brainstorming | plastic-brainstorming-grill-me |
98
98
  |---|---|---|
99
99
  | Speed | Quick (5-10 min) | Thorough (20-45 min) |
100
100
  | Depth | Surface-level exploration | Exhaustive decision tree |
@@ -102,4 +102,4 @@ This offer replaces the final question in Close Out ("Ready to plan implementati
102
102
  | Output | Initial spec | Battle-tested spec with all branches resolved |
103
103
  | Style | Collaborative, exploratory | Interrogative, relentless |
104
104
 
105
- Use `superpowers:brainstorming` to generate ideas. Use `plastic:brainstorming-grill-me` to pressure-test them.
105
+ Use `superpowers:brainstorming` to generate ideas. Use `plastic-brainstorming-grill-me` to pressure-test them.
@@ -1,104 +1,114 @@
1
1
  ---
2
- name: plastic:continuing
3
- description: Use when the user says "continue" after a /clear, or when resuming work in a new session. Reads intent state from global store (~/.plastic/) or local store, offers active intents first, then future intents, and surfaces stale intents for triage.
2
+ name: plastic-continuing
3
+ description: Use when the user says "continue", "resume", or "pick up where we left off", or when starting a new session. Continues work with the latest project context: lands on the right dashboard, then presents choices. Boot (health check, core context, version, statusline) is owned by the SessionStart hook, not this skill. Does not drive work autonomously (that is plastic-auto).
4
4
  ---
5
5
 
6
6
  # Continuing
7
7
 
8
+ `plastic-continuing` continues work. It presents the latest state via the dashboard and offers
9
+ choices, then stops. It does NOT execute work autonomously (that is `plastic-auto`) and does
10
+ NOT render the dashboard itself (it only invokes it).
11
+
12
+ **Boot is not this skill's job.** The `hook-session-start` hook already runs by construction on
13
+ every session start: it runs the core health check (`doctor --core`), primes `PLASTIC.md` +
14
+ store/project state, and prints the `Plastic Core loaded — v{version}` banner. The
15
+ `plastic-statusline` hook sets the statusline. So by the time this skill runs, core is loaded
16
+ and healthy (or the banner already warned otherwise). This skill picks up from there and
17
+ continues work. This is the seam future continue-flags build on (see [[39]]).
18
+
8
19
  ## When to Use
9
20
  - UserPromptSubmit hook detects "continue" (automatic)
10
21
  - User says "continue", "resume", or "pick up where we left off"
11
- - Starting a new session with existing active intents
22
+ - Starting a new session and you want to resume work with the latest context
12
23
 
13
24
  ## Determine Store
14
25
 
15
- 1. Check `~/.plastic/INDEX.md` → global mode
16
- 2.
17
- 3. If neither exists announce "No Plastic store found. Run /plastic:install."
18
-
19
- ## Workflow
20
-
21
- ### 1. Read INDEX.md
22
- Read the INDEX.md from the active store. Extract intents under `## Active` and `## Future`.
23
-
24
- ### 2. Detect Current Project (global mode only)
25
- Read `~/.plastic/projects.yml`, match CWD against registered project paths. If in a project:
26
- - Load the governing intent (from `parent` in projects.yml)
27
- - Load tactical intents from `~/.plastic/projects/{slug}/store/`
28
-
29
- ### 3. If Active Intents Exist Resume
30
-
31
- For each active intent in the store:
32
-
33
- **a. Read `{ID}--{slug}.md`:**
34
- - What we're doing (`## Intent`)
35
- - Why (`## Context`)
36
- - What insights have emerged (`## Insights`)
37
-
38
- **b. Read savepoint.md** (if exists):
39
- - What was in progress, what's next, blockers
40
-
41
- **c. Read checklist.md** (if exists):
42
- - What's completed, what's next
43
-
44
- **d. Announce:**
45
- ```
46
- Resuming intent [ID] [name]
47
- Store: [global | project:<slug> | local]
48
- Status: active
49
- Last session: [date from savepoint]
50
- In progress: [from savepoint]
51
- Next step: [from checklist or savepoint]
52
- Blockers: [from savepoint, or "none"]
53
- ```
54
-
55
- **e. Resume** — proceed with the next step.
56
-
57
- ### 3b. Detect Autonomous Resume
58
-
59
- When resuming an active intent, check `## Insights` for entries containing `(autonomous)`.
60
-
61
- If found this intent was being delivered autonomously:
62
-
63
- **Announce:**
64
- ```
65
- Resuming autonomous delivery of intent [ID] — [name]
66
- Store: [global | project:<slug> | local]
67
- Last autonomous action: [last (autonomous) insight entry]
68
- Next step: [from checklist or savepoint]
69
- ```
70
-
71
- **Then:** Continue autonomous execution by invoking `plastic:auto`. The auto skill will pick up from the current lifecycle stage (it reads filesystem state to determine where to resume).
72
-
73
- If NOT found resume normally as described in step 3.
74
-
75
- ### 4. If No Active Intents → Offer Future Intents
76
-
77
- Present future intents as options. When user picks one, move to Active in INDEX.md. Auto-commit.
78
-
79
- ### 5. Surface Stale Future Intents
80
-
81
- If any future intent has `created` date older than the configured `stale_threshold_days` (default 3):
26
+ 1. **Global store** — `~/.plastic/INDEX.md` exists → global mode.
27
+ 2. **Local store** — a project store under `~/.plastic/projects/{slug}/` whose registered
28
+ path (in `~/.plastic/projects.yml`) matches the current working directory project mode.
29
+ The SessionStart hook already detects this; here you only need the slug to scope the
30
+ dashboard.
31
+ 3. If neither exists → announce "No Plastic store found. Run /plastic-install."
32
+
33
+ ## Continue (present the dashboard)
34
+
35
+ Land on the Markdown board via the `plastic-dashboard` skill. Rendering belongs there, not
36
+ here run the data payload and fill + present the matching template:
37
+ - Project loaded `ruby ~/.plastic/scripts/dashboard.rb project <slug> --data`
38
+ - Otherwise `ruby ~/.plastic/scripts/dashboard.rb continue --data`
39
+
40
+ Fill the matching template from this skill's `templates/` and **present the filled Markdown
41
+ in your reply** (every time). See `plastic-dashboard` for the fill rules and entry flow.
42
+
43
+ The board load runs the scoped store check on every load (`doctor --store <scope>`): the
44
+ global board runs `--store global` and a project board runs `--store <slug>`. The result
45
+ arrives in the payload as `store_health`; surface it as a one-line store-health note. It is
46
+ non-fatal (a warn or fail is shown as data, it does not block continuing).
47
+
48
+ ### Then stop
49
+ Present "here is the state, what next?" and wait. Offer active intents first, then future
50
+ intents. Do not start executing work. The branches below are the only follow-ups:
51
+ - User/agent names a specific intent to continue → **Conditional ledger-resume** (below).
52
+ - User says "auto" / an agent is instructed to deliver → hand to `plastic-auto`.
53
+
54
+ ## Conditional Ledger-Resume
55
+
56
+ Fires ONLY when the user explicitly asks to continue a SPECIFIC intent, or an agent is
57
+ instructed to continue one. It is not part of every boot. For that intent's directory:
58
+
59
+ 1. **Read `savepoint.md`.** It is a deterministic, append-only stage ledger (one line per
60
+ milestone, newest at the bottom): `{utc-iso8601} {Stage} {milestone}`. The **last line =
61
+ current stage**.
62
+ 2. **Verify the stage file.** Confirm the file the ledger names exists and is non-empty
63
+ (ledger `How plan.md created` `plan.md` must be present and non-empty).
64
+ 3. **Drift handling.** If the ledger's last line disagrees with files-on-disk, rebuild the
65
+ ledger from filesystem state and note the correction:
66
+ ```bash
67
+ ruby -r ~/.plastic/scripts/lib/bridge -e 'Bridge.rebuild_savepoint("<intent_dir>")'
68
+ ```
69
+ 4. **Derive the next step:**
70
+ - First unchecked item in `checklist.md` if it exists, else
71
+ - "advance to the next lifecycle stage" (e.g. ledger shows Why/spec.md → next is How).
72
+ - The newest `## Insights` entry supplies human-readable context (Insights are
73
+ append-only, newest at the bottom).
74
+ 5. **Announce and stop:**
75
+ ```
76
+ Resuming intent [ID] — [name]
77
+ Store: [global | project:<slug> | local]
78
+ Stage: [from ledger last line]
79
+ Next step: [first unchecked checklist item | advance to <stage>]
80
+ Context: [newest ## Insights entry]
81
+ Drift: [none | ledger rebuilt from filesystem]
82
+ ```
83
+ Then proceed with the next step. Autonomy is `plastic-auto`'s job — if the intent's
84
+ `## Insights` contains `(autonomous)` entries, it was being delivered autonomously; hand
85
+ to `plastic-auto` to continue from the current stage.
86
+
87
+ ## Priority Order
88
+
89
+ 1. **Active intents first** — surface work in progress.
90
+ 2. **Project context** if in a registered project, show governing + tactical intents.
91
+ 3. **Stale future intents** — surface for triage (see below).
92
+ 4. **Fresh future intents** offer as next work.
93
+
94
+ ## Stale Future Intents
95
+
96
+ If a future intent's `created` date is older than the configured `stale_threshold_days`
97
+ (default 3), surface it for triage without taking action:
82
98
 
83
99
  ```
84
100
  Stale future intents (no action taken):
85
101
 
86
102
  - [ID — name] (X days old)
87
- Options:
88
103
  a) Activate — start working on it now
89
104
  b) Abandon — mark as abandoned
90
- c) Defer to agent:
91
- - implement: agent builds it
92
- - research: agent investigates feasibility
93
- - ideate: agent explores the problem space
94
- d) Auto — go fully autonomous (invokes plastic:auto — agent delivers the intent end-to-end)
105
+ c) Defer to agent: implement | research | ideate
106
+ d) Auto go fully autonomous (invokes plastic-auto)
95
107
  ```
96
108
 
97
- Auto-commit all triage changes.
109
+ When the user activates a future intent, move it to `## Active` in INDEX.md and auto-commit.
98
110
 
99
- ### 6. Priority Order
111
+ ## References
100
112
 
101
- 1. **Active intents first** resume work in progress
102
- 2. **Project context** — if in a registered project, show governing intent + tactical intents
103
- 3. **Stale future intents** — surface for triage
104
- 4. **Fresh future intents** — offer as next work
113
+ - Read `references/context-management.md` for the full save/continue protocol and for
114
+ debugging the resume flow.