@zalom/plastic 1.0.0-alpha.2 → 1.0.0-alpha.20

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 (75) hide show
  1. package/PLASTIC.md +128 -473
  2. package/README.md +90 -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 +7 -6
  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 +10 -0
  12. package/hooks/hooks.json +25 -4
  13. package/hooks/statusline +50 -10
  14. package/package.json +2 -2
  15. package/scripts/dashboard.rb +480 -0
  16. package/scripts/doctor.rb +950 -0
  17. package/scripts/hook-auto-arm +52 -0
  18. package/scripts/hook-bash-gate +53 -0
  19. package/scripts/hook-code-gate +39 -0
  20. package/scripts/hook-continue +15 -114
  21. package/scripts/hook-gate-check +19 -4
  22. package/scripts/hook-session-start +76 -31
  23. package/scripts/install.rb +91 -480
  24. package/scripts/lib/bridge.rb +255 -0
  25. package/scripts/lib/installer_core.rb +760 -0
  26. package/scripts/migrate-to-global +1 -1
  27. package/scripts/select-update-target +93 -0
  28. package/scripts/uninstall.rb +53 -0
  29. package/scripts/update.rb +142 -0
  30. package/scripts/versions.rb +141 -0
  31. package/skills/_active-intent-gate.md +26 -0
  32. package/skills/auto/SKILL.md +62 -9
  33. package/skills/auto/evals/evals.json +92 -0
  34. package/skills/auto/references/agent-architecture.md +60 -0
  35. package/skills/brainstorming/SKILL.md +143 -0
  36. package/skills/brainstorming-grill-me/SKILL.md +5 -5
  37. package/skills/continuing/SKILL.md +20 -4
  38. package/skills/continuing/references/context-management.md +32 -0
  39. package/skills/creating-intent/SKILL.md +16 -1
  40. package/skills/creating-intent/references/lifecycle.md +74 -0
  41. package/skills/creating-intent/references/wikilinks.md +8 -0
  42. package/skills/creating-project/SKILL.md +8 -4
  43. package/skills/creating-project/references/hubs-projects.md +55 -0
  44. package/skills/dashboard/SKILL.md +92 -0
  45. package/skills/doctor/SKILL.md +116 -0
  46. package/skills/doctor/references/gates-stuck-detection.md +38 -0
  47. package/skills/doctor/report.md +96 -0
  48. package/skills/evaluating-skills/SKILL.md +140 -0
  49. package/skills/evaluating-skills/assets/eval-template.json +12 -0
  50. package/skills/evaluating-skills/evals/evals.json +75 -0
  51. package/skills/evaluating-skills/references/convention-checks.md +76 -0
  52. package/skills/evaluating-skills/references/eval-methodology.md +154 -0
  53. package/skills/executing-plan/SKILL.md +3 -3
  54. package/skills/install/SKILL.md +56 -8
  55. package/skills/intent-curator/SKILL.md +3 -3
  56. package/skills/linking-intents/SKILL.md +5 -1
  57. package/skills/linking-intents/references/zettelkasten.md +33 -0
  58. package/skills/managing-index/SKILL.md +5 -1
  59. package/skills/releasing/SKILL.md +119 -18
  60. package/skills/releasing/references/deprecations.md +44 -0
  61. package/skills/research/SKILL.md +114 -0
  62. package/skills/savepoint/SKILL.md +46 -37
  63. package/skills/savepoint/references/context-management.md +32 -0
  64. package/skills/uninstall/SKILL.md +39 -28
  65. package/skills/update/SKILL.md +41 -36
  66. package/skills/versions/SKILL.md +65 -0
  67. package/skills/writing-instructions/SKILL.md +159 -0
  68. package/skills/writing-instructions/references/agentskills-spec.md +135 -0
  69. package/skills/writing-plans/SKILL.md +183 -0
  70. package/templates/agents.md +16 -0
  71. package/templates/outcome.md +13 -0
  72. package/templates/project.yml +5 -0
  73. package/templates/savepoint.md +14 -13
  74. package/templates/spec.md +25 -0
  75. package/bin/install.js +0 -29
