@zalom/plastic 1.0.0-alpha.2 → 1.0.0-alpha.21
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 +128 -473
- package/README.md +90 -58
- package/agents/future-intent-researcher.md +1 -1
- package/agents/intent-curator.md +1 -1
- package/bin/plastic.js +57 -0
- package/bin/test +28 -0
- package/deprecations.yml +7 -6
- package/hooks/auto-arm +5 -0
- package/hooks/bash-gate +3 -0
- package/hooks/check-update +12 -8
- package/hooks/code-gate +10 -0
- package/hooks/hooks.json +25 -4
- package/hooks/statusline +50 -10
- package/package.json +2 -2
- package/scripts/dashboard.rb +480 -0
- package/scripts/doctor.rb +973 -0
- package/scripts/hook-auto-arm +52 -0
- package/scripts/hook-bash-gate +53 -0
- package/scripts/hook-code-gate +39 -0
- package/scripts/hook-continue +15 -114
- package/scripts/hook-gate-check +19 -4
- package/scripts/hook-session-start +76 -31
- package/scripts/install.rb +91 -480
- package/scripts/lib/bridge.rb +255 -0
- package/scripts/lib/installer_core.rb +760 -0
- package/scripts/migrate-to-global +1 -1
- package/scripts/select-update-target +93 -0
- package/scripts/uninstall.rb +53 -0
- package/scripts/update.rb +142 -0
- package/scripts/versions.rb +141 -0
- package/skills/_active-intent-gate.md +26 -0
- package/skills/auto/SKILL.md +62 -9
- package/skills/auto/evals/evals.json +92 -0
- package/skills/auto/references/agent-architecture.md +60 -0
- package/skills/brainstorming/SKILL.md +143 -0
- package/skills/brainstorming-grill-me/SKILL.md +5 -5
- package/skills/continuing/SKILL.md +102 -77
- package/skills/continuing/evals/evals.json +136 -0
- package/skills/continuing/references/context-management.md +32 -0
- package/skills/creating-intent/SKILL.md +16 -1
- package/skills/creating-intent/references/lifecycle.md +74 -0
- package/skills/creating-intent/references/wikilinks.md +8 -0
- package/skills/creating-project/SKILL.md +8 -4
- package/skills/creating-project/references/hubs-projects.md +55 -0
- package/skills/dashboard/SKILL.md +92 -0
- package/skills/doctor/SKILL.md +116 -0
- package/skills/doctor/references/gates-stuck-detection.md +38 -0
- package/skills/doctor/report.md +96 -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 +3 -3
- package/skills/install/SKILL.md +56 -8
- package/skills/intent-curator/SKILL.md +3 -3
- package/skills/linking-intents/SKILL.md +5 -1
- package/skills/linking-intents/references/zettelkasten.md +33 -0
- package/skills/managing-index/SKILL.md +5 -1
- package/skills/releasing/SKILL.md +119 -18
- package/skills/releasing/references/deprecations.md +44 -0
- package/skills/research/SKILL.md +114 -0
- 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 -36
- 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 +183 -0
- package/templates/agents.md +16 -0
- package/templates/outcome.md +13 -0
- package/templates/project.yml +5 -0
- package/templates/savepoint.md +14 -13
- package/templates/spec.md +25 -0
- package/bin/install.js +0 -29
|
@@ -1,30 +1,67 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
2
|
+
name: plastic-releasing
|
|
3
3
|
description: Use when merging a feature branch to main and tagging a release, bumping the version, or when the user says "release", "tag", or "ship it"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Releasing
|
|
7
7
|
|
|
8
8
|
Merge, bump, tag, push. Annotated tags with changelogs. Semantic versioning.
|
|
9
|
+
Project configuration drives the workflow — no hardcoded assumptions.
|
|
9
10
|
|
|
10
11
|
## Checklist
|
|
11
12
|
|
|
12
|
-
- [ ]
|
|
13
|
+
- [ ] Read project config
|
|
14
|
+
- [ ] All tests pass (or verification skipped per config)
|
|
13
15
|
- [ ] Merge feature branch to main
|
|
14
|
-
- [ ] Bump version in
|
|
16
|
+
- [ ] Bump version in configured version files
|
|
15
17
|
- [ ] Commit version bump
|
|
16
18
|
- [ ] Create annotated tag
|
|
17
19
|
- [ ] Push to remote with tags
|
|
20
|
+
- [ ] Run post-push actions (GitHub release, npm publish, etc.)
|
|
21
|
+
- [ ] Complete active intent
|
|
18
22
|
|
|
19
23
|
## Workflow
|
|
20
24
|
|
|
25
|
+
### 0. Read Project Config
|
|
26
|
+
|
|
27
|
+
Before anything else, determine which project we are releasing and load its config.
|
|
28
|
+
|
|
29
|
+
1. Read `~/.plastic/projects.yml` — find the project whose `path` matches the current working directory.
|
|
30
|
+
2. Extract the project slug (the key under `projects:`).
|
|
31
|
+
3. Read `~/.plastic/projects/{slug}/project.yml` — this contains the `release:` section.
|
|
32
|
+
|
|
33
|
+
Expected `release:` keys in project.yml:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
release:
|
|
37
|
+
verify: "bin/rails test" # command to run before release
|
|
38
|
+
version_file: package.json # single file containing the version
|
|
39
|
+
version_files: # multiple files (overrides version_file)
|
|
40
|
+
- package.json
|
|
41
|
+
- .claude-plugin/plugin.json
|
|
42
|
+
tag_format: "v{{version}}" # tag naming pattern ({{version}} is replaced)
|
|
43
|
+
on_green: # actions to run after push succeeds
|
|
44
|
+
- github_release
|
|
45
|
+
- npm_publish
|
|
46
|
+
on_complete: commit_and_push # what to do with the version bump commit
|
|
47
|
+
on_red: stop # what to do if verification fails
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Fallback:** If no project.yml exists or it has no `release:` section, fall back to asking the user for each step — verify command, version files, tag format, and post-push actions.
|
|
51
|
+
|
|
21
52
|
### 1. Verify Tests Pass
|
|
22
53
|
|
|
54
|
+
Run the verification command from `release.verify` in project.yml:
|
|
55
|
+
|
|
23
56
|
```bash
|
|
24
|
-
|
|
57
|
+
# Example: release.verify = "ruby -Itest test/*_test.rb"
|
|
58
|
+
<verify-command-from-config>
|
|
25
59
|
```
|
|
26
60
|
|
|
27
|
-
|
|
61
|
+
- If `release.verify` is present: run it. All checks must pass before proceeding.
|
|
62
|
+
- If `release.verify` is absent or empty: skip verification. Log that no verify command is configured.
|
|
63
|
+
- If `release.on_red` is `stop`: abort the release on failure.
|
|
64
|
+
- If `release.on_red` is `fix_and_retry`: ask the user to fix and re-run.
|
|
28
65
|
|
|
29
66
|
### 2. Determine Version Bump
|
|
30
67
|
|
|
@@ -47,18 +84,26 @@ Always `--no-ff` to preserve branch history in the merge commit.
|
|
|
47
84
|
|
|
48
85
|
### 4. Bump Version
|
|
49
86
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
87
|
+
Determine which files to update from project.yml:
|
|
88
|
+
|
|
89
|
+
- If `release.version_files` is set: update ALL listed files (they must stay in sync).
|
|
90
|
+
- Else if `release.version_file` is set: update that single file.
|
|
91
|
+
- Else: ask the user which files contain the version.
|
|
92
|
+
|
|
93
|
+
Update the version string in each file, then commit:
|
|
54
94
|
|
|
55
95
|
```bash
|
|
56
|
-
git add
|
|
96
|
+
git add <version-files>
|
|
57
97
|
git commit -m "chore: bump version to X.Y.Z — [one-line summary]"
|
|
58
98
|
```
|
|
59
99
|
|
|
60
100
|
### 5. Create Annotated Tag
|
|
61
101
|
|
|
102
|
+
Read `release.tag_format` from project.yml to determine the tag name:
|
|
103
|
+
|
|
104
|
+
- If set (e.g. `"v{{version}}"`): replace `{{version}}` with the new version string.
|
|
105
|
+
- If not set: default to `vX.Y.Z`.
|
|
106
|
+
|
|
62
107
|
Generate the changelog from commits since the last tag:
|
|
63
108
|
|
|
64
109
|
```bash
|
|
@@ -68,7 +113,7 @@ git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-merges | grep -E
|
|
|
68
113
|
Create the tag with a multi-line message:
|
|
69
114
|
|
|
70
115
|
```bash
|
|
71
|
-
git tag -a
|
|
116
|
+
git tag -a <tag-name> -m "<tag-name> — [release name]
|
|
72
117
|
|
|
73
118
|
- [changelog bullet points from feat/fix/refactor commits]"
|
|
74
119
|
```
|
|
@@ -79,16 +124,50 @@ git tag -a vX.Y.Z -m "vX.Y.Z — [release name]
|
|
|
79
124
|
git push origin main --tags
|
|
80
125
|
```
|
|
81
126
|
|
|
82
|
-
### 7.
|
|
127
|
+
### 7. Post-Push Actions
|
|
83
128
|
|
|
84
|
-
|
|
129
|
+
Read `release.on_green` from project.yml. This is a list of actions to run after a successful push. Execute each in order:
|
|
130
|
+
|
|
131
|
+
#### `github_release`
|
|
132
|
+
|
|
133
|
+
Create a GitHub release from the tag:
|
|
85
134
|
|
|
86
135
|
```bash
|
|
87
|
-
gh release create
|
|
136
|
+
gh release create <tag-name> --title "<tag-name> — [release name]" --generate-notes --notes-start-tag <previous-tag>
|
|
88
137
|
```
|
|
89
138
|
|
|
90
139
|
For the first release (no previous tag), write notes manually with `--notes "..."` instead.
|
|
91
140
|
|
|
141
|
+
#### `npm_publish`
|
|
142
|
+
|
|
143
|
+
Publish the package to npm with the appropriate dist-tag:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Alpha pre-release (version contains -alpha):
|
|
147
|
+
npm publish --access public --tag alpha
|
|
148
|
+
|
|
149
|
+
# Beta pre-release (version contains -beta):
|
|
150
|
+
npm publish --access public --tag beta
|
|
151
|
+
|
|
152
|
+
# Stable release (no pre-release suffix, >= 1.0.0):
|
|
153
|
+
npm publish --access public
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The dist-tag is derived from the version string in `package.json`:
|
|
157
|
+
- Contains `-alpha` → `--tag alpha`
|
|
158
|
+
- Contains `-beta` → `--tag beta`
|
|
159
|
+
- No pre-release suffix → no `--tag` flag (publishes to `latest`)
|
|
160
|
+
|
|
161
|
+
#### Other values
|
|
162
|
+
|
|
163
|
+
If `on_green` contains an action not listed above, log it:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
[releasing] Action "<action>" is configured but not yet implemented. Skipping.
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
If `on_green` is empty or absent: skip post-push actions entirely.
|
|
170
|
+
|
|
92
171
|
### 8. Complete Active Intent
|
|
93
172
|
|
|
94
173
|
A release IS a delivery. The active intent that drove this work must be completed as part of the release process. This is NOT optional.
|
|
@@ -100,19 +179,37 @@ A release IS a delivery. The active intent that drove this work must be complete
|
|
|
100
179
|
c. Update `## Insights` with final observations
|
|
101
180
|
d. Move from `## Active` to `## Completed` in INDEX.md (with today's date)
|
|
102
181
|
e. Update clusters to show `_(completed)_`
|
|
103
|
-
3. Auto-commit: `cd ~/.plastic && git add . && git commit -m "feat: complete intent <ID> — delivered in
|
|
182
|
+
3. Auto-commit: `cd ~/.plastic && git add . && git commit -m "feat: complete intent <ID> — delivered in <tag-name>"`
|
|
104
183
|
|
|
105
184
|
**If no active intent exists for this release**, that itself is a problem — work happened outside the intent system. Log it and move on, but flag it.
|
|
106
185
|
|
|
107
186
|
## Conventions
|
|
108
187
|
|
|
109
188
|
- **Annotated tags only** — `git tag -a`, never lightweight tags
|
|
110
|
-
- **Tag format** — `vX.Y.Z`
|
|
111
|
-
- **Tag message** — first line:
|
|
189
|
+
- **Tag format** — driven by `release.tag_format` in project.yml (default: `vX.Y.Z`)
|
|
190
|
+
- **Tag message** — first line: `<tag> — [short name]`, then blank line, then bullet changelog
|
|
112
191
|
- **Commit prefixes** — `feat:`, `fix:`, `refactor:`, `chore:`, `docs:` (conventional commits)
|
|
113
|
-
- **Version files** —
|
|
192
|
+
- **Version files** — driven by project.yml; all listed files must always match
|
|
114
193
|
- **Branch cleanup** — delete merged feature branches: `git branch -d <branch>`
|
|
115
194
|
|
|
195
|
+
## Promotion
|
|
196
|
+
|
|
197
|
+
To promote a release across channels, use `--promote`:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
plastic-releasing --promote beta # promotes current alpha → beta
|
|
201
|
+
plastic-releasing --promote stable # promotes current beta → stable
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Promotion rules:**
|
|
205
|
+
- Linear only: alpha → beta → stable. Cannot skip channels.
|
|
206
|
+
- `--promote beta`: reads version from `package.json`, changes `-alpha.N` suffix
|
|
207
|
+
to `-beta.1`, publishes with `--tag beta`.
|
|
208
|
+
- `--promote stable`: reads version from `package.json`, strips pre-release suffix
|
|
209
|
+
entirely (e.g., `1.0.0-beta.3` → `1.0.0`), publishes to `latest`.
|
|
210
|
+
- Version files are bumped and committed as in a normal release.
|
|
211
|
+
- An annotated tag is created for the promoted version.
|
|
212
|
+
|
|
116
213
|
## Retroactive Tagging
|
|
117
214
|
|
|
118
215
|
For repos without prior tags, tag historical releases:
|
|
@@ -122,3 +219,7 @@ git tag -a v0.1.0 <commit-sha> -m "v0.1.0 — [description]"
|
|
|
122
219
|
```
|
|
123
220
|
|
|
124
221
|
Use `git log --oneline` to find the right commits (look for version bump commits or major feature merges).
|
|
222
|
+
|
|
223
|
+
## References
|
|
224
|
+
|
|
225
|
+
- 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,44 @@
|
|
|
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
|
+
## Severity Levels
|
|
13
|
+
|
|
14
|
+
| Severity | When to use | Dismissable? |
|
|
15
|
+
|----------|-------------|--------------|
|
|
16
|
+
| `info` | Upcoming change | Yes |
|
|
17
|
+
| `warning` | Action needed | Yes (re-shown at removal) |
|
|
18
|
+
| `critical` | Urgent/security | Never |
|
|
19
|
+
|
|
20
|
+
## deprecations.yml Schema
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
deprecations:
|
|
24
|
+
- id: unique-slug
|
|
25
|
+
severity: info | warning | critical
|
|
26
|
+
summary: "One-line description"
|
|
27
|
+
migration_steps:
|
|
28
|
+
- "Step 1"
|
|
29
|
+
- "Step 2"
|
|
30
|
+
introduced: "0.9.0"
|
|
31
|
+
removal: "1.0.0"
|
|
32
|
+
link: "optional URL"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Dismissal
|
|
36
|
+
|
|
37
|
+
Users dismiss by adding the id to `deprecations_dismissed` in `config.yml`:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
deprecations_dismissed:
|
|
41
|
+
- some-deprecated-feature
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Critical deprecations and final-version warnings ignore dismissal.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-research
|
|
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
|
+
---
|
|
5
|
+
|
|
6
|
+
# Research
|
|
7
|
+
|
|
8
|
+
Investigate a topic related to the active intent. Choose the right depth, produce a cited report.
|
|
9
|
+
|
|
10
|
+
**Announce at start:** "I'm researching [topic] for intent {id} — {name}."
|
|
11
|
+
|
|
12
|
+
## Active Intent Gate
|
|
13
|
+
|
|
14
|
+
Before proceeding, resolve the active intent:
|
|
15
|
+
|
|
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-creating-intent"
|
|
18
|
+
3. **Resolve intent directory:** `{store}/store/{id}--{slug}/`
|
|
19
|
+
|
|
20
|
+
## Depth Decision
|
|
21
|
+
|
|
22
|
+
Before starting research, assess the question against these criteria:
|
|
23
|
+
|
|
24
|
+
### Shallow Research
|
|
25
|
+
Use when:
|
|
26
|
+
- The question is narrow and factual (e.g., "what's the API for X?", "does library Y support Z?")
|
|
27
|
+
- A single source or quick search is sufficient
|
|
28
|
+
- The answer is likely well-documented
|
|
29
|
+
- Time budget: minutes, not hours
|
|
30
|
+
|
|
31
|
+
**Method:** Direct web search + codebase exploration + single-pass synthesis.
|
|
32
|
+
|
|
33
|
+
### Deep Research
|
|
34
|
+
Use when:
|
|
35
|
+
- The question needs multiple sources and cross-verification
|
|
36
|
+
- It's a landscape survey, competitive analysis, or architectural decision
|
|
37
|
+
- The user explicitly asks for thorough/exhaustive/comprehensive research
|
|
38
|
+
- Conflicting information exists and needs adversarial verification
|
|
39
|
+
- Time budget: significant, user expects depth
|
|
40
|
+
|
|
41
|
+
**Method:** Delegate to the native agent's deep research capability.
|
|
42
|
+
- On Claude Code: invoke the `deep-research` skill via `Skill` tool
|
|
43
|
+
- On other agents: use the agent's equivalent (see intent 7 for cross-agent mapping)
|
|
44
|
+
- If no native deep research exists: fan out multiple web searches manually, cross-reference, synthesize
|
|
45
|
+
|
|
46
|
+
### Decision Heuristic
|
|
47
|
+
|
|
48
|
+
Ask yourself:
|
|
49
|
+
1. Can I answer this with 1-2 searches? → **Shallow**
|
|
50
|
+
2. Do I need to compare 3+ sources? → **Deep**
|
|
51
|
+
3. Is the user asking for a survey or landscape view? → **Deep**
|
|
52
|
+
4. Am I fact-checking a specific claim? → **Shallow**
|
|
53
|
+
5. Could wrong information here cause architectural mistakes? → **Deep**
|
|
54
|
+
|
|
55
|
+
Announce your choice: "This needs [shallow/deep] research because [reason]."
|
|
56
|
+
|
|
57
|
+
## Output
|
|
58
|
+
|
|
59
|
+
### File Location
|
|
60
|
+
`{intent_dir}/resources/{type}--{topic}.md`
|
|
61
|
+
|
|
62
|
+
Create the resources/ directory if it doesn't exist.
|
|
63
|
+
|
|
64
|
+
### Naming Convention
|
|
65
|
+
- `{type}` — one of: `deep-research`, `competitive-analysis`, `technical-spike`, `reference`, `landscape-survey`
|
|
66
|
+
- `{topic}` — kebab-case description of the research subject
|
|
67
|
+
|
|
68
|
+
Examples:
|
|
69
|
+
- `deep-research--installer-patterns.md`
|
|
70
|
+
- `technical-spike--sqlite-vec-performance.md`
|
|
71
|
+
- `reference--claude-code-hooks-api.md`
|
|
72
|
+
- `landscape-survey--ai-agent-ecosystem.md`
|
|
73
|
+
|
|
74
|
+
### Report Structure
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
# {Type}: {Topic}
|
|
78
|
+
|
|
79
|
+
**Intent:** {id} — {name}
|
|
80
|
+
**Depth:** shallow | deep
|
|
81
|
+
**Date:** YYYY-MM-DD
|
|
82
|
+
|
|
83
|
+
## Summary
|
|
84
|
+
[2-3 sentence executive summary]
|
|
85
|
+
|
|
86
|
+
## Findings
|
|
87
|
+
|
|
88
|
+
### [Finding 1 title]
|
|
89
|
+
[Details with inline citations where applicable]
|
|
90
|
+
|
|
91
|
+
### [Finding 2 title]
|
|
92
|
+
...
|
|
93
|
+
|
|
94
|
+
## Sources
|
|
95
|
+
- [Source 1 title](url) — what was learned from this source
|
|
96
|
+
- [Source 2 title](url) — ...
|
|
97
|
+
|
|
98
|
+
## Relevance to Intent
|
|
99
|
+
[How these findings affect the active intent's decisions or design]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## After Research
|
|
103
|
+
|
|
104
|
+
1. Commit to store repo:
|
|
105
|
+
```
|
|
106
|
+
cd {store_root} && git add . && git commit -m "research: {type} — {topic} (intent {id})"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
2. Log in intent's `## Insights`:
|
|
110
|
+
```
|
|
111
|
+
- Research: {type} — {topic}. Key finding: [one sentence]. See resources/{filename}.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
3. Research does NOT chain to any other skill. It's a side quest — the user decides what to do with the findings.
|
|
@@ -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.
|