@zalom/plastic 2.0.0-alpha.27 → 2.0.0-alpha.28

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 (207) hide show
  1. package/PLASTIC.md +13 -139
  2. package/README.md +337 -133
  3. package/agents/plastic-enforcer.md +9 -10
  4. package/agents/plastic-executor.md +1 -1
  5. package/bin/crap +4 -0
  6. package/bin/lib/context_budget.rb +35 -1
  7. package/bin/lib/skill_census.rb +839 -0
  8. package/bin/plastic +6 -0
  9. package/bin/plastic-skill-census +114 -0
  10. package/bin/verify-change +345 -0
  11. package/deprecations.yml +1 -1
  12. package/{skills/agent-advisor/references → docs/help}/advisor-protocol.md +4 -7
  13. package/{skills/auto/references → docs/help}/agent-architecture.md +7 -7
  14. package/{skills/conventions/references → docs/help}/completion-and-done.md +1 -1
  15. package/{skills/auto/references → docs/help}/human-report-contract.md +17 -19
  16. package/{skills/conventions/references → docs/help}/roadmaps.md +2 -2
  17. package/{skills/tutorial/references → docs/help}/track-1-guided.md +8 -8
  18. package/{skills/tutorial/references → docs/help}/track-2-auto.md +5 -5
  19. package/{skills/tutorial/references → docs/help}/track-3-projects-and-roadmaps.md +24 -17
  20. package/package.json +3 -2
  21. package/scripts/append-ledger +2 -1
  22. package/scripts/dashboard.rb +10 -9
  23. package/scripts/day-summary +2 -1
  24. package/scripts/doctor.rb +48 -42
  25. package/scripts/end-intent +2 -8
  26. package/scripts/file-session-intent +2 -1
  27. package/scripts/hook-capture +4 -3
  28. package/scripts/hook-close +2 -1
  29. package/scripts/hook-record +3 -2
  30. package/scripts/hook-savepoint +3 -2
  31. package/scripts/hook-session-start +5 -4
  32. package/scripts/hook-stop +2 -1
  33. package/scripts/insight-append +1 -2
  34. package/scripts/install.rb +3 -1
  35. package/scripts/lib/active_delivery.rb +1 -1
  36. package/scripts/lib/arm.rb +2 -1
  37. package/scripts/lib/backup.rb +63 -0
  38. package/scripts/lib/cli/command.rb +85 -0
  39. package/scripts/lib/cli/commands/auto.rb +18 -0
  40. package/scripts/lib/cli/commands/auto_brief.rb +44 -0
  41. package/scripts/lib/cli/commands/auto_lock.rb +60 -0
  42. package/scripts/lib/cli/commands/auto_report.rb +50 -0
  43. package/scripts/lib/cli/commands/auto_take.rb +25 -0
  44. package/scripts/lib/cli/commands/backup.rb +43 -0
  45. package/scripts/lib/cli/commands/checkout.rb +25 -0
  46. package/scripts/lib/cli/commands/continue.rb +66 -0
  47. package/scripts/lib/cli/commands/doctor.rb +20 -0
  48. package/scripts/lib/cli/commands/feedback.rb +40 -0
  49. package/scripts/lib/cli/commands/help.rb +69 -0
  50. package/scripts/lib/cli/commands/hook.rb +32 -0
  51. package/scripts/lib/cli/commands/index.rb +23 -0
  52. package/scripts/lib/cli/commands/install.rb +21 -0
  53. package/scripts/lib/cli/commands/installer_verb.rb +37 -0
  54. package/scripts/lib/cli/commands/intent.rb +19 -0
  55. package/scripts/lib/cli/commands/intent_answer.rb +37 -0
  56. package/scripts/lib/cli/commands/intent_command.rb +53 -0
  57. package/scripts/lib/cli/commands/intent_end.rb +61 -0
  58. package/scripts/lib/cli/commands/intent_new.rb +62 -0
  59. package/scripts/lib/cli/commands/intent_note.rb +43 -0
  60. package/scripts/lib/cli/commands/intent_rule.rb +36 -0
  61. package/scripts/lib/cli/commands/intent_show.rb +25 -0
  62. package/scripts/lib/cli/commands/intent_spec.rb +44 -0
  63. package/scripts/lib/cli/commands/intent_step.rb +43 -0
  64. package/scripts/lib/cli/commands/intent_verify.rb +26 -0
  65. package/scripts/lib/cli/commands/migrate.rb +16 -0
  66. package/scripts/lib/cli/commands/migrate_stores.rb +31 -0
  67. package/scripts/lib/cli/commands/next.rb +49 -0
  68. package/scripts/lib/cli/commands/project.rb +19 -0
  69. package/scripts/lib/cli/commands/project_links.rb +42 -0
  70. package/scripts/lib/cli/commands/project_list.rb +20 -0
  71. package/scripts/lib/cli/commands/project_new.rb +72 -0
  72. package/scripts/lib/cli/commands/query.rb +31 -0
  73. package/scripts/lib/cli/commands/render.rb +25 -0
  74. package/scripts/lib/cli/commands/roadmap.rb +19 -0
  75. package/scripts/lib/cli/commands/roadmap_check.rb +44 -0
  76. package/scripts/lib/cli/commands/roadmap_log.rb +54 -0
  77. package/scripts/lib/cli/commands/roadmap_next.rb +34 -0
  78. package/scripts/lib/cli/commands/roadmap_show.rb +45 -0
  79. package/scripts/lib/cli/commands/rollback.rb +20 -0
  80. package/scripts/lib/cli/commands/search.rb +60 -0
  81. package/scripts/lib/cli/commands/session.rb +18 -0
  82. package/scripts/lib/cli/commands/session_commit.rb +42 -0
  83. package/scripts/lib/cli/commands/session_handoff.rb +34 -0
  84. package/scripts/lib/cli/commands/session_summary.rb +35 -0
  85. package/scripts/lib/cli/commands/status.rb +68 -0
  86. package/scripts/lib/cli/commands/subcommand_list.rb +36 -0
  87. package/scripts/lib/cli/commands/sync.rb +46 -0
  88. package/scripts/lib/cli/commands/uninstall.rb +20 -0
  89. package/scripts/lib/cli/commands/update.rb +20 -0
  90. package/scripts/lib/cli/commands/version.rb +53 -0
  91. package/scripts/lib/cli/frontier.rb +84 -0
  92. package/scripts/lib/cli/legacy.rb +50 -0
  93. package/scripts/lib/cli/output.rb +102 -0
  94. package/scripts/lib/cli/scope.rb +127 -0
  95. package/scripts/lib/cli/table.rb +64 -0
  96. package/scripts/lib/cli.rb +94 -0
  97. package/scripts/lib/compact_instructions.rb +8 -0
  98. package/scripts/lib/day_summary.rb +4 -3
  99. package/scripts/lib/doctor_core.rb +7 -32
  100. package/scripts/lib/doctor_session_ledger.rb +2 -1
  101. package/scripts/lib/feedback_report.rb +1 -1
  102. package/scripts/lib/graph_measure_models.rb +3 -1
  103. package/scripts/lib/index_entry.rb +9 -0
  104. package/scripts/lib/installer_core.rb +73 -19
  105. package/scripts/lib/intent_screen.rb +3 -3
  106. package/scripts/lib/lock.rb +2 -2
  107. package/scripts/lib/node_input.rb +3 -2
  108. package/scripts/lib/preflight.rb +2 -4
  109. package/scripts/lib/project_config.rb +2 -1
  110. package/scripts/lib/project_validator.rb +3 -2
  111. package/scripts/lib/qmd_sync.rb +8 -7
  112. package/scripts/lib/reference_archive.rb +45 -0
  113. package/scripts/lib/release_guard.rb +2 -0
  114. package/scripts/lib/report_screen.rb +4 -3
  115. package/scripts/lib/rlm/corpus.rb +13 -0
  116. package/scripts/lib/rlm/probe.rb +29 -0
  117. package/scripts/lib/rlm/query.rb +22 -0
  118. package/scripts/lib/roadmap_queue.rb +2 -2
  119. package/scripts/lib/roadmap_savepoint.rb +1 -1
  120. package/scripts/lib/runner_absorb.rb +3 -2
  121. package/scripts/lib/search_index.rb +55 -0
  122. package/scripts/lib/session_git.rb +4 -3
  123. package/scripts/lib/sqlite.rb +22 -0
  124. package/scripts/lib/store_discovery.rb +7 -6
  125. package/scripts/lib/store_layout.rb +54 -0
  126. package/scripts/lib/store_provisioning.rb +2 -1
  127. package/scripts/lib/store_sync.rb +85 -0
  128. package/scripts/lib/stores_move.rb +93 -0
  129. package/scripts/lib/verify_intent.rb +2 -7
  130. package/scripts/lib/version_number.rb +48 -0
  131. package/scripts/lib/work_graph.rb +59 -0
  132. package/scripts/lib/worktree.rb +3 -8
  133. package/scripts/lib/worktree_sweep.rb +3 -2
  134. package/scripts/link-suggest +2 -1
  135. package/scripts/migrate-to-global +1 -1
  136. package/scripts/new-intent +3 -12
  137. package/scripts/plastic-lock +3 -2
  138. package/scripts/promote-session-item +3 -2
  139. package/scripts/release-check +10 -5
  140. package/scripts/report-screen +1 -1
  141. package/scripts/session-commit +2 -1
  142. package/scripts/spawn-preamble +2 -2
  143. package/scripts/update.rb +25 -4
  144. package/scripts/write-handoff +2 -1
  145. package/templates/agents.md +6 -6
  146. package/templates/render.css +10 -0
  147. package/bin/plastic.js +0 -70
  148. package/skills/agent-advisor/SKILL.md +0 -84
  149. package/skills/auto/SKILL.md +0 -297
  150. package/skills/auto/evals/evals.json +0 -255
  151. package/skills/auto/references/end-tail.md +0 -64
  152. package/skills/conventions/SKILL.md +0 -29
  153. package/skills/dashboard/SKILL.md +0 -180
  154. package/skills/dashboard/evals/evals.json +0 -38
  155. package/skills/dashboard/references/classification.md +0 -22
  156. package/skills/dashboard/templates/dashboard-global.md +0 -20
  157. package/skills/dashboard/templates/dashboard-project.md +0 -19
  158. package/skills/direct/SKILL.md +0 -66
  159. package/skills/direct/references/request-signals.md +0 -59
  160. package/skills/doctor/SKILL.md +0 -305
  161. package/skills/doctor/report.md +0 -102
  162. package/skills/feedback/SKILL.md +0 -98
  163. package/skills/feedback/references/transport-and-privacy.md +0 -65
  164. package/skills/feedback/report.md +0 -36
  165. package/skills/install/SKILL.md +0 -215
  166. package/skills/intent-continuing/SKILL.md +0 -156
  167. package/skills/intent-continuing/references/board-fill.md +0 -52
  168. package/skills/intent-continuing/references/boarding-matrix.md +0 -35
  169. package/skills/intent-continuing/references/context-management.md +0 -28
  170. package/skills/intent-continuing/references/liveness-ranking.md +0 -57
  171. package/skills/intent-creating/SKILL.md +0 -89
  172. package/skills/intent-creating/evals/evals.json +0 -72
  173. package/skills/intent-creating/references/lifecycle.md +0 -81
  174. package/skills/intent-creating/references/wikilinks.md +0 -8
  175. package/skills/intent-ending/SKILL.md +0 -182
  176. package/skills/intent-ending/evals/evals.json +0 -74
  177. package/skills/intent-executing/SKILL.md +0 -87
  178. package/skills/intent-executing/evals/evals.json +0 -66
  179. package/skills/intent-executing/implementer-prompt.md +0 -47
  180. package/skills/intent-executing/spec-reviewer-prompt.md +0 -27
  181. package/skills/intent-speccing/SKILL.md +0 -136
  182. package/skills/intent-speccing/evals/evals.json +0 -126
  183. package/skills/intent-speccing/references/design-principles.md +0 -44
  184. package/skills/intent-speccing/references/per-section-fill-rules.md +0 -92
  185. package/skills/intent-speccing/references/self-verify-checklist.md +0 -37
  186. package/skills/project-creating/SKILL.md +0 -162
  187. package/skills/project-creating/references/hubs-projects.md +0 -55
  188. package/skills/project-creating/references/project-scaffolding.md +0 -97
  189. package/skills/releasing/SKILL.md +0 -376
  190. package/skills/releasing/references/deprecations.md +0 -60
  191. package/skills/releasing/references/promotion-and-tagging.md +0 -70
  192. package/skills/releasing/references/release-lines.md +0 -105
  193. package/skills/roadmap/SKILL.md +0 -90
  194. package/skills/roadmap/references/file-format.md +0 -134
  195. package/skills/roadmap/references/operations.md +0 -112
  196. package/skills/rollback/SKILL.md +0 -91
  197. package/skills/tutorial/SKILL.md +0 -66
  198. package/skills/tutorial/evals/evals.json +0 -186
  199. package/skills/uninstall/SKILL.md +0 -75
  200. package/skills/update/SKILL.md +0 -126
  201. /package/{skills/auto/references → docs/help}/agent-report-contract.md +0 -0
  202. /package/{skills/intent-executing → docs/help}/code-quality-reviewer-prompt.md +0 -0
  203. /package/{skills/conventions/references → docs/help}/knowledge-graph.md +0 -0
  204. /package/{skills/conventions/references → docs/help}/lifecycle-and-savepoints.md +0 -0
  205. /package/{skills/conventions/references → docs/help}/locks-and-worktrees.md +0 -0
  206. /package/{skills/conventions/references → docs/help}/maintenance-and-revisions.md +0 -0
  207. /package/{skills/intent-executing → docs/help}/plan-reviewer-prompt.md +0 -0