@@ -0,0 +1,154 @@
1
+ # Evaluation Methodology
2
+
3
+ Load when choosing a grader type, interpreting pass rate results, or deciding
4
+ whether to graduate or retire evals.
5
+
6
+ Sources: agentskills.io, Anthropic eval engineering, Tessl eval framework,
7
+ Philipp Schmid skill testing guide.
8
+
9
+ ## Three-Tier Grader Taxonomy
10
+
11
+ Layer graders like a Swiss cheese model — no single tier catches everything.
12
+ Use the simplest grader that covers the assertion. Combine tiers for coverage.
13
+
14
+ ### Code-Based Graders
15
+
16
+ Best for structural and mechanical checks:
17
+ - File existence and correct path
18
+ - JSON/YAML validity
19
+ - Line count, character count, token budget
20
+ - Regex pattern matching (frontmatter fields, required sections)
21
+ - Exit codes from bundled scripts
22
+
23
+ Use as the default tier. Fast, deterministic, reproducible.
24
+
25
+ ### LLM-as-Judge Graders
26
+
27
+ Best for subjective quality and semantic checks:
28
+ - "Does this description convey when to use the skill?"
29
+ - "Are the gotchas concrete corrections, not general advice?"
30
+ - "Does the output address the user's actual intent?"
31
+
32
+ Calibration protocol:
33
+ 1. Write a natural-language rubric (not binary pass/fail)
34
+ 2. Run the judge on 10-15 cases where you already know the correct grade
35
+ 3. Compare judge grades to your grades — adjust rubric until >80% agreement
36
+ 4. Spot-check with human grading periodically (every 5th eval run)
37
+
38
+ Rubric template:
39
+ - PASS: [specific criteria with examples]
40
+ - PARTIAL: [what partial credit looks like]
41
+ - FAIL: [specific failure modes]
42
+
43
+ ### Human Graders
44
+
45
+ Best for edge cases and final calibration:
46
+ - Novel failure modes the other tiers miss
47
+ - Calibration set for LLM judges
48
+ - Final sign-off on graduating evals to regression
49
+
50
+ Use sparingly — human grading doesn't scale. Reserve for calibration
51
+ and cases where code + LLM judges disagree.
52
+
53
+ ## pass@k vs pass^k
54
+
55
+ Two metrics that diverge dramatically. Always track both.
56
+
57
+ ### pass@k — Capability
58
+
59
+ "Did it succeed at least once in k trials?"
60
+
61
+ Formula: pass@k = 1 - (1 - p)^k where p = single-trial pass rate
62
+
63
+ Measures: Can the skill/agent do this at all?
64
+
65
+ Example at p=0.7, k=10: pass@k = 97.2%
66
+
67
+ Use when: evaluating whether a skill enables a new capability,
68
+ initial development, deciding whether to invest more iteration.
69
+
70
+ ### pass^k — Reliability
71
+
72
+ "Did it succeed every time in k trials?"
73
+
74
+ Formula: pass^k = p^k
75
+
76
+ Measures: Will it always do this correctly?
77
+
78
+ Example at p=0.7, k=10: pass^k = 2.8%
79
+
80
+ Use when: evaluating production readiness, regression testing,
81
+ deciding whether a skill is reliable enough to ship.
82
+
83
+ ### Interpreting the Gap
84
+
85
+ | pass@k | pass^k | Interpretation |
86
+ |--------|--------|----------------|
87
+ | High | High | Reliable — ready for production |
88
+ | High | Low | Capable but flaky — needs iteration on consistency |
89
+ | Low | Low | Not yet capable — needs fundamental skill improvement |
90
+ | Low | High | Impossible (pass^k <= pass@k always) |
91
+
92
+ Run k=3 minimum for meaningful results. k=5 for production decisions.
93
+
94
+ ## Capability-to-Regression Graduation
95
+
96
+ Track pass rates across iterations. When a capability eval consistently
97
+ hits ~100% (pass@k=1.0 for 3+ consecutive runs):
98
+
99
+ 1. Graduate the eval from "capability" to "regression"
100
+ 2. Regression evals run on every skill change — they protect against backsliding
101
+ 3. If a regression eval starts failing, the recent change broke something
102
+ 4. Investigate the failing regression before iterating further
103
+
104
+ Graduation is one-way. Once an eval is regression, it stays regression
105
+ unless the underlying requirement changes.
106
+
107
+ ## Skill Retirement Detection
108
+
109
+ Monitor the with/without skill delta over time:
110
+
111
+ 1. Run paired evals (with-skill vs without-skill) periodically
112
+ 2. Compute the delta in pass rates
113
+ 3. If delta shrinks to near-zero across 3+ consecutive runs:
114
+ - The model has likely internalized the skill's knowledge
115
+ - The skill may be ready for retirement
116
+ 4. Before retiring: run one final full eval suite to confirm
117
+ 5. Archive the skill (don't delete — may need to restore if model changes)
118
+
119
+ Common cause of false retirement signals: model update changed capabilities.
120
+ Re-test after model updates.
121
+
122
+ ## Tessl Three-Layer Eval Taxonomy
123
+
124
+ Three layers of increasing realism. Each catches failures the others miss.
125
+
126
+ ### Layer 1: Skill Review (Structural Lint)
127
+
128
+ Does the skill itself follow best practices?
129
+ - SKILL.md structure (frontmatter, sections, length)
130
+ - Description quality (imperative, user-intent, trigger keywords)
131
+ - Reference organization (conditional triggers, one level deep)
132
+ - Convention compliance (for Plastic skills, see convention-checks.md)
133
+
134
+ Fast, cheap, runs without executing the skill.
135
+
136
+ ### Layer 2: Task Evals (Synthetic)
137
+
138
+ Does the skill improve agent output on synthetic tasks?
139
+ - Paired with/without comparison
140
+ - Controlled prompts with known-good expected outputs
141
+ - Measures the delta the skill adds
142
+
143
+ This is the core eval loop (Steps 2-5 in the SKILL.md procedure).
144
+
145
+ ### Layer 3: Repo Evals (Real Codebase)
146
+
147
+ Does the skill work correctly in a real project context?
148
+ - Install the skill in a real repository
149
+ - Run real tasks (not synthetic prompts)
150
+ - Measure whether the agent uses the skill correctly in situ
151
+
152
+ Most expensive, most realistic. Catches skills that pass synthetic tests
153
+ but fail under real project complexity. Use for high-stakes skills
154
+ or before shipping to users.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plastic:executing-plan
2
+ name: plastic-executing-plan
3
3
  description: Use when you have a written implementation plan to execute. Default mode is subagent-driven (dispatches fresh subagent per task with two-stage review). Fallback mode is inline execution for environments without subagent support. If superpowers:subagent-driven-development or superpowers:executing-plans are available, delegates to them.
4
4
  ---
5
5
 
@@ -70,7 +70,7 @@ After all tasks complete, dispatch a final reviewer for the entire implementatio
70
70
  ### Step 4: Update Intent and Complete
71
71
  Capture observations in `## Insights`. When ALL checklist items are checked:
72
72
 
73
- 1. Write `outcome.md` with detailed results in the intent directory
73
+ 1. Write `outcome.md` with detailed results in the intent directory, using the `${CLAUDE_PLUGIN_ROOT}/templates/outcome.md` form
74
74
  2. Write `## Outcome` summary in the intent file (1-2 sentences)
75
75
  3. Move intent from `## Active` to `## Completed` in INDEX.md (with today's date)
76
76
  4. Update cluster entries to show `_(completed)_`
@@ -95,7 +95,7 @@ For each task:
95
95
  ### Step 3: Update Intent and Complete
96
96
  Capture observations in `## Insights`. When ALL checklist items are checked:
97
97
 
98
- 1. Write `outcome.md` with detailed results in the intent directory
98
+ 1. Write `outcome.md` with detailed results in the intent directory, using the `${CLAUDE_PLUGIN_ROOT}/templates/outcome.md` form
99
99
  2. Write `## Outcome` summary in the intent file (1-2 sentences)
100
100
  3. Move intent from `## Active` to `## Completed` in INDEX.md (with today's date)
101
101
  4. Update cluster entries to show `_(completed)_`
@@ -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,19 @@ 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: Announce**
110
157
 
111
- > "Plastic installed globally at ~/.plastic/. Create your first intent with `/plastic:creating-intent`."
158
+ > "Plastic installed globally at ~/.plastic/. Health check: [doctor summary].
159
+ > Create your first intent with `/plastic-creating-intent`."
112
160
 
113
161
  ### Local Install (testing/legacy)
114
162
 
115
- Run `/plastic:install --local`.
163
+ Run `/plastic-install --local`.
116
164
 
117
165
  #### Procedure
118
166
 
@@ -131,4 +179,4 @@ Run `/plastic:install --local`.
131
179
 
132
180
  **Step 4:** Commit in project: `git add .plastic/ && git commit -m "chore: initialize Plastic local store"`
133
181
 
134
- **Step 5:** Announce: "Plastic initialized locally. This is a testing/legacy mode. Consider `/plastic:install` for global mode."
182
+ **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,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.