@zalom/plastic 1.0.0-alpha.9 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PLASTIC.md +163 -469
- package/README.md +95 -58
- package/agents/plastic-brainstorming.md +37 -0
- package/agents/plastic-enforcer.md +36 -0
- package/agents/plastic-executor.md +37 -0
- package/agents/{future-intent-researcher.md → plastic-future-intent-researcher.md} +1 -1
- package/agents/{intent-curator.md → plastic-intent-curator.md} +1 -1
- package/agents/plastic-planner.md +37 -0
- package/agents/plastic-spec-specialist.md +37 -0
- package/bin/plastic.js +57 -0
- package/bin/test +28 -0
- package/deprecations.yml +1 -10
- package/hooks/auto-arm +5 -0
- package/hooks/bash-gate +3 -0
- package/hooks/check-update +12 -8
- package/hooks/code-gate +12 -0
- package/hooks/create-gate +3 -0
- package/hooks/gate-check +3 -1
- package/hooks/hooks.json +52 -0
- package/hooks/qmd-search +8 -0
- package/package.json +2 -2
- package/scripts/dashboard.rb +687 -0
- package/scripts/doctor.rb +1054 -628
- package/scripts/hook-auto-arm +51 -0
- package/scripts/hook-bash-gate +41 -0
- package/scripts/hook-code-gate +27 -0
- package/scripts/hook-continue +15 -114
- package/scripts/hook-create-gate +59 -0
- package/scripts/hook-gate-check +47 -32
- package/scripts/hook-qmd-search +44 -0
- package/scripts/hook-session-start +106 -38
- package/scripts/install.rb +91 -529
- package/scripts/lib/boot_banner.rb +28 -0
- package/scripts/lib/bridge.rb +404 -19
- package/scripts/lib/installer_core.rb +807 -0
- package/scripts/lib/intent_validator.rb +235 -0
- package/scripts/lib/qmd_hook.rb +44 -0
- package/scripts/lib/qmd_sync.rb +209 -0
- package/scripts/lib/store_provisioning.rb +100 -0
- package/scripts/migrate-to-global +1 -1
- package/scripts/new-intent +226 -0
- package/scripts/provision-project-store +53 -0
- package/scripts/qmd-sync +92 -0
- package/scripts/select-update-target +93 -0
- package/scripts/spawn-preamble +121 -0
- package/scripts/uninstall.rb +53 -0
- package/scripts/update.rb +164 -0
- package/scripts/validate-intent +54 -0
- package/scripts/versions.rb +141 -0
- package/skills/_active-intent-gate.md +1 -1
- package/skills/add-project-store/SKILL.md +54 -0
- package/skills/auto/SKILL.md +77 -7
- package/skills/auto/evals/evals.json +207 -0
- package/skills/auto/references/agent-architecture.md +135 -0
- package/skills/brainstorming/SKILL.md +9 -9
- package/skills/brainstorming-grill-me/SKILL.md +6 -6
- package/skills/continuing/SKILL.md +92 -82
- package/skills/continuing/evals/evals.json +136 -0
- package/skills/continuing/references/context-management.md +32 -0
- package/skills/creating-intent/SKILL.md +74 -36
- package/skills/creating-intent/evals/evals.json +56 -0
- package/skills/creating-intent/references/lifecycle.md +76 -0
- package/skills/creating-intent/references/wikilinks.md +8 -0
- package/skills/creating-project/SKILL.md +40 -8
- package/skills/creating-project/references/hubs-projects.md +55 -0
- package/skills/dashboard/SKILL.md +121 -0
- package/skills/dashboard/templates/dashboard-global.md +31 -0
- package/skills/dashboard/templates/dashboard-project.md +40 -0
- package/skills/doctor/SKILL.md +51 -4
- package/skills/doctor/references/gates-stuck-detection.md +38 -0
- package/skills/doctor/report.md +4 -0
- package/skills/evaluating-skills/SKILL.md +140 -0
- package/skills/evaluating-skills/assets/eval-template.json +12 -0
- package/skills/evaluating-skills/evals/evals.json +75 -0
- package/skills/evaluating-skills/references/convention-checks.md +76 -0
- package/skills/evaluating-skills/references/eval-methodology.md +154 -0
- package/skills/executing-plan/SKILL.md +5 -3
- package/skills/install/SKILL.md +69 -8
- package/skills/intent-curator/SKILL.md +3 -3
- package/skills/linking-intents/SKILL.md +16 -7
- package/skills/linking-intents/references/zettelkasten.md +38 -0
- package/skills/managing-index/SKILL.md +5 -1
- package/skills/managing-index/references/zettelkasten-linking.md +1 -1
- package/skills/releasing/SKILL.md +80 -23
- package/skills/releasing/references/deprecations.md +60 -0
- package/skills/research/SKILL.md +2 -2
- package/skills/savepoint/SKILL.md +46 -37
- package/skills/savepoint/references/context-management.md +32 -0
- package/skills/uninstall/SKILL.md +39 -28
- package/skills/update/SKILL.md +41 -44
- package/skills/versions/SKILL.md +65 -0
- package/skills/writing-instructions/SKILL.md +159 -0
- package/skills/writing-instructions/references/agentskills-spec.md +135 -0
- package/skills/writing-plans/SKILL.md +5 -5
- package/templates/agents.md +7 -7
- package/templates/outcome.md +13 -0
- package/templates/savepoint.md +14 -13
- package/templates/spec.md +25 -0
- package/bin/install.js +0 -29
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Deprecation Process
|
|
2
|
+
|
|
3
|
+
When removing a feature, changing a convention, or making a breaking change:
|
|
4
|
+
|
|
5
|
+
1. Add entry to `deprecations.yml` in the Plastic source root
|
|
6
|
+
2. Set severity: `info` (awareness), `warning` (action needed), `critical` (urgent)
|
|
7
|
+
3. Provide clear migration steps
|
|
8
|
+
4. Set `removal` version at least 2 minor versions ahead
|
|
9
|
+
5. SessionStart hook displays active deprecations automatically
|
|
10
|
+
6. Remove the feature AND the deprecation entry together
|
|
11
|
+
|
|
12
|
+
## Pre-1.0 removal policy
|
|
13
|
+
|
|
14
|
+
The numbered process above is the steady-state rule: a deprecation rides until its `removal`
|
|
15
|
+
version, which step 4 sets at least two minors ahead. While Plastic is still pre-1.0 (any
|
|
16
|
+
version below `1.0.0`), one exception applies:
|
|
17
|
+
|
|
18
|
+
- **Pre-1.0 exception.** Before `1.0.0`, a *satisfied* deprecation (the migration it
|
|
19
|
+
announced is complete on installed machines) may be removed immediately, rather than waiting
|
|
20
|
+
for its declared `removal` major. Delete the entry from `deprecations.yml` (leaving
|
|
21
|
+
`deprecations: []` if it was the last one) the moment the migration is done.
|
|
22
|
+
|
|
23
|
+
This exception only holds below `1.0.0`. From `1.0.0` onward, the steady-state grace rule
|
|
24
|
+
(step 4, removal at least two minors ahead) governs again, unchanged. The exception narrows
|
|
25
|
+
*when* a satisfied entry may be pulled early during the pre-release line; it does not loosen
|
|
26
|
+
the grace window for the released-product contract.
|
|
27
|
+
|
|
28
|
+
## Severity Levels
|
|
29
|
+
|
|
30
|
+
| Severity | When to use | Dismissable? |
|
|
31
|
+
|----------|-------------|--------------|
|
|
32
|
+
| `info` | Upcoming change | Yes |
|
|
33
|
+
| `warning` | Action needed | Yes (re-shown at removal) |
|
|
34
|
+
| `critical` | Urgent/security | Never |
|
|
35
|
+
|
|
36
|
+
## deprecations.yml Schema
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
deprecations:
|
|
40
|
+
- id: unique-slug
|
|
41
|
+
severity: info | warning | critical
|
|
42
|
+
summary: "One-line description"
|
|
43
|
+
migration_steps:
|
|
44
|
+
- "Step 1"
|
|
45
|
+
- "Step 2"
|
|
46
|
+
introduced: "0.9.0"
|
|
47
|
+
removal: "1.0.0"
|
|
48
|
+
link: "optional URL"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Dismissal
|
|
52
|
+
|
|
53
|
+
Users dismiss by adding the id to `deprecations_dismissed` in `config.yml`:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
deprecations_dismissed:
|
|
57
|
+
- some-deprecated-feature
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Critical deprecations and final-version warnings ignore dismissal.
|
package/skills/research/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
2
|
+
name: plastic-research
|
|
3
3
|
description: "Research a topic for the active intent. Agent decides shallow vs deep based on scope. Produces reports in the intent's resources/ directory."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ Investigate a topic related to the active intent. Choose the right depth, produc
|
|
|
14
14
|
Before proceeding, resolve the active intent:
|
|
15
15
|
|
|
16
16
|
1. **Detect store:** Read `~/.plastic/projects.yml`, match CWD against registered project paths. If match → project store at `~/.plastic/projects/{slug}/store/`. If no match → global store at `~/.plastic/store/`.
|
|
17
|
-
2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic
|
|
17
|
+
2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic-creating-intent"
|
|
18
18
|
3. **Resolve intent directory:** `{store}/store/{id}--{slug}/`
|
|
19
19
|
|
|
20
20
|
## Depth Decision
|
|
@@ -1,57 +1,66 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
3
|
-
description: Use when
|
|
2
|
+
name: plastic-savepoint
|
|
3
|
+
description: Use when verifying or repairing an intent's savepoint ledger, when the user says "save" or "savepoint", or when a PreCompact hook fires. The ledger is written automatically by the gate hook at each lifecycle boundary; this skill only reads, verifies, and rebuilds it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Savepoint
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- User says "save", "savepoint", or "save progress"
|
|
11
|
-
- Before ending a long session
|
|
12
|
-
- Before switching to a different intent
|
|
8
|
+
`savepoint.md` is a deterministic, append-only ledger of an intent's cycle steps, one line
|
|
9
|
+
per lifecycle milestone, newest at the bottom:
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
```
|
|
12
|
+
2026-06-16T14:02Z What 34--cycle-step-savepoints.md
|
|
13
|
+
2026-06-16T14:20Z Why spec.md created
|
|
14
|
+
2026-06-16T15:10Z How plan.md created
|
|
15
|
+
2026-06-16T15:11Z How checklist.md created
|
|
16
|
+
2026-06-16T16:40Z Exec outcome.md created
|
|
17
|
+
```
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
It is **sugar on top of the conventions**, not a source of truth. The gate hook
|
|
20
|
+
(`hook-gate-check`) writes each line automatically when a stage file is created, so there is
|
|
21
|
+
nothing to save by hand. State is always derivable from files-on-disk; the ledger just lets
|
|
22
|
+
a resuming agent read the cycle's succession from one glance (last line = where we are).
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
## When to Use
|
|
25
|
+
- A PreCompact hook fires, or the user says "save" / "savepoint": verify the ledger is current.
|
|
26
|
+
- Resuming an intent: read the ledger to learn the cycle's succession quickly.
|
|
27
|
+
- The ledger looks stale, empty, or missing: rebuild it from the filesystem.
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
29
|
+
## What this skill does NOT do
|
|
30
|
+
- It does not write prose, "in progress", "next step", or "blockers". The old 50%-context
|
|
31
|
+
prose savepoint is retired. The semantic trace lives in `## Insights` (append-only,
|
|
32
|
+
newest at the bottom); the byte history lives in git.
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
```markdown
|
|
28
|
-
# Savepoint
|
|
34
|
+
## Workflow
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
### 1. Find Active Intent(s)
|
|
37
|
+
Read the active store's `INDEX.md` and extract intents under `## Active`.
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
39
|
+
### 2. For Each Active Intent — verify the ledger
|
|
40
|
+
- Read `savepoint.md`. Confirm it exists and is non-empty.
|
|
41
|
+
- Confirm the **last line's stage** matches the stage derived from files-on-disk
|
|
42
|
+
(`Bridge.derive_stage`). If they disagree, or the file is missing/empty, the ledger has
|
|
43
|
+
drifted.
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
### 3. Rebuild on drift
|
|
46
|
+
Reconstruct from the filesystem rather than hand-editing:
|
|
39
47
|
|
|
40
|
-
|
|
41
|
-
-
|
|
48
|
+
```bash
|
|
49
|
+
ruby -r ~/.plastic/scripts/lib/bridge -e \
|
|
50
|
+
'Bridge.rebuild_savepoint("<intent_dir>")'
|
|
42
51
|
```
|
|
43
52
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### 3. Update INDEX.md
|
|
48
|
-
Verify the `## Active` section is accurate.
|
|
53
|
+
This rewrites `savepoint.md` from the milestone files present (timestamps from mtimes),
|
|
54
|
+
in stage order. Safe to run anytime: the ledger is derived.
|
|
49
55
|
|
|
50
|
-
### 4. Commit
|
|
56
|
+
### 4. Commit (store only)
|
|
57
|
+
If a rebuild changed the ledger, commit it in the store repo:
|
|
51
58
|
```bash
|
|
52
|
-
git add .
|
|
53
|
-
git commit -m "chore: savepoint — [active intent name]"
|
|
59
|
+
cd <store-root> && git add . && git commit -m "chore: rebuild savepoint ledger — [intent]"
|
|
54
60
|
```
|
|
61
|
+
Never push `~/.plastic/`.
|
|
62
|
+
|
|
63
|
+
## References
|
|
55
64
|
|
|
56
|
-
|
|
57
|
-
|
|
65
|
+
- Read `references/context-management.md` for the full save/continue protocol and how the
|
|
66
|
+
resume flow consumes the ledger.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Context Management (Start-Save-Continue)
|
|
2
|
+
|
|
3
|
+
## Save Point
|
|
4
|
+
Triggered by PreCompact hook or manually:
|
|
5
|
+
1. Find active intent(s) from `~/.plastic/INDEX.md`
|
|
6
|
+
2. Update active intent's `checklist.md` (check off completed items)
|
|
7
|
+
3. Update active intent's `savepoint.md` (in-progress, next steps, blockers, discoveries)
|
|
8
|
+
4. Add observations to `## Insights`
|
|
9
|
+
5. Update INDEX.md
|
|
10
|
+
6. Commit: `cd ~/.plastic && git add . && git commit -m "chore: savepoint — [intent name]"`
|
|
11
|
+
7. Notify user to `/clear`
|
|
12
|
+
|
|
13
|
+
## Continue
|
|
14
|
+
Triggered by UserPromptSubmit hook when user says "continue". Priority order:
|
|
15
|
+
|
|
16
|
+
**1. Active intents first (resume work):**
|
|
17
|
+
1. Read INDEX.md → find active intent(s)
|
|
18
|
+
2. Read active intent's `intent.md` → what and why
|
|
19
|
+
3. Read active intent's `savepoint.md` → where we left off
|
|
20
|
+
4. Read active intent's `checklist.md` → what's next
|
|
21
|
+
5. Announce: intent name, current state, next step, blockers
|
|
22
|
+
6. Resume
|
|
23
|
+
|
|
24
|
+
**2. No active intents → offer future intents:**
|
|
25
|
+
1. List all future intents from INDEX.md
|
|
26
|
+
2. Present them as options
|
|
27
|
+
3. When user picks one, move to Active in INDEX.md
|
|
28
|
+
|
|
29
|
+
**3. Stale future intents (untouched 3+ days) → triage:**
|
|
30
|
+
- **activate** — start working on it now
|
|
31
|
+
- **abandon** — mark as abandoned
|
|
32
|
+
- **defer to agent** — implement, research, or ideate
|
|
@@ -1,48 +1,59 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
3
|
-
description: Use when the user wants to remove Plastic
|
|
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. Optionally deletes the intent store.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Uninstall Plastic
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The installer tracks every file it writes in a manifest, so uninstall is exact and
|
|
9
|
+
leaves no orphans. Prefer running it through the CLI; this skill wraps the same
|
|
10
|
+
underlying uninstaller and adds reporting + verification.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
## Procedure
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
- `$CLAUDE_PLUGIN_ROOT` → Claude Code
|
|
14
|
-
- `$CURSOR_PLUGIN_ROOT` → Cursor
|
|
15
|
-
- Otherwise → unknown agent
|
|
14
|
+
### Step 1: Run the uninstaller
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npx @zalom/plastic@latest uninstall --claude
|
|
18
|
+
```
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
- Remove `"plastic"` from `extraKnownMarketplaces` in `~/.claude/settings.json`
|
|
21
|
-
- Remove `"plastic@plastic"` from `enabledPlugins` in `~/.claude/settings.json`
|
|
22
|
-
- Announce: "Plastic deregistered from Claude Code."
|
|
20
|
+
(Use `--codex` / `--hermes` / `--all` to target other agents. `bunx` works too.)
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
This removes, for the targeted agent:
|
|
23
|
+
- all `~/.claude/skills/plastic-*/` skills
|
|
24
|
+
- all `~/.claude/hooks/plastic-*` hooks (and restores any saved original statusline)
|
|
25
|
+
- the `~/.claude/plastic/` state dir + manifest
|
|
26
|
+
- any **legacy** plugin layout: `plugins/marketplaces/plastic`, `plugins/cache/plastic`,
|
|
27
|
+
the old nested `skills/plastic/`, and the `plastic@plastic` /
|
|
28
|
+
`extraKnownMarketplaces.plastic` / `known_marketplaces.json` registrations
|
|
25
29
|
|
|
26
|
-
### Step
|
|
30
|
+
### Step 2: Report removed vs left
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
Relay the uninstaller's output to the user — what was **removed** and what was
|
|
33
|
+
**left in place**:
|
|
34
|
+
- **Left:** `~/.plastic/` (intent store, history, projects) and any non-Plastic
|
|
35
|
+
settings.json entries.
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
Plastic is deregistered from [agent name].
|
|
37
|
+
### Step 3: Verify removal
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
Tell the user to confirm:
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
```bash
|
|
42
|
+
ls ~/.claude/skills | grep '^plastic-' # → no output
|
|
43
|
+
ls ~/.claude/hooks | grep '^plastic-' # → no output
|
|
44
|
+
grep -n plastic ~/.claude/settings.json # → no plastic hook/plugin refs
|
|
45
|
+
```
|
|
36
46
|
|
|
37
|
-
|
|
38
|
-
and any projects in ~/.plastic/projects/.
|
|
39
|
-
This is irreversible.
|
|
47
|
+
### Step 4: Offer the data decision
|
|
40
48
|
|
|
41
|
-
a) Keep everything (recommended) — you can re-install Plastic later
|
|
42
|
-
b) Delete everything now — removes ~/.plastic/ entirely
|
|
43
49
|
```
|
|
50
|
+
Plastic is uninstalled from [agent].
|
|
51
|
+
Your intent store at ~/.plastic/ is untouched.
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Delete it too?
|
|
54
|
+
a) Keep everything (recommended) — re-install anytime with npx
|
|
55
|
+
b) Delete everything now — removes ~/.plastic/ entirely (irreversible)
|
|
56
|
+
```
|
|
46
57
|
|
|
47
|
-
- **Keep:**
|
|
48
|
-
- **Delete:**
|
|
58
|
+
- **Keep:** "Your data is at ~/.plastic/. Re-install anytime with `npx @zalom/plastic@latest install --claude`."
|
|
59
|
+
- **Delete:** run `rm -rf ~/.plastic/` and confirm.
|
package/skills/update/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: update
|
|
3
|
-
description: Use when updating Plastic
|
|
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
4
|
---
|
|
5
5
|
|
|
6
6
|
# Update Plastic
|
|
@@ -8,70 +8,67 @@ description: Use when updating Plastic after a plugin update, or when the user s
|
|
|
8
8
|
## When to Use
|
|
9
9
|
- User says "update plastic", "sync plastic", or "upgrade plastic"
|
|
10
10
|
- Statusline shows "Plastic update available"
|
|
11
|
-
- After a version
|
|
11
|
+
- After a version-bump notification
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## What it does
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
`update` is a single deterministic command. It reads `~/.plastic/VERSION`, derives the
|
|
16
|
+
channel from the version string (`-alpha`/`-beta`/none → stable), queries `npm` dist-tags,
|
|
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 — the script does.
|
|
17
19
|
|
|
18
|
-
##
|
|
20
|
+
## Flags
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
| Flag | Behaviour |
|
|
23
|
+
|------|-----------|
|
|
24
|
+
| (none) | Advance to the next version on the **current** channel |
|
|
25
|
+
| `--latest` | Switch to / advance the **stable** channel (toward stability — frictionless) |
|
|
26
|
+
| `--beta` | Switch to / advance the **beta** channel |
|
|
27
|
+
| `--alpha` | Switch to / advance the **alpha** channel (bleeding edge — confirmed if moving down in stability) |
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
Switching toward a more stable channel is frictionless; switching toward bleeding edge is
|
|
30
|
+
confirmed. To roll **back** to a previously-installed version, use `plastic-versions`.
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
Plastic must be installed (`~/.plastic/VERSION` present). If not, run
|
|
35
|
+
`npx @zalom/plastic install --claude` first.
|
|
36
|
+
|
|
37
|
+
## Procedure
|
|
28
38
|
|
|
29
|
-
### Step
|
|
39
|
+
### Step 1: Run the update
|
|
30
40
|
|
|
31
41
|
```bash
|
|
32
|
-
npx @zalom/plastic
|
|
42
|
+
npx @zalom/plastic update # next version on the current channel
|
|
43
|
+
# or: npx @zalom/plastic update --beta / --latest / --alpha
|
|
33
44
|
```
|
|
34
45
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- Re-registers hooks and skills into Claude Code's ~/.claude/
|
|
39
|
-
- Preserves all user data (INDEX.md, config.yml, projects.yml, store/)
|
|
46
|
+
Append the agent flag(s) if not just Claude (`--codex`, `--hermes`, `--all`).
|
|
47
|
+
The command prints the transition (`vX → vY`) or "already up to date", and records the
|
|
48
|
+
move in the append-only `~/.plastic/versions.json` ledger.
|
|
40
49
|
|
|
41
|
-
### Step
|
|
50
|
+
### Step 2: Announce key changes
|
|
42
51
|
|
|
43
|
-
After
|
|
44
|
-
|
|
45
|
-
in-context understanding without needing /clear.
|
|
52
|
+
After it completes, read `~/.plastic/PLASTIC.md` and announce convention changes that
|
|
53
|
+
affect the current session:
|
|
46
54
|
|
|
47
|
-
Format:
|
|
48
55
|
```
|
|
49
|
-
Plastic updated to vX.Y.Z.
|
|
56
|
+
Plastic updated to vX.Y.Z (channel).
|
|
50
57
|
|
|
51
|
-
Key changes
|
|
52
|
-
- [
|
|
58
|
+
Key changes:
|
|
59
|
+
- [notable convention changes, if any]
|
|
53
60
|
|
|
54
61
|
Recommendation: run /clear for a clean session with all new conventions loaded.
|
|
55
62
|
```
|
|
56
63
|
|
|
57
|
-
### Step
|
|
58
|
-
|
|
59
|
-
Invoke `plastic:doctor` to verify the installation is healthy after the update.
|
|
60
|
-
|
|
61
|
-
If all checks pass, show: **"Health check: all clear."**
|
|
62
|
-
|
|
63
|
-
If issues are found, show the full doctor report and offer to fix any fixable items.
|
|
64
|
+
### Step 3: Health check
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
Invoke `plastic-doctor`. If all checks pass: **"Health check: all clear."** Otherwise show
|
|
67
|
+
the report and offer to fix.
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
cd ~/.plastic && git add PLASTIC.md scripts/ AGENTS.md VERSION 2>/dev/null && git commit -m "chore: update Plastic core files" --allow-empty
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Step 6: Clear update cache
|
|
69
|
+
### Step 4: Commit + clear update cache
|
|
72
70
|
|
|
73
71
|
```bash
|
|
72
|
+
cd ~/.plastic && git add PLASTIC.md scripts/ AGENTS.md VERSION versions.json 2>/dev/null && git commit -m "chore: update Plastic to $(cat ~/.plastic/VERSION)" --allow-empty
|
|
74
73
|
rm -f ~/.plastic/.cache/update-check.json
|
|
75
74
|
```
|
|
76
|
-
|
|
77
|
-
This removes the statusline warning since the update is now applied.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-versions
|
|
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
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plastic Versions — local version time-machine
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
- "show plastic versions", "version history", "what versions have I run"
|
|
10
|
+
- "roll back plastic", "downgrade", "go back to the version that worked", "revert plastic"
|
|
11
|
+
- A new version broke something and the user wants their last known-good build
|
|
12
|
+
|
|
13
|
+
For upgrading to a **new** release, use `plastic-update`. This skill only navigates
|
|
14
|
+
versions you have **already installed** — the ones recorded in the ledger.
|
|
15
|
+
|
|
16
|
+
## The ledger
|
|
17
|
+
|
|
18
|
+
`~/.plastic/versions.json` is an **append-only JSONL** ledger — one line per version
|
|
19
|
+
change, never modified or deleted:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{"version":"1.0.0-alpha.17","action":"install","at":"..."}
|
|
23
|
+
{"version":"1.0.0-alpha.18","action":"update","at":"..."}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`action` ∈ `install | reinstall | update | downgrade` (derived from version direction; the
|
|
27
|
+
channel is derived from the version string, never stored). It is a troubleshooting record.
|
|
28
|
+
|
|
29
|
+
## Procedure
|
|
30
|
+
|
|
31
|
+
### Show history
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx @zalom/plastic versions
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Prints the table with the currently-installed version marked. If the most recent action was
|
|
38
|
+
a `downgrade`, it asks whether to keep rolling back.
|
|
39
|
+
|
|
40
|
+
### Roll back
|
|
41
|
+
|
|
42
|
+
```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
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Rollback targets are restricted to versions in the ledger (only builds you have actually
|
|
48
|
+
run, so you only ever return to something known-good for you). The chosen version is
|
|
49
|
+
re-fetched from npm and re-synced; your intent store, config, and the ledger are untouched.
|
|
50
|
+
|
|
51
|
+
### Step forward (after a rollback)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @zalom/plastic versions --upgrade # one step forward in your history
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### After any change
|
|
58
|
+
|
|
59
|
+
Run `plastic-doctor` to confirm health, and suggest `/clear` so the session picks up the
|
|
60
|
+
swapped conventions.
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
- The ledger is **never** edited or pruned — it is the audit trail.
|
|
64
|
+
- Downgrades cannot un-migrate a store-format change; if a warning appears, surface it to
|
|
65
|
+
the user rather than forcing the rollback.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-writing-instructions
|
|
3
|
+
description: >
|
|
4
|
+
Write or restructure agent instructions, conventions files, and SKILL.md
|
|
5
|
+
content using progressive disclosure and the agentskills.io specification.
|
|
6
|
+
Use when creating PLASTIC.md, rewriting convention docs, authoring new
|
|
7
|
+
skills, restructuring large instruction files to fit context budgets,
|
|
8
|
+
or when instructions feel too long, too vague, or agents aren't following
|
|
9
|
+
them. Also use when the user says "progressive disclosure", "restructure
|
|
10
|
+
instructions", or "the instructions are too big".
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Writing Agent Instructions
|
|
14
|
+
|
|
15
|
+
Based on the [agentskills.io specification](https://agentskills.io).
|
|
16
|
+
|
|
17
|
+
## Progressive Disclosure Architecture
|
|
18
|
+
|
|
19
|
+
All agent instructions follow three loading stages. Design for this — it's the
|
|
20
|
+
architecture, not a nice-to-have.
|
|
21
|
+
|
|
22
|
+
| Stage | What loads | Budget | Design for |
|
|
23
|
+
|-------|-----------|--------|------------|
|
|
24
|
+
| **Discovery** | name + description | ~100 tokens | Trigger accuracy |
|
|
25
|
+
| **Activation** | Full instruction body | <5000 tokens / <500 lines | Core procedures |
|
|
26
|
+
| **Execution** | references/, scripts/, assets/ | As needed | Deep detail |
|
|
27
|
+
|
|
28
|
+
**The description carries the entire burden of triggering.** If agents aren't
|
|
29
|
+
activating your skill, the description is the problem.
|
|
30
|
+
|
|
31
|
+
## Procedure
|
|
32
|
+
|
|
33
|
+
### Step 1: Audit the content
|
|
34
|
+
|
|
35
|
+
Before writing or restructuring, classify every piece of content:
|
|
36
|
+
|
|
37
|
+
| Classification | Where it goes | Example |
|
|
38
|
+
|---------------|---------------|---------|
|
|
39
|
+
| **Trigger context** | description field | "Use when...", keywords |
|
|
40
|
+
| **Core procedure** | SKILL.md body | Step-by-step workflows |
|
|
41
|
+
| **Gotchas** | SKILL.md body (early) | Facts that defy assumptions |
|
|
42
|
+
| **Deep reference** | references/ | API details, full schemas |
|
|
43
|
+
| **Templates** | assets/ or inline | Output format examples |
|
|
44
|
+
| **Executable logic** | scripts/ | Validation, data processing |
|
|
45
|
+
|
|
46
|
+
Ask for each piece: "Would the agent get this wrong without this?"
|
|
47
|
+
If no — cut it. If unsure — test it.
|
|
48
|
+
|
|
49
|
+
### Step 2: Write the description
|
|
50
|
+
|
|
51
|
+
The description must convey WHEN to use, not just WHAT it does.
|
|
52
|
+
|
|
53
|
+
**Rules:**
|
|
54
|
+
- Imperative phrasing: "Use this skill when..." not "This skill does..."
|
|
55
|
+
- Focus on user intent, not implementation
|
|
56
|
+
- Err on the side of being pushy — list contexts explicitly
|
|
57
|
+
- Include cases where user doesn't name the domain directly
|
|
58
|
+
- Under 1024 characters (hard limit)
|
|
59
|
+
- Include specific trigger keywords
|
|
60
|
+
|
|
61
|
+
**Template:**
|
|
62
|
+
```yaml
|
|
63
|
+
description: >
|
|
64
|
+
[One sentence: what it does]. Use when [primary trigger context],
|
|
65
|
+
[secondary trigger], or when [indirect trigger where user doesn't
|
|
66
|
+
name the domain]. Also use when [edge case trigger].
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Step 3: Write the body
|
|
70
|
+
|
|
71
|
+
**Principles (in priority order):**
|
|
72
|
+
|
|
73
|
+
1. **Procedures over declarations** — Teach HOW to approach a class of problems,
|
|
74
|
+
not WHAT to produce for a specific instance
|
|
75
|
+
2. **Defaults, not menus** — Pick one approach, mention alternatives briefly.
|
|
76
|
+
"Use X. For Y cases, use Z instead." Never present options as equals.
|
|
77
|
+
3. **Calibrate control to fragility** — Prescriptive for fragile/sequential tasks,
|
|
78
|
+
flexible when multiple approaches are valid. Most skills have a mix.
|
|
79
|
+
4. **Reasoning over rigid directives** — "Do X because Y tends to cause Z" beats
|
|
80
|
+
"ALWAYS do X, NEVER do Y"
|
|
81
|
+
5. **Add what the agent lacks, omit what it knows** — No explaining HTTP, PDFs,
|
|
82
|
+
or what a migration is. Jump to what's non-obvious.
|
|
83
|
+
|
|
84
|
+
**Structure:**
|
|
85
|
+
```markdown
|
|
86
|
+
# Title
|
|
87
|
+
|
|
88
|
+
[1-2 sentence purpose statement]
|
|
89
|
+
|
|
90
|
+
## Gotchas
|
|
91
|
+
- [Highest-value content first — facts that defy assumptions]
|
|
92
|
+
- [Each gotcha is a concrete correction, not general advice]
|
|
93
|
+
|
|
94
|
+
## Procedure
|
|
95
|
+
### Step 1: ...
|
|
96
|
+
### Step 2: ...
|
|
97
|
+
|
|
98
|
+
## Patterns
|
|
99
|
+
[Only if the skill covers multiple approaches to similar problems]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Step 4: Extract to references/
|
|
103
|
+
|
|
104
|
+
Anything over 500 lines or 5000 tokens goes to `references/`. But tell the
|
|
105
|
+
agent WHEN to load each file — conditional references, not a generic "see
|
|
106
|
+
references/ for details."
|
|
107
|
+
|
|
108
|
+
**Good:** "Read `references/api-errors.md` if the API returns a non-200 status"
|
|
109
|
+
**Bad:** "See references/ for more information"
|
|
110
|
+
|
|
111
|
+
### Step 5: Validate
|
|
112
|
+
|
|
113
|
+
Run through this checklist:
|
|
114
|
+
|
|
115
|
+
- [ ] Description under 1024 chars
|
|
116
|
+
- [ ] Body under 500 lines / 5000 tokens
|
|
117
|
+
- [ ] Every instruction passes "would the agent get this wrong without it?"
|
|
118
|
+
- [ ] Gotchas are concrete corrections, not general advice
|
|
119
|
+
- [ ] Defaults chosen, not menus presented
|
|
120
|
+
- [ ] Control calibrated: prescriptive where fragile, flexible where tolerant
|
|
121
|
+
- [ ] References have conditional load triggers
|
|
122
|
+
- [ ] No explaining what the agent already knows
|
|
123
|
+
|
|
124
|
+
For structured evaluation beyond this checklist (paired evals, pass rate
|
|
125
|
+
tracking, regression testing), use `plastic-evaluating-skills`.
|
|
126
|
+
|
|
127
|
+
## Gotchas
|
|
128
|
+
|
|
129
|
+
- Hook `additionalContext` truncates at **10,000 characters**. If instructions
|
|
130
|
+
must load via hooks (not skills), they must fit this budget.
|
|
131
|
+
- `~/.claude/rules/*.md` files load fully with no truncation — use for
|
|
132
|
+
always-loaded conventions that don't fit in a skill.
|
|
133
|
+
- CLAUDE.md supports `@path/to/file` imports (max depth 4) — another way
|
|
134
|
+
to load large instruction sets without truncation.
|
|
135
|
+
- Agents only consult skills for tasks beyond what they can handle alone.
|
|
136
|
+
Simple one-step requests may not trigger even with a perfect description.
|
|
137
|
+
- Content from real domain expertise (runbooks, incident reports, code review)
|
|
138
|
+
dramatically outperforms LLM-generated instructions without project context.
|
|
139
|
+
- The most common cause of agents not following instructions: the instruction
|
|
140
|
+
was too vague, didn't apply to the current task, or presented too many
|
|
141
|
+
options without a clear default. Read execution traces to diagnose.
|
|
142
|
+
|
|
143
|
+
## For Convention Files (PLASTIC.md, CLAUDE.md)
|
|
144
|
+
|
|
145
|
+
Convention files aren't skills — they load differently. Apply progressive
|
|
146
|
+
disclosure by splitting:
|
|
147
|
+
|
|
148
|
+
| Layer | Mechanism | Budget | Content |
|
|
149
|
+
|-------|-----------|--------|---------|
|
|
150
|
+
| **Always-on** | `~/.claude/rules/` or hook | <10K chars | Core identity, gotchas, critical procedures |
|
|
151
|
+
| **On-demand** | Skills (SKILL.md) | <5K tokens each | Specific workflows activated by task |
|
|
152
|
+
| **Deep reference** | `references/` in skills | Unlimited | Full specs, schemas, examples |
|
|
153
|
+
|
|
154
|
+
**The always-on layer should answer: "What does this agent need to know about
|
|
155
|
+
every single task?"** Everything else activates on demand.
|
|
156
|
+
|
|
157
|
+
## References
|
|
158
|
+
|
|
159
|
+
- Read `references/agentskills-spec.md` for the complete agentskills.io specification including frontmatter fields, description optimization methodology, evaluation framework, and script design requirements
|