@zalom/plastic 1.0.0-alpha.3 → 1.0.0-alpha.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/PLASTIC.md +134 -469
  2. package/README.md +95 -58
  3. package/agents/future-intent-researcher.md +1 -1
  4. package/agents/intent-curator.md +1 -1
  5. package/bin/plastic.js +57 -0
  6. package/bin/test +28 -0
  7. package/deprecations.yml +1 -10
  8. package/hooks/auto-arm +5 -0
  9. package/hooks/bash-gate +3 -0
  10. package/hooks/check-update +12 -8
  11. package/hooks/code-gate +12 -0
  12. package/hooks/gate-check +3 -1
  13. package/hooks/hooks.json +25 -4
  14. package/hooks/statusline +50 -10
  15. package/package.json +2 -2
  16. package/scripts/dashboard.rb +680 -0
  17. package/scripts/doctor.rb +1227 -0
  18. package/scripts/hook-auto-arm +51 -0
  19. package/scripts/hook-bash-gate +41 -0
  20. package/scripts/hook-code-gate +27 -0
  21. package/scripts/hook-continue +15 -114
  22. package/scripts/hook-gate-check +30 -34
  23. package/scripts/hook-session-start +121 -31
  24. package/scripts/install.rb +91 -487
  25. package/scripts/lib/boot_banner.rb +28 -0
  26. package/scripts/lib/bridge.rb +358 -10
  27. package/scripts/lib/installer_core.rb +747 -0
  28. package/scripts/lib/intent_validator.rb +90 -0
  29. package/scripts/lib/qmd_sync.rb +159 -0
  30. package/scripts/lib/store_provisioning.rb +100 -0
  31. package/scripts/migrate-to-global +1 -1
  32. package/scripts/provision-project-store +53 -0
  33. package/scripts/qmd-sync +92 -0
  34. package/scripts/select-update-target +93 -0
  35. package/scripts/uninstall.rb +53 -0
  36. package/scripts/update.rb +164 -0
  37. package/scripts/validate-intent +54 -0
  38. package/scripts/versions.rb +141 -0
  39. package/skills/_active-intent-gate.md +26 -0
  40. package/skills/add-project-store/SKILL.md +54 -0
  41. package/skills/auto/SKILL.md +69 -9
  42. package/skills/auto/evals/evals.json +92 -0
  43. package/skills/auto/references/agent-architecture.md +60 -0
  44. package/skills/brainstorming/SKILL.md +143 -0
  45. package/skills/brainstorming-grill-me/SKILL.md +5 -5
  46. package/skills/continuing/SKILL.md +92 -82
  47. package/skills/continuing/evals/evals.json +136 -0
  48. package/skills/continuing/references/context-management.md +32 -0
  49. package/skills/creating-intent/SKILL.md +38 -9
  50. package/skills/creating-intent/references/lifecycle.md +74 -0
  51. package/skills/creating-intent/references/wikilinks.md +8 -0
  52. package/skills/creating-project/SKILL.md +40 -8
  53. package/skills/creating-project/references/hubs-projects.md +55 -0
  54. package/skills/dashboard/SKILL.md +121 -0
  55. package/skills/dashboard/templates/dashboard-global.md +31 -0
  56. package/skills/dashboard/templates/dashboard-project.md +40 -0
  57. package/skills/doctor/SKILL.md +159 -0
  58. package/skills/doctor/references/gates-stuck-detection.md +38 -0
  59. package/skills/doctor/report.md +100 -0
  60. package/skills/evaluating-skills/SKILL.md +140 -0
  61. package/skills/evaluating-skills/assets/eval-template.json +12 -0
  62. package/skills/evaluating-skills/evals/evals.json +75 -0
  63. package/skills/evaluating-skills/references/convention-checks.md +76 -0
  64. package/skills/evaluating-skills/references/eval-methodology.md +154 -0
  65. package/skills/executing-plan/SKILL.md +5 -3
  66. package/skills/install/SKILL.md +69 -8
  67. package/skills/intent-curator/SKILL.md +3 -3
  68. package/skills/linking-intents/SKILL.md +5 -1
  69. package/skills/linking-intents/references/zettelkasten.md +33 -0
  70. package/skills/managing-index/SKILL.md +5 -1
  71. package/skills/releasing/SKILL.md +119 -18
  72. package/skills/releasing/references/deprecations.md +60 -0
  73. package/skills/research/SKILL.md +114 -0
  74. package/skills/savepoint/SKILL.md +46 -37
  75. package/skills/savepoint/references/context-management.md +32 -0
  76. package/skills/uninstall/SKILL.md +39 -28
  77. package/skills/update/SKILL.md +41 -36
  78. package/skills/versions/SKILL.md +65 -0
  79. package/skills/writing-instructions/SKILL.md +159 -0
  80. package/skills/writing-instructions/references/agentskills-spec.md +135 -0
  81. package/skills/writing-plans/SKILL.md +183 -0
  82. package/templates/agents.md +16 -0
  83. package/templates/outcome.md +13 -0
  84. package/templates/project.yml +5 -0
  85. package/templates/savepoint.md +14 -13
  86. package/templates/spec.md +25 -0
  87. package/bin/install.js +0 -29
