@zalom/plastic 1.0.0-beta.34 → 1.0.0-beta.36
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-reference.md +133 -0
- package/PLASTIC.md +29 -151
- package/agents/plastic-brainstorming.md +2 -6
- package/agents/plastic-enforcer.md +11 -6
- package/agents/plastic-executor.md +2 -6
- package/agents/plastic-future-intent-researcher.md +2 -7
- package/agents/plastic-intent-curator.md +2 -10
- package/agents/plastic-intent-discovery.md +8 -10
- package/agents/plastic-planner.md +2 -6
- package/agents/plastic-spec-specialist.md +2 -6
- package/bin/plastic.js +7 -3
- package/package.json +2 -1
- package/scripts/install.rb +42 -6
- package/scripts/lib/bridge.rb +84 -5
- package/scripts/lib/installer_core.rb +40 -6
- package/scripts/lib/power_tools.rb +18 -16
- package/scripts/lib/preflight.rb +79 -0
- package/skills/auto/SKILL.md +40 -38
- package/skills/auto/references/end-tail.md +56 -0
- package/skills/auto/references/human-report-contract.md +55 -0
- package/skills/brainstorming/SKILL.md +7 -34
- package/skills/brainstorming/references/design-principles.md +49 -0
- package/skills/creating-intent/SKILL.md +5 -26
- package/skills/creating-project/SKILL.md +11 -74
- package/skills/creating-project/references/project-scaffolding.md +97 -0
- package/skills/dashboard/SKILL.md +2 -17
- package/skills/dashboard/references/classification.md +22 -0
- 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 +14 -46
- package/skills/releasing/references/promotion-and-tagging.md +60 -0
- package/skills/uninstall/SKILL.md +29 -11
- package/skills/update/SKILL.md +34 -23
- package/skills/versions/SKILL.md +27 -12
- package/skills/writing-plans/SKILL.md +10 -88
- package/skills/writing-plans/references/plan-format.md +102 -0
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
|
|
@@ -85,14 +85,11 @@ git merge <branch-name> --no-ff -m "feat: merge intent [ID] - [description]"
|
|
|
85
85
|
|
|
86
86
|
Always `--no-ff` to preserve branch history in the merge commit.
|
|
87
87
|
|
|
88
|
-
**Worktree-isolated intents (intent 73c3).**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
worktree. If you already merged here by hand, step 9 is a clean no-op merge ("Already up to
|
|
94
|
-
date") and proceeds straight to removal. Do not delete the worktree before its branch is
|
|
95
|
-
merged, or the work is lost.
|
|
88
|
+
**Worktree-isolated intents (intent 73c3).** A worktree-delivered intent's code lives on
|
|
89
|
+
`plastic/{id}--{slug}`, merged together with cleanup in step 9, not on a hand-made feature
|
|
90
|
+
branch. Do not delete the worktree before its branch is merged, or the work is lost. For
|
|
91
|
+
the full rationale and the already-merged-by-hand no-op case, read
|
|
92
|
+
`references/promotion-and-tagging.md`.
|
|
96
93
|
|
|
97
94
|
### 4. Bump Version
|
|
98
95
|
|
|
@@ -231,12 +228,8 @@ A release IS a delivery. The active intent that drove this work must be complete
|
|
|
231
228
|
|
|
232
229
|
### 9. Clean Up the Intent's Worktrees (merge-then-remove)
|
|
233
230
|
|
|
234
|
-
A release is the merge-then-remove path for the intent's worktrees (intent 73c3)
|
|
235
|
-
|
|
236
|
-
(`plastic/{id}--{slug}`) is merged back into the repo's default branch BEFORE the worktree is
|
|
237
|
-
removed, so the integrated work is never lost. (The disarm path in `plastic-auto`, by contrast,
|
|
238
|
-
is a plain remove because no release is merging the branch.)
|
|
239
|
-
|
|
231
|
+
A release is the merge-then-remove path for the intent's worktrees (intent 73c3): the
|
|
232
|
+
intent's code branch is merged back into the default branch BEFORE the worktree is removed.
|
|
240
233
|
Drive it through `Worktree.finish` with `merge: true`, which merges the code branch, then
|
|
241
234
|
removes both worktrees (code + paired store), prunes both repos, and clears the worktree block
|
|
242
235
|
from the bridge:
|
|
@@ -249,10 +242,10 @@ ruby -r ~/.plastic/scripts/lib/worktree -r ~/.plastic/scripts/lib/bridge -e \
|
|
|
249
242
|
(Uses `discover_bridge`, not a bare session-keyed `Bridge.read`, because a session can own more
|
|
250
243
|
than one live bridge now — intent 131 — and `discover_bridge` resolves the right one for this cwd.)
|
|
251
244
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
245
|
+
Honor the worktree-cleanup rule: never leave an orphaned worktree, and run `git worktree
|
|
246
|
+
prune` in the affected repo if you hit a stale reference. For why this is the one place the
|
|
247
|
+
merge-vs-remove policy lands on merge, and the fail-open/idempotent guarantees of `finish`,
|
|
248
|
+
read `references/promotion-and-tagging.md`.
|
|
256
249
|
|
|
257
250
|
## Conventions
|
|
258
251
|
|
|
@@ -266,34 +259,9 @@ prune` in the affected repo if you hit a stale reference.
|
|
|
266
259
|
- **Verify sync** - after pushing, confirm npm dist-tag, GitHub "Latest", and the git tag all show the new version
|
|
267
260
|
- **Branch cleanup** - delete merged feature branches: `git branch -d <branch>`
|
|
268
261
|
|
|
269
|
-
## Promotion
|
|
270
|
-
|
|
271
|
-
To promote a release across channels, use `--promote`:
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
plastic-releasing --promote beta # promotes current alpha → beta
|
|
275
|
-
plastic-releasing --promote stable # promotes current beta → stable
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**Promotion rules:**
|
|
279
|
-
- Linear only: alpha → beta → stable. Cannot skip channels.
|
|
280
|
-
- `--promote beta`: reads version from `package.json`, changes `-alpha.N` suffix
|
|
281
|
-
to `-beta.1`, publishes with `--tag beta`.
|
|
282
|
-
- `--promote stable`: reads version from `package.json`, strips pre-release suffix
|
|
283
|
-
entirely (e.g., `1.0.0-beta.3` → `1.0.0`), publishes to `latest`.
|
|
284
|
-
- Version files are bumped and committed as in a normal release.
|
|
285
|
-
- An annotated tag is created for the promoted version.
|
|
286
|
-
|
|
287
|
-
## Retroactive Tagging
|
|
288
|
-
|
|
289
|
-
For repos without prior tags, tag historical releases:
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
git tag -a v0.1.0 <commit-sha> -m "v0.1.0 - [description]"
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
Use `git log --oneline` to find the right commits (look for version bump commits or major feature merges).
|
|
296
|
-
|
|
297
262
|
## References
|
|
298
263
|
|
|
264
|
+
- When promoting a pre-release across channels (`--promote beta`/`--promote stable`) or
|
|
265
|
+
tagging a historical release retroactively, read `references/promotion-and-tagging.md`
|
|
266
|
+
for the exact commands and rules first
|
|
299
267
|
- Read `references/deprecations.md` for the full deprecation process, severity levels, deprecations.yml schema, and dismissal rules when adding or managing deprecations
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Promotion, Retroactive Tagging, and Worktree Merge Rationale
|
|
2
|
+
|
|
3
|
+
Occasional variant paths off the main release workflow: promoting a pre-release
|
|
4
|
+
across channels, tagging historical releases retroactively, and the deep rationale
|
|
5
|
+
for why the intent's worktree is merged before removal.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Worktree merge-then-remove rationale](#worktree-merge-then-remove-rationale)
|
|
10
|
+
- [Promotion](#promotion)
|
|
11
|
+
- [Retroactive Tagging](#retroactive-tagging)
|
|
12
|
+
|
|
13
|
+
## Worktree merge-then-remove rationale
|
|
14
|
+
|
|
15
|
+
**Worktree-isolated intents (intent 73c3).** When the intent was delivered in a Plastic
|
|
16
|
+
worktree (the bridge has a provisioned `worktree` block), its code lives on the branch
|
|
17
|
+
`plastic/{id}--{slug}` inside `<repo>/.claude/worktrees/{id}--{slug}`, not on a hand-made
|
|
18
|
+
feature branch. The merge-then-remove of that worktree is handled together with cleanup in
|
|
19
|
+
Workflow step 9, which merges `plastic/{id}--{slug}` into the default branch BEFORE removing the
|
|
20
|
+
worktree. If you already merged here by hand, step 9 is a clean no-op merge ("Already up to
|
|
21
|
+
date") and proceeds straight to removal. Do not delete the worktree before its branch is
|
|
22
|
+
merged, or the work is lost.
|
|
23
|
+
|
|
24
|
+
A release is the merge-then-remove path for the intent's worktrees. This is the one place
|
|
25
|
+
the merge-vs-remove policy lands on "merge": the intent's code branch (`plastic/{id}--{slug}`)
|
|
26
|
+
is merged back into the repo's default branch BEFORE the worktree is removed, so the
|
|
27
|
+
integrated work is never lost. (The disarm path in `plastic-auto`, by contrast, is a plain
|
|
28
|
+
remove because no release is merging the branch.)
|
|
29
|
+
|
|
30
|
+
`Worktree.finish` is fail-open and idempotent: a conflicting merge is aborted and logged (the
|
|
31
|
+
worktree is still removed rather than stranded), and a second call with the block already
|
|
32
|
+
cleared is a no-op.
|
|
33
|
+
|
|
34
|
+
## Promotion
|
|
35
|
+
|
|
36
|
+
To promote a release across channels, use `--promote`:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
plastic-releasing --promote beta # promotes current alpha → beta
|
|
40
|
+
plastic-releasing --promote stable # promotes current beta → stable
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Promotion rules:**
|
|
44
|
+
- Linear only: alpha → beta → stable. Cannot skip channels.
|
|
45
|
+
- `--promote beta`: reads version from `package.json`, changes `-alpha.N` suffix
|
|
46
|
+
to `-beta.1`, publishes with `--tag beta`.
|
|
47
|
+
- `--promote stable`: reads version from `package.json`, strips pre-release suffix
|
|
48
|
+
entirely (e.g., `1.0.0-beta.3` → `1.0.0`), publishes to `latest`.
|
|
49
|
+
- Version files are bumped and committed as in a normal release.
|
|
50
|
+
- An annotated tag is created for the promoted version.
|
|
51
|
+
|
|
52
|
+
## Retroactive Tagging
|
|
53
|
+
|
|
54
|
+
For repos without prior tags, tag historical releases:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git tag -a v0.1.0 <commit-sha> -m "v0.1.0 - [description]"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use `git log --oneline` to find the right commits (look for version bump commits or major feature merges).
|
|
@@ -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
|
|