@zalom/plastic 1.0.0-beta.33 → 1.0.0-beta.35
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.
- package/PLASTIC.md +8 -6
- package/agents/plastic-intent-discovery.md +7 -4
- package/bin/plastic.js +7 -3
- package/hooks/statusline +48 -6
- package/package.json +1 -1
- package/scripts/dashboard.rb +86 -21
- package/scripts/hook-continue +17 -0
- package/scripts/install.rb +42 -6
- package/scripts/lib/bridge.rb +134 -35
- package/scripts/lib/dashboard_banner.rb +42 -0
- package/scripts/lib/installer_core.rb +40 -6
- package/scripts/lib/preflight.rb +79 -0
- package/scripts/plastic-lock +2 -2
- package/skills/auto/SKILL.md +4 -2
- package/skills/continuing/SKILL.md +5 -1
- package/skills/dashboard/SKILL.md +25 -8
- package/skills/doctor/SKILL.md +6 -6
- package/skills/install/SKILL.md +75 -84
- package/skills/intent-discovery/SKILL.md +8 -7
- package/skills/intent-starting/SKILL.md +11 -8
- package/skills/releasing/SKILL.md +4 -1
- package/skills/uninstall/SKILL.md +29 -11
- package/skills/update/SKILL.md +34 -23
- package/skills/versions/SKILL.md +27 -12
package/skills/install/SKILL.md
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
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.
|
|
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 --beta; 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
|
---
|
|
5
5
|
|
|
6
6
|
# Install Plastic
|
|
7
7
|
|
|
8
|
-
> **Recommended path:** for a first install, run `npx @zalom/plastic@
|
|
9
|
-
> in your shell (or `bunx @zalom/plastic@
|
|
8
|
+
> **Recommended path:** for a first install, run `npx -y @zalom/plastic@beta install --claude`
|
|
9
|
+
> in your shell (or `bunx -y @zalom/plastic@beta install --claude` if you use Bun). This skill
|
|
10
10
|
> exists to **re-install or repair** an existing setup from inside the agent, and to
|
|
11
11
|
> drive interactive global configuration. Whenever this skill performs an install or
|
|
12
12
|
> re-install, it **runs `/plastic-doctor` afterward** and reports the result.
|
|
13
13
|
|
|
14
|
+
## Channel rule
|
|
15
|
+
|
|
16
|
+
If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
|
|
17
|
+
`-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed
|
|
18
|
+
(first install), default to `@beta`. The user can always override with
|
|
19
|
+
`--alpha` / `--beta` / `--latest`.
|
|
20
|
+
|
|
14
21
|
## Re-install / repair
|
|
15
22
|
|
|
16
23
|
If Plastic is already installed but something is broken (skills missing, hooks not
|
|
17
|
-
firing, leftover legacy plugin), re-run the installer
|
|
24
|
+
firing, leftover legacy plugin), re-run the installer, it is idempotent, prunes
|
|
18
25
|
files that no longer ship, and removes any legacy plugin/marketplace layout:
|
|
19
26
|
|
|
20
27
|
```bash
|
|
21
|
-
npx @zalom/plastic
|
|
28
|
+
npx -y @zalom/plastic@<channel> install --reinstall --claude
|
|
22
29
|
```
|
|
23
30
|
|
|
24
31
|
Then **run `/plastic-doctor`** and report what it found.
|
|
@@ -27,22 +34,22 @@ Then **run `/plastic-doctor`** and report what it found.
|
|
|
27
34
|
|
|
28
35
|
| Flag | Behavior |
|
|
29
36
|
|------|----------|
|
|
30
|
-
| `--latest` | Install from stable channel
|
|
31
|
-
| `--beta` | Install from beta channel |
|
|
32
|
-
| `--alpha` | Install from alpha channel |
|
|
37
|
+
| `--latest` | Install from the stable channel |
|
|
38
|
+
| `--beta` | Install from the beta channel (default on a first install) |
|
|
39
|
+
| `--alpha` | Install from the alpha channel |
|
|
33
40
|
|
|
34
41
|
When invoked from within Claude Code (re-install or channel switch), the skill
|
|
35
42
|
runs the appropriate npx command:
|
|
36
43
|
|
|
37
44
|
```bash
|
|
38
|
-
# Stable
|
|
39
|
-
npx @zalom/plastic install --claude
|
|
45
|
+
# Stable
|
|
46
|
+
npx -y @zalom/plastic@latest install --claude
|
|
40
47
|
|
|
41
|
-
# Beta
|
|
42
|
-
npx @zalom/plastic@beta install --claude
|
|
48
|
+
# Beta (default on a first install)
|
|
49
|
+
npx -y @zalom/plastic@beta install --claude
|
|
43
50
|
|
|
44
51
|
# Alpha
|
|
45
|
-
npx @zalom/plastic@alpha install --claude
|
|
52
|
+
npx -y @zalom/plastic@alpha install --claude
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
The installed version and channel are recorded in `~/.plastic/VERSION`.
|
|
@@ -55,105 +62,80 @@ Run `/plastic-install` with no arguments.
|
|
|
55
62
|
|
|
56
63
|
#### Procedure
|
|
57
64
|
|
|
58
|
-
**Step 1:
|
|
59
|
-
|
|
60
|
-
Check if `~/.plastic/INDEX.md` exists.
|
|
61
|
-
- If yes: announce "Plastic is already installed at ~/.plastic/. Run `/plastic-update` to sync core files."
|
|
62
|
-
- If no: proceed with fresh install.
|
|
65
|
+
**Step 1: Run the installer**
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
Check if `~/.plastic/VERSION` exists.
|
|
68
|
+
- If yes: announce "Plastic is already installed at ~/.plastic/. Run `/plastic-update` to
|
|
69
|
+
sync core files, or use the re-install command above to repair in place."
|
|
70
|
+
- If no: run the fresh install command (default `@beta`, or the channel the user named):
|
|
65
71
|
|
|
66
72
|
```bash
|
|
67
|
-
|
|
73
|
+
npx -y @zalom/plastic@beta install --claude
|
|
68
74
|
```
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- `
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
This single command, via `install.rb` (`bootstrap` + `distribute`), creates `store/`,
|
|
77
|
+
`projects/`, `config.yml`, `projects.yml`, `INDEX.md`, and `AGENTS.md` under `~/.plastic/`,
|
|
78
|
+
and copies the utility scripts (`folgezettel-id`, `read-config`, and the rest of
|
|
79
|
+
`scripts/`). This skill does none of that itself; it wraps the command with the
|
|
80
|
+
interactive steps the CLI does not yet own, plus reporting and a doctor pass.
|
|
75
81
|
|
|
76
|
-
|
|
77
|
-
```markdown
|
|
78
|
-
# Plastic — Agent Instructions
|
|
82
|
+
**Statusline**
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
On install, if an existing statusline is already configured, Plastic asks whether to
|
|
85
|
+
keep it or switch to Plastic's (interactive sessions only). The choice is honored via
|
|
86
|
+
`--statusline keep` or `--statusline plastic`, which skips the prompt. Non-interactive
|
|
87
|
+
sessions (no tty) default to keeping the user's line: nothing is silently overwritten.
|
|
88
|
+
A fresh system with no statusline configured gets Plastic's line with no prompt.
|
|
82
89
|
|
|
83
|
-
|
|
84
|
-
may add content below.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
```
|
|
90
|
+
**Step 2: Initialize git (retained)**
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
Only if `~/.plastic/.git` is absent (a fresh bootstrap does not init git):
|
|
90
93
|
|
|
91
|
-
Initialize git:
|
|
92
94
|
```bash
|
|
93
95
|
cd ~/.plastic && git init && git add . && git commit -m "chore: initialize Plastic global intent store"
|
|
94
96
|
```
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
Retained here because the CLI does not git-init the store yet (follow-up).
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
mkdir -p ~/.plastic/scripts
|
|
100
|
-
cp "${CLAUDE_PLUGIN_ROOT}/scripts/folgezettel-id" ~/.plastic/scripts/folgezettel-id
|
|
101
|
-
cp "${CLAUDE_PLUGIN_ROOT}/scripts/read-config" ~/.plastic/scripts/read-config
|
|
102
|
-
chmod +x ~/.plastic/scripts/folgezettel-id ~/.plastic/scripts/read-config
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
This ensures project agents can generate hashes via `~/.plastic/scripts/folgezettel-id` without depending on a specific agent's plugin cache path.
|
|
106
|
-
|
|
107
|
-
**Step 2c: Detect agent type and set preferences**
|
|
100
|
+
**Step 3: Personalize config (retained)**
|
|
108
101
|
|
|
109
102
|
Detect which agent is running:
|
|
110
|
-
- If `CLAUDE_CODE` env var is set or we're running inside Claude Code
|
|
111
|
-
- If `HERMES_HOME` env var is set
|
|
112
|
-
- Otherwise
|
|
103
|
+
- If `CLAUDE_CODE` env var is set or we're running inside Claude Code -> `agent.type: claude-code`
|
|
104
|
+
- If `HERMES_HOME` env var is set -> `agent.type: hermes`
|
|
105
|
+
- Otherwise -> ask the user: "Which AI agent are you using? (claude-code / hermes / other)"
|
|
113
106
|
|
|
114
107
|
Ask the user:
|
|
115
|
-
> "Enable Agent Teams? (experimental
|
|
116
|
-
> - Yes
|
|
117
|
-
> - No
|
|
118
|
-
|
|
119
|
-
Update `~/.plastic/config.yml` with detected/chosen values using `read-config --migrate` first to ensure v3 schema, then write the agent-specific values.
|
|
120
|
-
|
|
121
|
-
Auto-commit the config change.
|
|
122
|
-
|
|
123
|
-
**Step 2d: Configure GitHub and push preferences**
|
|
108
|
+
> "Enable Agent Teams? (experimental: parallel project work with teammates)"
|
|
109
|
+
> - Yes -> set `parallel_mode: agent-teams`
|
|
110
|
+
> - No -> set `parallel_mode: linear` (subagents only)
|
|
124
111
|
|
|
125
112
|
Inform the user:
|
|
126
|
-
> "Plastic agents can create GitHub repositories for new projects.
|
|
127
|
-
>
|
|
128
|
-
>
|
|
113
|
+
> "Plastic agents can create GitHub repositories for new projects. By default, all
|
|
114
|
+
> agent-created repos are **private**. Your global intent store (~/.plastic/) is never
|
|
115
|
+
> pushed, it stays local-only."
|
|
129
116
|
|
|
130
117
|
Ask the user:
|
|
131
118
|
> "Default visibility for agent-created repos?"
|
|
132
|
-
> - Private (recommended)
|
|
133
|
-
> - Public
|
|
134
|
-
|
|
119
|
+
> - Private (recommended) -> set `github.default_visibility: private`
|
|
120
|
+
> - Public -> set `github.default_visibility: public`
|
|
121
|
+
>
|
|
135
122
|
> "Allow agents to push to GitHub without asking?"
|
|
136
|
-
> - No (recommended)
|
|
137
|
-
> - Yes
|
|
138
|
-
|
|
139
|
-
Update `config.yml` with chosen values. Auto-commit.
|
|
140
|
-
|
|
141
|
-
**Step 3: Configure project roots**
|
|
142
|
-
|
|
143
|
-
Ask the user:
|
|
123
|
+
> - No (recommended) -> set `github.auto_push: false`
|
|
124
|
+
> - Yes -> set `github.auto_push: true`
|
|
125
|
+
>
|
|
144
126
|
> "Where do you keep your projects? Default: ~/.plastic/projects/"
|
|
145
127
|
> "Add additional roots? (e.g., ~/apps/personal/, ~/apps/companies/)"
|
|
146
128
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
129
|
+
Write each answer via `read-config --migrate` first (ensures the v3 schema), then the
|
|
130
|
+
chosen values; auto-commit each change. Retained here because the CLI writes only
|
|
131
|
+
hardcoded defaults, so these interactive choices stay in the skill.
|
|
150
132
|
|
|
151
133
|
**Step 4: Verify with doctor**
|
|
152
134
|
|
|
153
135
|
Run `/plastic-doctor` and report the result. Resolve any fixable findings before
|
|
154
136
|
announcing success.
|
|
155
137
|
|
|
156
|
-
**Step 5: Register stores with QMD (
|
|
138
|
+
**Step 5: Register stores with QMD (retained)**
|
|
157
139
|
|
|
158
140
|
QMD is an optional search layer. If it is installed, register the Plastic stores so
|
|
159
141
|
they are searchable:
|
|
@@ -165,19 +147,27 @@ ruby ~/.plastic/scripts/qmd-sync detect && ruby ~/.plastic/scripts/qmd-sync regi
|
|
|
165
147
|
`qmd-sync` no-ops cleanly when QMD is absent, so this is safe to run unconditionally.
|
|
166
148
|
It registers `plastic-global` and every project store from `projects.yml`, then indexes
|
|
167
149
|
them. Report what was registered, or that QMD was not detected and the step was skipped.
|
|
150
|
+
Retained here because the CLI does not register at install time (follow-up).
|
|
151
|
+
|
|
152
|
+
**Step 6: Report + announce**
|
|
168
153
|
|
|
169
|
-
|
|
154
|
+
```
|
|
155
|
+
Plastic install (<channel>)
|
|
156
|
+
Command: npx -y @zalom/plastic@<channel> install --claude <flags>
|
|
157
|
+
Version: none -> <installed>
|
|
158
|
+
Doctor: <summary or "all clear">
|
|
159
|
+
```
|
|
170
160
|
|
|
171
|
-
|
|
172
|
-
> Create your first intent with `/plastic-creating-intent`."
|
|
161
|
+
Then: "Create your first intent with `/plastic-creating-intent`."
|
|
173
162
|
|
|
174
163
|
### Local Install (testing/legacy)
|
|
175
164
|
|
|
176
|
-
Run `/plastic-install --local`.
|
|
165
|
+
Run `/plastic-install --local`. `install.rb` has no `--local` verb, so this mode is
|
|
166
|
+
genuinely skill-owned.
|
|
177
167
|
|
|
178
168
|
#### Procedure
|
|
179
169
|
|
|
180
|
-
**Step 1:** Check if `.plastic/` exists in CWD
|
|
170
|
+
**Step 1:** Check if `.plastic/` exists in CWD, if so, warn and exit.
|
|
181
171
|
|
|
182
172
|
**Step 2:** Create `.plastic/` in CWD:
|
|
183
173
|
- `config.yml` from templates
|
|
@@ -192,4 +182,5 @@ Run `/plastic-install --local`.
|
|
|
192
182
|
|
|
193
183
|
**Step 4:** Commit in project: `git add .plastic/ && git commit -m "chore: initialize Plastic local store"`
|
|
194
184
|
|
|
195
|
-
**Step 5:** Announce: "Plastic initialized locally. This is a testing/legacy mode. Consider
|
|
185
|
+
**Step 5:** Announce: "Plastic initialized locally. This is a testing/legacy mode. Consider
|
|
186
|
+
`/plastic-install` for global mode."
|
|
@@ -4,22 +4,21 @@ description: >-
|
|
|
4
4
|
What-stage context deposit at intent activation: run QMD discovery over the
|
|
5
5
|
intent's chain/sources and related parked intents, and write findings to
|
|
6
6
|
resources/discovery--<slug>.md for the Why stage to consume. Use when an intent
|
|
7
|
-
is activated (moved from Future to Active),
|
|
8
|
-
begins. Never writes the intent file itself.
|
|
7
|
+
is activated (moved from Future to Active), after the lock is armed, under it,
|
|
8
|
+
and before Why begins. Never writes the intent file itself.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Intent Discovery — What-stage context deposit
|
|
12
12
|
|
|
13
13
|
Announce: "Discovering context for intent [ID] — [name]."
|
|
14
14
|
|
|
15
|
-
Runs once, at intent activation,
|
|
15
|
+
Runs once, at intent activation, after the lock is armed and before Why. It gathers what is
|
|
16
16
|
already known so Why does not start cold, and deposits it as a resource the
|
|
17
17
|
Why-stage brainstorming agent reads.
|
|
18
18
|
|
|
19
19
|
## When it fires
|
|
20
|
-
Inside `plastic-intent-starting`,
|
|
21
|
-
|
|
22
|
-
`plastic-intent-discovery` background agent.
|
|
20
|
+
Inside `plastic-intent-starting`, right after the bridge is armed, under the
|
|
21
|
+
lock. Dispatched as the `plastic-intent-discovery` background agent.
|
|
23
22
|
|
|
24
23
|
## What it does
|
|
25
24
|
1. **Read the intent's links.** Load the activating intent file's `chain` and
|
|
@@ -42,5 +41,7 @@ executor, Done: intent-curator).
|
|
|
42
41
|
|
|
43
42
|
## Boundaries
|
|
44
43
|
- Single output: `resources/discovery--<slug>.md`.
|
|
45
|
-
-
|
|
44
|
+
- Does not ACQUIRE the delivery lock itself; it runs under the lock the
|
|
45
|
+
orchestrator armed, as the owner session (inherited session id), and is not
|
|
46
|
+
blocked by it.
|
|
46
47
|
- Advisory input to Why, not a gate.
|
|
@@ -34,14 +34,6 @@ enforces it: without a held lock, mutating writes to this active intent's dir ar
|
|
|
34
34
|
1. **Ensure the intent is in INDEX `## Active`.** If it sits in `## Future`, activate it
|
|
35
35
|
(move it to `## Active`, auto-commit) before arming. Creation precedes activation, so a
|
|
36
36
|
brand-new What intent is activated here, then locked.
|
|
37
|
-
1a. **Dispatch What-stage discovery (before the lock).** Right after activation and before
|
|
38
|
-
arming the bridge, dispatch the `plastic-intent-discovery` agent (see the
|
|
39
|
-
`plastic-intent-discovery` skill). Resolve its model explicitly and pass it at dispatch
|
|
40
|
-
time (belt-and-braces): `read-config agents.models.plastic-intent-discovery --project
|
|
41
|
-
<repo>`. The agent runs QMD discovery over the intent's `chain`/`sources` and deposits
|
|
42
|
-
findings to `resources/discovery--<slug>.md` only; it never writes the intent file, so the
|
|
43
|
-
lock-owner-only rule is untouched. This is advisory context for Why, not a gate: if
|
|
44
|
-
discovery yields nothing, proceed to the lock normally.
|
|
45
37
|
2. **Self-heal the lock state first.** Run:
|
|
46
38
|
`ruby ~/.plastic/scripts/plastic-lock fix --intent-dir <STORE>/<dir>`
|
|
47
39
|
This is the one repair function (same one /plastic-lock exposes): it removes
|
|
@@ -61,6 +53,17 @@ enforces it: without a held lock, mutating writes to this active intent's dir ar
|
|
|
61
53
|
```
|
|
62
54
|
Replace `<ID>`, `<STORE>` (`~/.plastic/projects/<slug>/store` or `~/.plastic/store`),
|
|
63
55
|
`<dir>` (the `ID--slug` directory), and `<name>`.
|
|
56
|
+
4. **Dispatch What-stage discovery (under the lock).** Right after arming, when the intent
|
|
57
|
+
was just activated in step 1 (on a resume that already has
|
|
58
|
+
`resources/discovery--<slug>.md`, skip: discovery runs once per intent, at activation
|
|
59
|
+
only), dispatch the `plastic-intent-discovery` agent (see the `plastic-intent-discovery`
|
|
60
|
+
skill), now that this session owns the lock, deposit authorized as the owner session. Resolve its
|
|
61
|
+
model explicitly and pass it at dispatch time (belt-and-braces): `read-config
|
|
62
|
+
agents.models.plastic-intent-discovery --project <repo>`. The agent runs QMD discovery
|
|
63
|
+
over the intent's `chain`/`sources` and deposits findings to
|
|
64
|
+
`resources/discovery--<slug>.md` only; it never writes the intent file, so the
|
|
65
|
+
lock-owner-only rule is untouched. This is advisory context for Why, not a gate: if
|
|
66
|
+
discovery yields nothing, proceed to Why normally.
|
|
64
67
|
|
|
65
68
|
**Session id resolution (verbatim from `plastic-auto`).** The first argument is the session
|
|
66
69
|
id the bridge is keyed by: pass the hook stdin `session_id` when you have it, otherwise
|
|
@@ -243,9 +243,12 @@ from the bridge:
|
|
|
243
243
|
|
|
244
244
|
```bash
|
|
245
245
|
ruby -r ~/.plastic/scripts/lib/worktree -r ~/.plastic/scripts/lib/bridge -e \
|
|
246
|
-
'b = Bridge.
|
|
246
|
+
'b = Bridge.discover_bridge(session: ENV["CLAUDE_CODE_SESSION_ID"], cwd: Dir.pwd); Worktree.finish(b, merge: true) if b'
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
+
(Uses `discover_bridge`, not a bare session-keyed `Bridge.read`, because a session can own more
|
|
250
|
+
than one live bridge now — intent 131 — and `discover_bridge` resolves the right one for this cwd.)
|
|
251
|
+
|
|
249
252
|
`finish` is fail-open and idempotent: a conflicting merge is aborted and logged (the worktree
|
|
250
253
|
is still removed rather than stranded), and a second call with the block already cleared is a
|
|
251
254
|
no-op. Honor the worktree-cleanup rule: never leave an orphaned worktree, and run `git worktree
|
|
@@ -9,15 +9,21 @@ The installer tracks every file it writes in a manifest, so uninstall is exact a
|
|
|
9
9
|
leaves no orphans. Prefer running it through the CLI; this skill wraps the same
|
|
10
10
|
underlying uninstaller and adds reporting + verification.
|
|
11
11
|
|
|
12
|
+
## Channel rule
|
|
13
|
+
|
|
14
|
+
If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
|
|
15
|
+
`-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed,
|
|
16
|
+
default to `@beta`. The user can always override with `--alpha` / `--beta` / `--latest`.
|
|
17
|
+
|
|
12
18
|
## Procedure
|
|
13
19
|
|
|
14
20
|
### Step 1: Run the uninstaller
|
|
15
21
|
|
|
16
22
|
```bash
|
|
17
|
-
npx @zalom/plastic
|
|
23
|
+
npx -y @zalom/plastic@<channel> uninstall --claude
|
|
18
24
|
```
|
|
19
25
|
|
|
20
|
-
(Use `--codex` / `--hermes` / `--all` to target other agents. `bunx` works too.)
|
|
26
|
+
(Use `--codex` / `--hermes` / `--all` to target other agents. `bunx -y @zalom/plastic@<channel> uninstall --claude` works too.)
|
|
21
27
|
|
|
22
28
|
This removes, for the targeted agent:
|
|
23
29
|
- all `~/.claude/skills/plastic-*/` skills
|
|
@@ -29,8 +35,8 @@ This removes, for the targeted agent:
|
|
|
29
35
|
|
|
30
36
|
### Step 2: Report removed vs left
|
|
31
37
|
|
|
32
|
-
Relay the uninstaller's output to the user
|
|
33
|
-
**left in place
|
|
38
|
+
Relay the uninstaller's output to the user: what was **removed** and what was
|
|
39
|
+
**left in place**.
|
|
34
40
|
- **Left:** `~/.plastic/` (intent store, history, projects) and any non-Plastic
|
|
35
41
|
settings.json entries.
|
|
36
42
|
|
|
@@ -39,21 +45,33 @@ Relay the uninstaller's output to the user — what was **removed** and what was
|
|
|
39
45
|
Tell the user to confirm:
|
|
40
46
|
|
|
41
47
|
```bash
|
|
42
|
-
ls ~/.claude/skills | grep '^plastic-' #
|
|
43
|
-
ls ~/.claude/hooks | grep '^plastic-' #
|
|
44
|
-
grep -n plastic ~/.claude/settings.json #
|
|
48
|
+
ls ~/.claude/skills | grep '^plastic-' # -> no output
|
|
49
|
+
ls ~/.claude/hooks | grep '^plastic-' # -> no output
|
|
50
|
+
grep -n plastic ~/.claude/settings.json # -> no plastic hook/plugin refs
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Step 4: Report + offer the data decision
|
|
54
|
+
|
|
55
|
+
Emit the reporting block, using the Step 3 checks for the verification line:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Plastic uninstall (<channel>)
|
|
59
|
+
Command: npx -y @zalom/plastic@<channel> uninstall --claude <flags>
|
|
60
|
+
Version: removed
|
|
61
|
+
Verification: <Step 3 results, or "clean">
|
|
45
62
|
```
|
|
46
63
|
|
|
47
|
-
|
|
64
|
+
Then:
|
|
48
65
|
|
|
49
66
|
```
|
|
50
67
|
Plastic is uninstalled from [agent].
|
|
51
68
|
Your intent store at ~/.plastic/ is untouched.
|
|
52
69
|
|
|
53
70
|
Delete it too?
|
|
54
|
-
a) Keep everything (recommended)
|
|
55
|
-
b) Delete everything now
|
|
71
|
+
a) Keep everything (recommended): re-install anytime with npx
|
|
72
|
+
b) Delete everything now: removes ~/.plastic/ entirely (irreversible)
|
|
56
73
|
```
|
|
57
74
|
|
|
58
|
-
- **Keep:** "Your data is at ~/.plastic/. Re-install anytime with
|
|
75
|
+
- **Keep:** "Your data is at ~/.plastic/. Re-install anytime with
|
|
76
|
+
`npx -y @zalom/plastic@beta install --claude` (or your channel)."
|
|
59
77
|
- **Delete:** run `rm -rf ~/.plastic/` and confirm.
|
package/skills/update/SKILL.md
CHANGED
|
@@ -13,58 +13,69 @@ description: Use when updating Plastic. Runs the `update` verb, which reads the
|
|
|
13
13
|
## What it does
|
|
14
14
|
|
|
15
15
|
`update` is a single deterministic command. It reads `~/.plastic/VERSION`, derives the
|
|
16
|
-
channel from the version string (`-alpha`/`-beta`/none
|
|
16
|
+
channel from the version string (`-alpha`/`-beta`/none -> stable), queries `npm` dist-tags,
|
|
17
17
|
and advances to the **next version on the current channel**. "Already up to date" is a
|
|
18
|
-
clean no-op. You do not compute the target yourself
|
|
18
|
+
clean no-op. You do not compute the target yourself, the script does.
|
|
19
|
+
|
|
20
|
+
## Channel rule
|
|
21
|
+
|
|
22
|
+
If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
|
|
23
|
+
`-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed
|
|
24
|
+
(first install), default to `@beta`. The user can always override with
|
|
25
|
+
`--alpha` / `--beta` / `--latest`.
|
|
19
26
|
|
|
20
27
|
## Flags
|
|
21
28
|
|
|
22
29
|
| Flag | Behaviour |
|
|
23
30
|
|------|-----------|
|
|
24
31
|
| (none) | Advance to the next version on the **current** channel |
|
|
25
|
-
| `--latest` | Switch to / advance the **stable** channel (toward stability
|
|
32
|
+
| `--latest` | Switch to / advance the **stable** channel (toward stability, frictionless) |
|
|
26
33
|
| `--beta` | Switch to / advance the **beta** channel |
|
|
27
|
-
| `--alpha` | Switch to / advance the **alpha** channel (bleeding edge
|
|
34
|
+
| `--alpha` | Switch to / advance the **alpha** channel (bleeding edge, confirmed if moving down in stability) |
|
|
28
35
|
|
|
29
36
|
Switching toward a more stable channel is frictionless; switching toward bleeding edge is
|
|
30
37
|
confirmed. To roll **back** to a previously-installed version, use `plastic-versions`.
|
|
31
38
|
|
|
32
39
|
## Prerequisites
|
|
33
40
|
|
|
34
|
-
Plastic must be installed (`~/.plastic/VERSION` present). If not, run
|
|
35
|
-
`npx @zalom/plastic install --claude`
|
|
41
|
+
Plastic must be installed (`~/.plastic/VERSION` present). If not, run `plastic-install`
|
|
42
|
+
first (or `npx -y @zalom/plastic@beta install --claude` directly).
|
|
36
43
|
|
|
37
44
|
## Procedure
|
|
38
45
|
|
|
39
46
|
### Step 1: Run the update
|
|
40
47
|
|
|
41
48
|
```bash
|
|
42
|
-
npx @zalom/plastic update
|
|
43
|
-
#
|
|
49
|
+
npx -y @zalom/plastic@<channel> update --claude
|
|
50
|
+
# channel switch: append --beta / --latest / --alpha
|
|
51
|
+
# other agents: append --codex / --hermes / --all
|
|
44
52
|
```
|
|
45
53
|
|
|
46
|
-
|
|
47
|
-
The command prints the transition (`vX
|
|
48
|
-
move in the append-only
|
|
54
|
+
`bunx -y @zalom/plastic@<channel> update --claude` works as a fallback if `npx` is
|
|
55
|
+
unavailable. The command prints the transition (`vX -> vY`) or "already up to date", runs
|
|
56
|
+
a post-update doctor summary, and records the move in the append-only
|
|
57
|
+
`~/.plastic/versions.json` ledger.
|
|
49
58
|
|
|
50
|
-
### Step 2:
|
|
59
|
+
### Step 2: Relay the result, announce convention changes
|
|
51
60
|
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
Relay what `update` printed, do not recompute the version transition or the doctor
|
|
62
|
+
summary:
|
|
54
63
|
|
|
55
64
|
```
|
|
56
|
-
Plastic
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Recommendation: run /clear for a clean session with all new conventions loaded.
|
|
65
|
+
Plastic update (<channel>)
|
|
66
|
+
Command: npx -y @zalom/plastic@<channel> update --claude <flags>
|
|
67
|
+
Version: <before> -> <after>
|
|
68
|
+
Doctor: <relayed summary, or "all clear">
|
|
62
69
|
```
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
Then read `~/.plastic/PLASTIC.md` and announce convention changes that affect the
|
|
72
|
+
current session, and recommend `/clear` for a clean session with all new conventions
|
|
73
|
+
loaded.
|
|
74
|
+
|
|
75
|
+
### Step 3: Health check only on a relayed failure
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
If the relayed doctor summary shows a failure, invoke `plastic-doctor` for the full
|
|
78
|
+
report and offer to fix. If it already reads clean, do not re-run doctor.
|
|
68
79
|
|
|
69
80
|
### Step 4: Commit + clear update cache
|
|
70
81
|
|
package/skills/versions/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: plastic-versions
|
|
|
3
3
|
description: Use when the user wants to see their Plastic version history or roll back to a previously-installed version after a bad release. Manages the local, append-only versions.json ledger and steps between versions the user has actually run. For moving to a brand-new release, use plastic-update instead.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Plastic Versions
|
|
6
|
+
# Plastic Versions: local version time-machine
|
|
7
7
|
|
|
8
8
|
## When to Use
|
|
9
9
|
- "show plastic versions", "version history", "what versions have I run"
|
|
@@ -11,11 +11,18 @@ description: Use when the user wants to see their Plastic version history or rol
|
|
|
11
11
|
- A new version broke something and the user wants their last known-good build
|
|
12
12
|
|
|
13
13
|
For upgrading to a **new** release, use `plastic-update`. This skill only navigates
|
|
14
|
-
versions you have **already installed
|
|
14
|
+
versions you have **already installed**, the ones recorded in the ledger.
|
|
15
|
+
|
|
16
|
+
## Channel rule
|
|
17
|
+
|
|
18
|
+
`versions` restores whichever build you pick from the ledger, it does not take a channel
|
|
19
|
+
flag for the target. The pinned `<channel>` below is only the npx invocation itself:
|
|
20
|
+
derive it from `~/.plastic/VERSION` the same way as the other lifecycle skills,
|
|
21
|
+
`-alpha` -> `@alpha`, `-beta` -> `@beta`, otherwise `@latest`.
|
|
15
22
|
|
|
16
23
|
## The ledger
|
|
17
24
|
|
|
18
|
-
`~/.plastic/versions.json` is an **append-only JSONL** ledger
|
|
25
|
+
`~/.plastic/versions.json` is an **append-only JSONL** ledger, one line per version
|
|
19
26
|
change, never modified or deleted:
|
|
20
27
|
|
|
21
28
|
```json
|
|
@@ -23,15 +30,16 @@ change, never modified or deleted:
|
|
|
23
30
|
{"version":"1.0.0-alpha.18","action":"update","at":"..."}
|
|
24
31
|
```
|
|
25
32
|
|
|
26
|
-
`action`
|
|
27
|
-
channel is derived from the version string, never stored). It is a
|
|
33
|
+
`action` is one of `install`, `reinstall`, `update`, `downgrade` (derived from version
|
|
34
|
+
direction; the channel is derived from the version string, never stored). It is a
|
|
35
|
+
troubleshooting record.
|
|
28
36
|
|
|
29
37
|
## Procedure
|
|
30
38
|
|
|
31
39
|
### Show history
|
|
32
40
|
|
|
33
41
|
```bash
|
|
34
|
-
npx @zalom/plastic versions
|
|
42
|
+
npx -y @zalom/plastic@<channel> versions
|
|
35
43
|
```
|
|
36
44
|
|
|
37
45
|
Prints the table with the currently-installed version marked. If the most recent action was
|
|
@@ -40,8 +48,8 @@ a `downgrade`, it asks whether to keep rolling back.
|
|
|
40
48
|
### Roll back
|
|
41
49
|
|
|
42
50
|
```bash
|
|
43
|
-
npx @zalom/plastic versions --downgrade # one step back
|
|
44
|
-
npx @zalom/plastic versions --downgrade --version 1.0.0-alpha.15 # to a specific run
|
|
51
|
+
npx -y @zalom/plastic@<channel> versions --downgrade # one step back
|
|
52
|
+
npx -y @zalom/plastic@<channel> versions --downgrade --version 1.0.0-alpha.15 # to a specific run
|
|
45
53
|
```
|
|
46
54
|
|
|
47
55
|
Rollback targets are restricted to versions in the ledger (only builds you have actually
|
|
@@ -51,15 +59,22 @@ re-fetched from npm and re-synced; your intent store, config, and the ledger are
|
|
|
51
59
|
### Step forward (after a rollback)
|
|
52
60
|
|
|
53
61
|
```bash
|
|
54
|
-
npx @zalom/plastic versions --upgrade # one step forward in your history
|
|
62
|
+
npx -y @zalom/plastic@<channel> versions --upgrade # one step forward in your history
|
|
55
63
|
```
|
|
56
64
|
|
|
57
65
|
### After any change
|
|
58
66
|
|
|
59
|
-
Run `plastic-doctor` to confirm health,
|
|
60
|
-
swapped conventions
|
|
67
|
+
Run `plastic-doctor` to confirm health, then emit the reporting block and suggest
|
|
68
|
+
`/clear` so the session picks up the swapped conventions:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Plastic versions (<channel>)
|
|
72
|
+
Command: npx -y @zalom/plastic@<channel> versions <flags>
|
|
73
|
+
Version: <before> -> <after>
|
|
74
|
+
Doctor: <summary or "all clear">
|
|
75
|
+
```
|
|
61
76
|
|
|
62
77
|
## Notes
|
|
63
|
-
- The ledger is **never** edited or pruned
|
|
78
|
+
- The ledger is **never** edited or pruned, it is the audit trail.
|
|
64
79
|
- Downgrades cannot un-migrate a store-format change; if a warning appears, surface it to
|
|
65
80
|
the user rather than forcing the rollback.
|