@@ -1,22 +1,64 @@
1
1
  ---
2
- name: plastic:install
3
- description: Use when initializing Plastic globally (~/.plastic/) or locally in a project. Global install is recommended — creates the global intent store as a git-backed repository. Local install creates .plastic/ in the current project for testing.
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. Default is --latest (stable). Global install is recommended — 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@latest install --claude`
9
+ > in your shell (or `bunx @zalom/plastic@latest --claude` if you use Bun). This skill
10
+ > exists to **re-install or repair** an existing setup from inside the agent, and to
11
+ > drive interactive global configuration. Whenever this skill performs an install or
12
+ > re-install, it **runs `/plastic-doctor` afterward** and reports the result.
13
+
14
+ ## Re-install / repair
15
+
16
+ If Plastic is already installed but something is broken (skills missing, hooks not
17
+ firing, leftover legacy plugin), re-run the installer — it is idempotent, prunes
18
+ files that no longer ship, and removes any legacy plugin/marketplace layout:
19
+
20
+ ```bash
21
+ npx @zalom/plastic@latest install --reinstall --claude # or @beta / @alpha to match your channel
22
+ ```
23
+
24
+ Then **run `/plastic-doctor`** and report what it found.
25
+
26
+ ## Channel Flags
27
+
28
+ | Flag | Behavior |
29
+ |------|----------|
30
+ | `--latest` | Install from stable channel (default) |
31
+ | `--beta` | Install from beta channel |
32
+ | `--alpha` | Install from alpha channel |
33
+
34
+ When invoked from within Claude Code (re-install or channel switch), the skill
35
+ runs the appropriate npx command:
36
+
37
+ ```bash
38
+ # Stable (default)
39
+ npx @zalom/plastic install --claude
40
+
41
+ # Beta
42
+ npx @zalom/plastic@beta install --claude
43
+
44
+ # Alpha
45
+ npx @zalom/plastic@alpha install --claude
46
+ ```
47
+
48
+ The installed version and channel are recorded in `~/.plastic/VERSION`.
49
+
8
50
  ## Modes
9
51
 
10
52
  ### Global Install (default, recommended)
11
53
 
12
- Run `/plastic:install` with no arguments.
54
+ Run `/plastic-install` with no arguments.
13
55
 
14
56
  #### Procedure
15
57
 
16
58
  **Step 1: Check for existing installation**
17
59
 
18
60
  Check if `~/.plastic/INDEX.md` exists.
19
- - If yes: announce "Plastic is already installed at ~/.plastic/. Run `/plastic:update` to sync core files."
61
+ - If yes: announce "Plastic is already installed at ~/.plastic/. Run `/plastic-update` to sync core files."
20
62
  - If no: proceed with fresh install.
21
63
 
22
64
  **Step 2: Create ~/.plastic/ as a git repo**
@@ -106,13 +148,32 @@ Update `config.yml` with any additional roots.
106
148
 
107
149
  Auto-commit the config change.
108
150
 
109
- **Step 4: Announce**
151
+ **Step 4: Verify with doctor**
152
+
153
+ Run `/plastic-doctor` and report the result. Resolve any fixable findings before
154
+ announcing success.
155
+
156
+ **Step 5: Register stores with QMD (optional)**
157
+
158
+ QMD is an optional search layer. If it is installed, register the Plastic stores so
159
+ they are searchable:
160
+
161
+ ```bash
162
+ ruby ~/.plastic/scripts/qmd-sync detect && ruby ~/.plastic/scripts/qmd-sync register --all
163
+ ```
164
+
165
+ `qmd-sync` no-ops cleanly when QMD is absent, so this is safe to run unconditionally.
166
+ It registers `plastic-global` and every project store from `projects.yml`, then indexes
167
+ them. Report what was registered, or that QMD was not detected and the step was skipped.
168
+
169
+ **Step 6: Announce**
110
170
 
111
- > "Plastic installed globally at ~/.plastic/. Create your first intent with `/plastic:creating-intent`."
171
+ > "Plastic installed globally at ~/.plastic/. Health check: [doctor summary].
172
+ > Create your first intent with `/plastic-creating-intent`."
112
173
 
113
174
  ### Local Install (testing/legacy)
114
175
 
115
- Run `/plastic:install --local`.
176
+ Run `/plastic-install --local`.
116
177
 
117
178
  #### Procedure
118
179
 
@@ -131,4 +192,4 @@ Run `/plastic:install --local`.
131
192
 
132
193
  **Step 4:** Commit in project: `git add .plastic/ && git commit -m "chore: initialize Plastic local store"`
133
194
 
134
- **Step 5:** Announce: "Plastic initialized locally. This is a testing/legacy mode. Consider `/plastic:install` for global mode."
195
+ **Step 5:** Announce: "Plastic initialized locally. This is a testing/legacy mode. Consider `/plastic-install` for global mode."
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plastic:intent-curator
2
+ name: plastic-intent-curator
3
3
  description: |
4
4
  Use when completing or reviewing intents, reorganizing the index,
5
5
  or when the intent store needs maintenance. Examples:
@@ -15,7 +15,7 @@ description: |
15
15
 
16
16
  # Intent Curator
17
17
 
18
- Dispatches to the `plastic:intent-curator` agent for intent store maintenance.
18
+ Dispatches to the `plastic-intent-curator` agent for intent store maintenance.
19
19
 
20
20
  ## When to Use
21
21
  - Completing or reviewing intents
@@ -25,7 +25,7 @@ Dispatches to the `plastic:intent-curator` agent for intent store maintenance.
25
25
 
26
26
  ## Workflow
27
27
 
28
- Invoke the `plastic:intent-curator` agent via the Agent tool with `subagent_type: "plastic:intent-curator"`. Pass the user's request as the prompt, including:
28
+ Invoke the `plastic-intent-curator` agent via the Agent tool with `subagent_type: "plastic-intent-curator"`. Pass the user's request as the prompt, including:
29
29
 
30
30
  1. **What to do** — complete intent, reorganize, triage stale, etc.
31
31
  2. **Which store** — global (`~/.plastic/`) or project (`.plastic/store/`)
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plastic:linking-intents
2
+ name: plastic-linking-intents
3
3
  description: Use when creating connections between intents, the user says "link" or "connect", or when discovering that two intents are related. Manages sources, chain, and cross-reference links.
4
4
  ---
5
5
 
@@ -70,3 +70,7 @@ Add a wikilink in the `## Links` section of **both** intents (bidirectional).
70
70
 