@@ -1,186 +0,0 @@
1
- {
2
- "skill_name": "plastic-tutorial",
3
- "notes": "Intent 166, Phase 1. Scopes: triggering (1-6, should and should-not with near-misses) and track routing (7-10, one case per track plus a direct-menu case). plastic-tutorial is a natural-language guided command with no backing Ruby test, so every assertion carries result: expect-pass pending a real observed run, per the intent-speccing evals.json convention. Phase 2 (post-164) can tighten these into observed pass/fail after a paired run.",
4
- "evals": [
5
- {
6
- "id": 1,
7
- "scope": "triggering",
8
- "set": "train",
9
- "prompt": "I want a tutorial on how Plastic works.",
10
- "expected_output": "Activates plastic-tutorial and offers the three-track menu.",
11
- "files": [],
12
- "assertions": [
13
- {
14
- "type": "code",
15
- "check": "router CHOICE == plastic-tutorial",
16
- "result": "expect-pass"
17
- }
18
- ]
19
- },
20
- {
21
- "id": 2,
22
- "scope": "triggering",
23
- "set": "train",
24
- "prompt": "Teach me Plastic from scratch.",
25
- "expected_output": "Activates plastic-tutorial and offers the three-track menu.",
26
- "files": [],
27
- "assertions": [
28
- {
29
- "type": "code",
30
- "check": "router CHOICE == plastic-tutorial",
31
- "result": "expect-pass"
32
- }
33
- ]
34
- },
35
- {
36
- "id": 3,
37
- "scope": "triggering",
38
- "set": "train",
39
- "prompt": "Walk me through Plastic before I try it on my real project.",
40
- "expected_output": "Activates plastic-tutorial and offers the three-track menu.",
41
- "files": [],
42
- "assertions": [
43
- {
44
- "type": "code",
45
- "check": "router CHOICE == plastic-tutorial",
46
- "result": "expect-pass"
47
- }
48
- ]
49
- },
50
- {
51
- "id": 4,
52
- "scope": "triggering",
53
- "set": "validation",
54
- "prompt": "How do I use Plastic day to day?",
55
- "expected_output": "Activates plastic-tutorial and offers the three-track menu.",
56
- "files": [],
57
- "assertions": [
58
- {
59
- "type": "code",
60
- "check": "router CHOICE == plastic-tutorial",
61
- "result": "expect-pass"
62
- }
63
- ]
64
- },
65
- {
66
- "id": 5,
67
- "scope": "triggering",
68
- "set": "validation",
69
- "prompt": "I have never touched this tool before. What can it actually do for me before I commit real work to it?",
70
- "expected_output": "Activates plastic-tutorial; an indirect trigger that names neither the skill nor the word tutorial.",
71
- "files": [],
72
- "assertions": [
73
- {
74
- "type": "code",
75
- "check": "router CHOICE == plastic-tutorial",
76
- "result": "expect-pass"
77
- }
78
- ]
79
- },
80
- {
81
- "id": 6,
82
- "scope": "triggering",
83
- "set": "train",
84
- "prompt": "Create an intent for adding a search feature.",
85
- "expected_output": "Does NOT activate plastic-tutorial; activates plastic-intent-creating (a near-miss that shares the word intent but starts real work, not a walkthrough).",
86
- "files": [],
87
- "assertions": [
88
- {
89
- "type": "code",
90
- "check": "router CHOICE != plastic-tutorial",
91
- "result": "expect-pass"
92
- }
93
- ]
94
- },
95
- {
96
- "id": 7,
97
- "scope": "triggering",
98
- "set": "validation",
99
- "prompt": "Just run the whole thing for me, I do not want to steer any of it.",
100
- "expected_output": "Does NOT activate plastic-tutorial; activates plastic-auto (a near-miss that describes autonomous delivery of real work, not a walkthrough of how auto works).",
101
- "files": [],
102
- "assertions": [
103
- {
104
- "type": "code",
105
- "check": "router CHOICE != plastic-tutorial",
106
- "result": "expect-pass"
107
- }
108
- ]
109
- },
110
- {
111
- "id": 8,
112
- "scope": "track-routing",
113
- "set": "train",
114
- "prompt": "Inside the tutorial menu: show me auto mode.",
115
- "expected_output": "Routes to track 2 (references/track-2-auto.md), the auto handover track.",
116
- "files": [],
117
- "assertions": [
118
- {
119
- "type": "code",
120
- "check": "TRACK == track-2-auto",
121
- "result": "expect-pass"
122
- }
123
- ]
124
- },
125
- {
126
- "id": 9,
127
- "scope": "track-routing",
128
- "set": "train",
129
- "prompt": "Inside the tutorial menu: I want a roadmap.",
130
- "expected_output": "Routes to track 3 (references/track-3-projects-and-roadmaps.md), the projects and roadmaps track.",
131
- "files": [],
132
- "assertions": [
133
- {
134
- "type": "code",
135
- "check": "TRACK == track-3-projects-and-roadmaps",
136
- "result": "expect-pass"
137
- }
138
- ]
139
- },
140
- {
141
- "id": 10,
142
- "scope": "track-routing",
143
- "set": "validation",
144
- "prompt": "Inside the tutorial menu: start a project.",
145
- "expected_output": "Routes to track 3 (references/track-3-projects-and-roadmaps.md), the projects and roadmaps track.",
146
- "files": [],
147
- "assertions": [
148
- {
149
- "type": "code",
150
- "check": "TRACK == track-3-projects-and-roadmaps",
151
- "result": "expect-pass"
152
- }
153
- ]
154
- },
155
- {
156
- "id": 11,
157
- "scope": "track-routing",
158
- "set": "validation",
159
- "prompt": "Walk me through my first intent, one stage at a time.",
160
- "expected_output": "Routes to track 1 (references/track-1-guided.md), the guided delivery track.",
161
- "files": [],
162
- "assertions": [
163
- {
164
- "type": "code",
165
- "check": "TRACK == track-1-guided",
166
- "result": "expect-pass"
167
- }
168
- ]
169
- },
170
- {
171
- "id": 12,
172
- "scope": "track-routing",
173
- "set": "train",
174
- "prompt": "Tutorial. (No further detail given.)",
175
- "expected_output": "Activates plastic-tutorial and presents the three-track menu itself, since no track was named; this is the one case where the menu is the expected output rather than a routed track.",
176
- "files": [],
177
- "assertions": [
178
- {
179
- "type": "human",
180
- "check": "the reply shows the three-track menu (guided, auto, projects and roadmaps) and does not jump into any one track uninvited",
181
- "result": "expect-pass"
182
- }
183
- ]
184
- }
185
- ]
186
- }
@@ -1,75 +0,0 @@
1
- ---
2
- name: plastic-uninstall
3
- description: Use when the user wants to remove Plastic from an agent. Runs the manifest-driven uninstaller (removes skills, hooks, statusline, and any legacy plugin layout), reports exactly what was removed and what was left behind, then gives verification steps. The intent store always stays.
4
- user-invocable: true
5
- ---
6
-
7
- # Uninstall Plastic
8
-
9
- The installer tracks every file it writes in a manifest, so uninstall is exact and
10
- leaves no orphans. Prefer running it through the CLI; this skill wraps the same
11
- underlying uninstaller and adds reporting + verification.
12
-
13
- ## Channel rule
14
-
15
- If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
16
- `-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed,
17
- default to `@latest`. The user can always override with `--alpha` / `--beta` / `--latest`.
18
-
19
- ## Procedure
20
-
21
- ### Step 1: Run the uninstaller
22
-
23
- ```bash
24
- npx -y @zalom/plastic@<channel> uninstall --claude
25
- ```
26
-
27
- (Use `--codex` / `--hermes` / `--all` to target other agents. `bunx -y @zalom/plastic@<channel> uninstall --claude` works too.)
28
-
29
- This removes, for the targeted agent:
30
- - all `~/.claude/skills/plastic-*/` skills
31
- - all `~/.claude/hooks/plastic-*` hooks (and restores any saved original statusline)
32
- - the `~/.claude/plastic/` state dir + manifest
33
- - any **legacy** plugin layout: `plugins/marketplaces/plastic`, `plugins/cache/plastic`,
34
- the old nested `skills/plastic/`, and the `plastic@plastic` /
35
- `extraKnownMarketplaces.plastic` / `known_marketplaces.json` registrations
36
-
37
- ### Step 2: Report removed vs left
38
-
39
- Relay the uninstaller's output to the user: what was **removed** and what was
40
- **left in place**.
41
- - **Left:** `~/.plastic/` (intent store, history, projects) and any non-Plastic
42
- settings.json entries.
43
-
44
- ### Step 3: Verify removal
45
-
46
- Tell the user to confirm:
47
-
48
- ```bash
49
- ls ~/.claude/skills | grep '^plastic-' # -> no output
50
- ls ~/.claude/hooks | grep '^plastic-' # -> no output
51
- grep -n plastic ~/.claude/settings.json # -> no plastic hook/plugin refs
52
- ```
53
-
54
- ### Step 4: Report
55
-
56
- Emit the reporting block, using the Step 3 checks for the verification line:
57
-
58
- ```
59
- Plastic uninstall (<channel>)
60
- Command: npx -y @zalom/plastic@<channel> uninstall --claude <flags>
61
- Version: removed
62
- Verification: <Step 3 results, or "clean">
63
- ```
64
-
65
- Then:
66
-
67
- ```
68
- Plastic is uninstalled from [agent].
69
- Your intent store at ~/.plastic/ is untouched.
70
- ```
71
-
72
- Uninstall removes installed harness files only. The store at `~/.plastic/` (intents,
73
- history, projects, config, version ledger) always stays; no uninstall path deletes it.
74
- Tell the user: "Your data is at ~/.plastic/. Re-install anytime with
75
- `npx -y @zalom/plastic@latest install --claude` (or your channel)."
@@ -1,126 +0,0 @@
1
- ---
2
- name: plastic-update
3
- description: Use when updating Plastic. Runs the `update` verb, which reads the installed VERSION, derives its channel, queries npm dist-tags, and advances to the next version on that channel (or switches channel with a flag).
4
- user-invocable: true
5
- ---
6
-
7
- # Update Plastic
8
-
9
- ## When to Use
10
- - User says "update plastic", "sync plastic", or "upgrade plastic"
11
- - Statusline shows "Plastic update available"
12
- - After a version-bump notification
13
-
14
- ## What it does
15
-
16
- `update` is a single deterministic command. It reads `~/.plastic/VERSION`, derives the
17
- channel from the version string (`-alpha`/`-beta`/none -> stable), queries `npm` dist-tags,
18
- and advances to the **next version on the current channel**. "Already up to date" is a
19
- clean no-op. You do not compute the target yourself, the script does.
20
-
21
- ## Channel rule
22
-
23
- If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
24
- `-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed
25
- (first install), default to `@latest`. The user can always override with
26
- `--alpha` / `--beta` / `--latest`.
27
-
28
- ## Flags
29
-
30
- | Flag | Behaviour |
31
- |------|-----------|
32
- | (none) | Advance to the next version on the **current** channel |
33
- | `--latest` | Switch to / advance the **stable** channel (toward stability, frictionless) |
34
- | `--beta` | Switch to / advance the **beta** channel |
35
- | `--alpha` | Switch to / advance the **alpha** channel (bleeding edge, confirmed if moving down in stability) |
36
-
37
- Switching toward a more stable channel is frictionless; switching toward bleeding edge is
38
- confirmed. To roll **back** to a previously-installed version, use `plastic-rollback`.
39
-
40
- ## Prerequisites
41
-
42
- Plastic must be installed (`~/.plastic/VERSION` present). If not, run `plastic-install`
43
- first (or `npx -y @zalom/plastic@latest install --claude` directly).
44
-
45
- ## Procedure
46
-
47
- ### Step 1: Run the update
48
-
49
- ```bash
50
- npx -y @zalom/plastic@<channel> update
51
- # channel switch: append --beta / --latest / --alpha
52
- # to target a specific harness instead of every installed one: --claude / --codex / --hermes / --all
53
- ```
54
-
55
- `bunx -y @zalom/plastic@<channel> update` works as a fallback if `npx` is unavailable.
56
-
57
- With no harness flag, `update` targets **every currently-installed harness** (read from
58
- each agent's own `<agent-dir>/plastic/VERSION`), never Claude alone. Pass an explicit flag
59
- only to target one harness specifically.
60
-
61
- If the core is already on the target version but a targeted harness's own record is stale
62
- or missing (for example a harness added after the last sync), `update` still re-syncs that
63
- harness at the same version instead of reporting a clean no-op (same-version repair).
64
-
65
- The command prints the transition (`vX -> vY`) or "already up to date", a per-agent
66
- transaction summary when more than one harness synced, runs a post-update doctor summary
67
- per synced harness, and records one `versions.json` ledger row per synced harness (each
68
- row's `harness` field names which one).
69
-
70
- ### Step 2: Relay any pending config question(s) the update printed
71
-
72
- If `update`'s own output (Step 1) printed a "Config question(s) introduced by
73
- this update" block, relay each question to the user exactly as printed
74
- (question, options, and the `write-config` command for each option). Do not
75
- invent or hardcode a specific question here: it comes from the CLI's fresh
76
- output (`config_asks.yml`, read by code that just synced from the new version),
77
- never from this skill file, which is always one release behind and cannot know
78
- what a future release will ask.
79
-
80
- Once the user picks an option, run the printed `write-config` command for that
81
- option, for example:
82
-
83
- ```
84
- ruby ~/.plastic/scripts/write-config advisor.claude.default plastic-primary-advisor
85
- ```
86
-
87
- If they say "not now" / want to keep the default, run the printed dismissal
88
- command instead, for example:
89
-
90
- ```
91
- ruby ~/.plastic/scripts/write-config config_asks_dismissed --push advisor-default
92
- ```
93
-
94
- If `update` printed nothing under that heading, skip this step silently - there
95
- is nothing pending. A question already answered or dismissed is never re-asked
96
- (both the CLI print and the doctor check verify this before showing anything),
97
- and a pending question missed here still shows up as a `config_asks` warn on
98
- the next `/plastic-doctor` run, so nothing is silently lost.
99
-
100
- ### Step 3: Relay the result, announce convention changes
101
-
102
- Relay what `update` printed, do not recompute the version transition or the doctor
103
- summary:
104
-
105
- ```
106
- Plastic update (<channel>)
107
- Command: npx -y @zalom/plastic@<channel> update <flags>
108
- Version: <before> -> <after>
109
- Doctor: <relayed summary, or "all clear">
110
- ```
111
-
112
- Then read `~/.plastic/PLASTIC.md` and announce convention changes that affect the
113
- current session, and recommend `/clear` for a clean session with all new conventions
114
- loaded.
115
-
116
- ### Step 4: Health check only on a relayed failure
117
-
118
- If the relayed doctor summary shows a failure, invoke `plastic-doctor` for the full
119
- report and offer to fix. If it already reads clean, do not re-run doctor.
120
-
121
- ### Step 5: Commit + clear update cache
122
-
123
- ```bash
124
- cd ~/.plastic && git add PLASTIC.md scripts/ AGENTS.md VERSION versions.json deprecations.yml config_asks.yml 2>/dev/null && git commit -m "chore: update Plastic to $(cat ~/.plastic/VERSION)" --allow-empty
125
- rm -f ~/.plastic/.cache/update-check.json
126
- ```