71
71
  ### 4. Update INDEX.md Clusters
72
72
  If both intents share a topic, ensure they're in the same cluster.
73
+
74
+ ## References
75
+
76
+ - Read `references/zettelkasten.md` for the three Zettelkasten structures (Folgezettel, directed graph, tags), ID encoding rules, and dual-mode (Obsidian + programmatic) design
@@ -0,0 +1,33 @@
1
+ # Zettelkasten Structure
2
+
3
+ Plastic implements three Zettelkasten structures:
4
+
5
+ | Structure | Implementation | Purpose |
6
+ |---|---|---|
7
+ | Folgezettel (linked list) | `sources` + `chain` in frontmatter | Sequential provenance |
8
+ | Directed graph (web of notes) | `## Links` with wikilinks | Obsidian navigation |
9
+ | Tag-based taxonomy | `tags` in frontmatter | Topic grouping |
10
+
11
+ INDEX.md is a structure note (hub), not a table of contents.
12
+
13
+ ## Folgezettel IDs
14
+
15
+ IDs encode lineage using Luhmann's alternating convention:
16
+ - Root intents: sequential numbers (`1`, `2`, `3`...)
17
+ - Branches alternate letters and numbers: `1` → `1a` → `1a1` → `1a1a` → ...
18
+ - Multiple branches from the same parent increment: `1a`, `1b`, `1c`
19
+ - IDs are assigned at creation time and never change
20
+
21
+ ## Knowledge Graph
22
+
23
+ `sources` + `chain` form the double-linked knowledge graph:
24
+ - `sources` = what fed into this intent (parents, inspirations, prerequisites)
25
+ - `chain` = what this intent produced (children, follow-ups, spin-offs)
26
+
27
+ ## Dual-Mode
28
+
29
+ This store works in two modes without modification:
30
+ - **Obsidian** (human, offline) — browse, link, write markdown
31
+ - **Programmatic** (any agent) — read/write via filesystem operations
32
+
33
+ No special tooling required for either mode.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plastic:managing-index
2
+ name: plastic-managing-index
3
3
  description: Use after creating, completing, or abandoning intents, when the user says "index" or "organize", or when INDEX.md needs maintenance. Curates the INDEX.md structure note.
4
4
  ---
5
5
 
@@ -64,3 +64,7 @@ When 3+ intents share tags but aren't in a cluster, suggest a new cluster headin
64
64
  Intents with no links (empty `sources`, empty `chain`, no `## Links` entries, not in any cluster) should be flagged for curation.
65
65
 
66
66
  REQUIRED BACKGROUND: linking-intents (for understanding connection types and Zettelkasten theory)
67
+
68
+ ## References
69
+
70
+ - Read `references/zettelkasten-linking.md` for the three structural layers (Folgezettel, directed graph, tags) and how they map to INDEX.md organization
@@ -1,30 +1,67 @@
1
1
  ---
2
- name: plastic:releasing
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
- - [ ] All tests pass
13
+ - [ ] Read project config
14
+ - [ ] All tests pass (or verification skipped per config)
13
15
  - [ ] Merge feature branch to main
14
- - [ ] Bump version in plugin.json and marketplace.json
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
- ruby test/read_config_test.rb && ruby test/config_template_test.rb
57
+ # Example: release.verify = "ruby -Itest test/*_test.rb"
58
+ <verify-command-from-config>
25
59
  ```
26
60
 
27
- All tests must pass before release. Do not proceed if any fail.
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
- Update ALL THREE files — they must stay in sync:
51
- - `package.json` → `"version": "X.Y.Z"`
52
- - `.claude-plugin/plugin.json` → `"version": "X.Y.Z"`
53
- - `.claude-plugin/marketplace.json` → `"version": "X.Y.Z"`
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 package.json .claude-plugin/plugin.json .claude-plugin/marketplace.json
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 vX.Y.Z -m "vX.Y.Z — [release name]
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. GitHub Release
127
+ ### 7. Post-Push Actions
83
128
 
84
- Create a GitHub release from the tag. Use `--generate-notes` to auto-generate changelog from commits since the previous tag:
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 vX.Y.Z --title "vX.Y.Z — [release name]" --generate-notes --notes-start-tag <previous-tag>
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 v<X.Y.Z>"`
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` (lowercase v prefix)
111
- - **Tag message** — first line: `vX.Y.Z — [short name]`, then blank line, then bullet changelog
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** — package.json, plugin.json, and marketplace.json always match
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,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.
@@ -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.