@zalom/plastic 2.0.0-alpha.27 → 2.0.0-alpha.29

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 (207) hide show
  1. package/PLASTIC.md +13 -139
  2. package/README.md +345 -133
  3. package/agents/plastic-enforcer.md +9 -10
  4. package/agents/plastic-executor.md +1 -1
  5. package/bin/crap +4 -0
  6. package/bin/lib/context_budget.rb +35 -1
  7. package/bin/lib/skill_census.rb +839 -0
  8. package/bin/plastic +6 -0
  9. package/bin/plastic-skill-census +114 -0
  10. package/bin/verify-change +345 -0
  11. package/deprecations.yml +1 -1
  12. package/{skills/agent-advisor/references → docs/help}/advisor-protocol.md +4 -7
  13. package/{skills/auto/references → docs/help}/agent-architecture.md +7 -7
  14. package/{skills/conventions/references → docs/help}/completion-and-done.md +1 -1
  15. package/{skills/auto/references → docs/help}/human-report-contract.md +17 -19
  16. package/{skills/conventions/references → docs/help}/roadmaps.md +2 -2
  17. package/{skills/tutorial/references → docs/help}/track-1-guided.md +8 -8
  18. package/{skills/tutorial/references → docs/help}/track-2-auto.md +5 -5
  19. package/{skills/tutorial/references → docs/help}/track-3-projects-and-roadmaps.md +24 -17
  20. package/package.json +3 -2
  21. package/scripts/append-ledger +2 -1
  22. package/scripts/dashboard.rb +10 -9
  23. package/scripts/day-summary +2 -1
  24. package/scripts/doctor.rb +48 -42
  25. package/scripts/end-intent +2 -8
  26. package/scripts/file-session-intent +2 -1
  27. package/scripts/hook-capture +4 -3
  28. package/scripts/hook-close +2 -1
  29. package/scripts/hook-record +3 -2
  30. package/scripts/hook-savepoint +3 -2
  31. package/scripts/hook-session-start +5 -4
  32. package/scripts/hook-stop +2 -1
  33. package/scripts/insight-append +1 -2
  34. package/scripts/install.rb +3 -1
  35. package/scripts/lib/active_delivery.rb +1 -1
  36. package/scripts/lib/arm.rb +2 -1
  37. package/scripts/lib/backup.rb +65 -0
  38. package/scripts/lib/cli/command.rb +85 -0
  39. package/scripts/lib/cli/commands/auto.rb +18 -0
  40. package/scripts/lib/cli/commands/auto_brief.rb +44 -0
  41. package/scripts/lib/cli/commands/auto_lock.rb +60 -0
  42. package/scripts/lib/cli/commands/auto_report.rb +50 -0
  43. package/scripts/lib/cli/commands/auto_take.rb +25 -0
  44. package/scripts/lib/cli/commands/backup.rb +43 -0
  45. package/scripts/lib/cli/commands/checkout.rb +25 -0
  46. package/scripts/lib/cli/commands/continue.rb +66 -0
  47. package/scripts/lib/cli/commands/doctor.rb +20 -0
  48. package/scripts/lib/cli/commands/feedback.rb +40 -0
  49. package/scripts/lib/cli/commands/help.rb +69 -0
  50. package/scripts/lib/cli/commands/hook.rb +32 -0
  51. package/scripts/lib/cli/commands/index.rb +23 -0
  52. package/scripts/lib/cli/commands/install.rb +21 -0
  53. package/scripts/lib/cli/commands/installer_verb.rb +37 -0
  54. package/scripts/lib/cli/commands/intent.rb +19 -0
  55. package/scripts/lib/cli/commands/intent_answer.rb +37 -0
  56. package/scripts/lib/cli/commands/intent_command.rb +53 -0
  57. package/scripts/lib/cli/commands/intent_end.rb +61 -0
  58. package/scripts/lib/cli/commands/intent_new.rb +62 -0
  59. package/scripts/lib/cli/commands/intent_note.rb +43 -0
  60. package/scripts/lib/cli/commands/intent_rule.rb +36 -0
  61. package/scripts/lib/cli/commands/intent_show.rb +25 -0
  62. package/scripts/lib/cli/commands/intent_spec.rb +44 -0
  63. package/scripts/lib/cli/commands/intent_step.rb +43 -0
  64. package/scripts/lib/cli/commands/intent_verify.rb +26 -0
  65. package/scripts/lib/cli/commands/migrate.rb +16 -0
  66. package/scripts/lib/cli/commands/migrate_stores.rb +31 -0
  67. package/scripts/lib/cli/commands/next.rb +49 -0
  68. package/scripts/lib/cli/commands/project.rb +19 -0
  69. package/scripts/lib/cli/commands/project_links.rb +42 -0
  70. package/scripts/lib/cli/commands/project_list.rb +20 -0
  71. package/scripts/lib/cli/commands/project_new.rb +72 -0
  72. package/scripts/lib/cli/commands/query.rb +31 -0
  73. package/scripts/lib/cli/commands/render.rb +25 -0
  74. package/scripts/lib/cli/commands/roadmap.rb +19 -0
  75. package/scripts/lib/cli/commands/roadmap_check.rb +44 -0
  76. package/scripts/lib/cli/commands/roadmap_log.rb +54 -0
  77. package/scripts/lib/cli/commands/roadmap_next.rb +34 -0
  78. package/scripts/lib/cli/commands/roadmap_show.rb +45 -0
  79. package/scripts/lib/cli/commands/rollback.rb +20 -0
  80. package/scripts/lib/cli/commands/search.rb +60 -0
  81. package/scripts/lib/cli/commands/session.rb +18 -0
  82. package/scripts/lib/cli/commands/session_commit.rb +42 -0
  83. package/scripts/lib/cli/commands/session_handoff.rb +34 -0
  84. package/scripts/lib/cli/commands/session_summary.rb +35 -0
  85. package/scripts/lib/cli/commands/status.rb +68 -0
  86. package/scripts/lib/cli/commands/subcommand_list.rb +36 -0
  87. package/scripts/lib/cli/commands/sync.rb +46 -0
  88. package/scripts/lib/cli/commands/uninstall.rb +20 -0
  89. package/scripts/lib/cli/commands/update.rb +20 -0
  90. package/scripts/lib/cli/commands/version.rb +53 -0
  91. package/scripts/lib/cli/frontier.rb +84 -0
  92. package/scripts/lib/cli/legacy.rb +50 -0
  93. package/scripts/lib/cli/output.rb +102 -0
  94. package/scripts/lib/cli/scope.rb +127 -0
  95. package/scripts/lib/cli/table.rb +64 -0
  96. package/scripts/lib/cli.rb +94 -0
  97. package/scripts/lib/compact_instructions.rb +8 -0
  98. package/scripts/lib/day_summary.rb +4 -3
  99. package/scripts/lib/doctor_core.rb +7 -32
  100. package/scripts/lib/doctor_session_ledger.rb +2 -1
  101. package/scripts/lib/feedback_report.rb +1 -1
  102. package/scripts/lib/graph_measure_models.rb +3 -1
  103. package/scripts/lib/index_entry.rb +9 -0
  104. package/scripts/lib/installer_core.rb +73 -19
  105. package/scripts/lib/intent_screen.rb +3 -3
  106. package/scripts/lib/lock.rb +2 -2
  107. package/scripts/lib/node_input.rb +3 -2
  108. package/scripts/lib/preflight.rb +4 -6
  109. package/scripts/lib/project_config.rb +2 -1
  110. package/scripts/lib/project_validator.rb +3 -2
  111. package/scripts/lib/qmd_sync.rb +8 -7
  112. package/scripts/lib/reference_archive.rb +45 -0
  113. package/scripts/lib/release_guard.rb +2 -0
  114. package/scripts/lib/report_screen.rb +4 -3
  115. package/scripts/lib/rlm/corpus.rb +13 -0
  116. package/scripts/lib/rlm/probe.rb +29 -0
  117. package/scripts/lib/rlm/query.rb +22 -0
  118. package/scripts/lib/roadmap_queue.rb +2 -2
  119. package/scripts/lib/roadmap_savepoint.rb +1 -1
  120. package/scripts/lib/runner_absorb.rb +3 -2
  121. package/scripts/lib/search_index.rb +55 -0
  122. package/scripts/lib/session_git.rb +4 -3
  123. package/scripts/lib/sqlite.rb +22 -0
  124. package/scripts/lib/store_discovery.rb +7 -6
  125. package/scripts/lib/store_layout.rb +54 -0
  126. package/scripts/lib/store_provisioning.rb +2 -1
  127. package/scripts/lib/store_sync.rb +85 -0
  128. package/scripts/lib/stores_move.rb +93 -0
  129. package/scripts/lib/verify_intent.rb +2 -7
  130. package/scripts/lib/version_number.rb +48 -0
  131. package/scripts/lib/work_graph.rb +59 -0
  132. package/scripts/lib/worktree.rb +3 -8
  133. package/scripts/lib/worktree_sweep.rb +3 -2
  134. package/scripts/link-suggest +2 -1
  135. package/scripts/migrate-to-global +1 -1
  136. package/scripts/new-intent +3 -12
  137. package/scripts/plastic-lock +3 -2
  138. package/scripts/promote-session-item +3 -2
  139. package/scripts/release-check +10 -5
  140. package/scripts/report-screen +1 -1
  141. package/scripts/session-commit +2 -1
  142. package/scripts/spawn-preamble +2 -2
  143. package/scripts/update.rb +25 -4
  144. package/scripts/write-handoff +2 -1
  145. package/templates/agents.md +6 -6
  146. package/templates/render.css +10 -0
  147. package/bin/plastic.js +0 -70
  148. package/skills/agent-advisor/SKILL.md +0 -84
  149. package/skills/auto/SKILL.md +0 -297
  150. package/skills/auto/evals/evals.json +0 -255
  151. package/skills/auto/references/end-tail.md +0 -64
  152. package/skills/conventions/SKILL.md +0 -29
  153. package/skills/dashboard/SKILL.md +0 -180
  154. package/skills/dashboard/evals/evals.json +0 -38
  155. package/skills/dashboard/references/classification.md +0 -22
  156. package/skills/dashboard/templates/dashboard-global.md +0 -20
  157. package/skills/dashboard/templates/dashboard-project.md +0 -19
  158. package/skills/direct/SKILL.md +0 -66
  159. package/skills/direct/references/request-signals.md +0 -59
  160. package/skills/doctor/SKILL.md +0 -305
  161. package/skills/doctor/report.md +0 -102
  162. package/skills/feedback/SKILL.md +0 -98
  163. package/skills/feedback/references/transport-and-privacy.md +0 -65
  164. package/skills/feedback/report.md +0 -36
  165. package/skills/install/SKILL.md +0 -215
  166. package/skills/intent-continuing/SKILL.md +0 -156
  167. package/skills/intent-continuing/references/board-fill.md +0 -52
  168. package/skills/intent-continuing/references/boarding-matrix.md +0 -35
  169. package/skills/intent-continuing/references/context-management.md +0 -28
  170. package/skills/intent-continuing/references/liveness-ranking.md +0 -57
  171. package/skills/intent-creating/SKILL.md +0 -89
  172. package/skills/intent-creating/evals/evals.json +0 -72
  173. package/skills/intent-creating/references/lifecycle.md +0 -81
  174. package/skills/intent-creating/references/wikilinks.md +0 -8
  175. package/skills/intent-ending/SKILL.md +0 -182
  176. package/skills/intent-ending/evals/evals.json +0 -74
  177. package/skills/intent-executing/SKILL.md +0 -87
  178. package/skills/intent-executing/evals/evals.json +0 -66
  179. package/skills/intent-executing/implementer-prompt.md +0 -47
  180. package/skills/intent-executing/spec-reviewer-prompt.md +0 -27
  181. package/skills/intent-speccing/SKILL.md +0 -136
  182. package/skills/intent-speccing/evals/evals.json +0 -126
  183. package/skills/intent-speccing/references/design-principles.md +0 -44
  184. package/skills/intent-speccing/references/per-section-fill-rules.md +0 -92
  185. package/skills/intent-speccing/references/self-verify-checklist.md +0 -37
  186. package/skills/project-creating/SKILL.md +0 -162
  187. package/skills/project-creating/references/hubs-projects.md +0 -55
  188. package/skills/project-creating/references/project-scaffolding.md +0 -97
  189. package/skills/releasing/SKILL.md +0 -376
  190. package/skills/releasing/references/deprecations.md +0 -60
  191. package/skills/releasing/references/promotion-and-tagging.md +0 -70
  192. package/skills/releasing/references/release-lines.md +0 -105
  193. package/skills/roadmap/SKILL.md +0 -90
  194. package/skills/roadmap/references/file-format.md +0 -134
  195. package/skills/roadmap/references/operations.md +0 -112
  196. package/skills/rollback/SKILL.md +0 -91
  197. package/skills/tutorial/SKILL.md +0 -66
  198. package/skills/tutorial/evals/evals.json +0 -186
  199. package/skills/uninstall/SKILL.md +0 -75
  200. package/skills/update/SKILL.md +0 -126
  201. /package/{skills/auto/references → docs/help}/agent-report-contract.md +0 -0
  202. /package/{skills/intent-executing → docs/help}/code-quality-reviewer-prompt.md +0 -0
  203. /package/{skills/conventions/references → docs/help}/knowledge-graph.md +0 -0
  204. /package/{skills/conventions/references → docs/help}/lifecycle-and-savepoints.md +0 -0
  205. /package/{skills/conventions/references → docs/help}/locks-and-worktrees.md +0 -0
  206. /package/{skills/conventions/references → docs/help}/maintenance-and-revisions.md +0 -0
  207. /package/{skills/intent-executing → docs/help}/plan-reviewer-prompt.md +0 -0
@@ -1,97 +0,0 @@
1
- # Project Scaffolding Templates
2
-
3
- Full templates for the artifacts created while spawning a project: the AGENTS.md
4
- skeleton (Workflow step 4), the tactical mirror intent (step 5), and the
5
- projects.yml registration block (step 6).
6
-
7
- ## Table of Contents
8
-
9
- - [AGENTS.md skeleton (step 4)](#agentsmd-skeleton-step-4)
10
- - [Tactical mirror intent (step 5)](#tactical-mirror-intent-step-5)
11
- - [projects.yml registration block (step 6)](#projectsyml-registration-block-step-6)
12
-
13
- ## AGENTS.md skeleton (step 4)
14
-
15
- Create `AGENTS.md` in the project root with:
16
-
17
- ```markdown
18
- # <Project Name> — Agent Instructions
19
-
20
- Read `PLASTIC.md` in `~/.plastic/` for the core conventions; deeper doctrine lives in
21
- the `plastic-conventions` skill's chapters. Follow it exactly.
22
-
23
- This file is the operating contract for this project. Any agent entering
24
- this project reads this file first.
25
-
26
- ## Global Store
27
-
28
- Location: `~/.plastic/`
29
- Governing intent(s): <list of founding intent IDs with descriptions>
30
-
31
- ## Decisions
32
-
33
- <Copy ALL decisions from founding intent(s)' `## Context > ### Decisions`>
34
-
35
- Each decision should include:
36
- - The decision itself
37
- - The rationale (why this choice)
38
- - Date decided
39
-
40
- ## Project-Specific Rules
41
-
42
- <Any rules derived from the decisions — e.g., "Use Minitest, not RSpec",
43
- "37signals methodology", "sqlite-vec for vector storage">
44
- ```
45
-
46
- ## Tactical mirror intent (step 5)
47
-
48
- Create the first intent in the project's store at `~/.plastic/projects/{slug}/store/`:
49
-
50
- **Directory:** `~/.plastic/projects/{slug}/store/1--{slug}/`
51
- **File:** `~/.plastic/projects/{slug}/store/1--{slug}/1--{slug}.md`
52
-
53
- ```yaml
54
- ---
55
- id: '1'
56
- intent: "<same description as founding intent>"
57
- sources: ["global:<founding_intent_ID>"]
58
- chain: []
59
- created: <today>
60
- author: <same as founding intent author>
61
- tags: [<relevant tags>]
62
- ---
63
- ```
64
-
65
- Sections:
66
- - `## Intent` — same as founding intent
67
- - `## Context` — carry forward relevant Context and Decisions
68
- - `## Outcome` — (pending)
69
- - `## Insights` — empty
70
- - `## Links` — `[[global:<founding_intent_ID>|<founding intent name>]]`
71
-
72
- Update the project's `~/.plastic/projects/{slug}/INDEX.md`:
73
- ```markdown
74
- # Index
75
-
76
- ## Active
77
- - [1 — <intent name>](store/1--<slug>/1--<slug>.md) — implementation, from: global:<ID>
78
- ```
79
-
80
- **For multi-intent spawning (Hub):**
81
- - `sources`: `["global:<id1>", "global:<id2>", ...]` — all founding intents
82
- - All founding intents' decisions merge into AGENTS.md
83
- - Context carries forward from all founding intents
84
-
85
- ## projects.yml registration block (step 6)
86
-
87
- Read `~/.plastic/projects.yml` and add:
88
-
89
- ```yaml
90
- <slug>:
91
- path: <full-path>
92
- parent: "<founding_intent_ID>"
93
- registered: <today>
94
- status: active
95
- ```
96
-
97
- For Hub-spawned projects, `parent` references the primary founding intent.
@@ -1,376 +0,0 @@
1
- ---
2
- name: plastic-releasing
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
- user-invocable: true
5
- ---
6
-
7
- # Releasing
8
-
9
- Merge, bump, tag, push. Annotated tags with changelogs. Semantic versioning.
10
- Project configuration drives the workflow - no hardcoded assumptions.
11
-
12
- ## Checklist
13
-
14
- - [ ] Read project config
15
- - [ ] All tests pass (or verification skipped per config)
16
- - [ ] Merge feature branch to main
17
- - [ ] Bump version in configured version files
18
- - [ ] Stable-cut guard passes (version files agree, no pre-release suffix; stable/latest cuts only)
19
- - [ ] Commit version bump
20
- - [ ] Create annotated tag
21
- - [ ] Push to remote with tags
22
- - [ ] Run post-push actions (GitHub release, npm publish, etc.)
23
- - [ ] Verify release sync (npm dist-tag, GitHub "Latest", git tag all show the new version)
24
- - [ ] Clean up the intent's worktrees (merge-then-remove)
25
- - [ ] Complete active intent
26
-
27
- ## Workflow
28
-
29
- ### 0. Read Project Config
30
-
31
- Before anything else, determine which project we are releasing and load its config.
32
-
33
- 1. Read `~/.plastic/projects.yml` - find the project whose `path` matches the current working directory.
34
- 2. Extract the project slug (the key under `projects:`).
35
- 3. Read `~/.plastic/projects/{slug}/project.yml` - this contains the `release:` section.
36
-
37
- Expected `release:` keys in project.yml:
38
-
39
- ```yaml
40
- release:
41
- verify: "bin/rails test" # command to run before release
42
- version_file: package.json # single file containing the version
43
- version_files: # multiple files (overrides version_file)
44
- - package.json # list EVERY file carrying the version;
45
- - .claude-plugin/plugin.json # they must all be bumped together or they drift
46
- - .claude-plugin/marketplace.json
47
- tag_format: "v{{version}}" # tag naming pattern ({{version}} is replaced)
48
- on_green: # actions to run after push succeeds
49
- - github_release
50
- - npm_publish
51
- on_complete: commit_and_push # what to do with the version bump commit
52
- on_red: stop # what to do if verification fails
53
- ```
54
-
55
- **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.
56
-
57
- ### 1. Verify Tests Pass
58
-
59
- Run the verification command from `release.verify` in project.yml:
60
-
61
- ```bash
62
- # Example: release.verify = "ruby -Itest test/*_test.rb"
63
- <verify-command-from-config>
64
- ```
65
-
66
- - If `release.verify` is present: run it. All checks must pass before proceeding.
67
- - If `release.verify` is absent or empty: skip verification. Log that no verify command is configured.
68
- - If `release.on_red` is `stop`: abort the release on failure.
69
- - If `release.on_red` is `fix_and_retry`: ask the user to fix and re-run.
70
-
71
- ### 2. Determine Version Bump
72
-
73
- | Change type | Bump | Example |
74
- |-------------|------|---------|
75
- | Breaking changes | Major | 0.x.0 → 1.0.0 |
76
- | New features | Minor | 0.3.0 → 0.4.0 |
77
- | Bug fixes only | Patch | 0.4.0 → 0.4.1 |
78
-
79
- Pre-1.0: minor bumps for features, patch for fixes. No major until stable.
80
-
81
- ### 3. Merge Feature Branch
82
-
83
- ```bash
84
- git checkout main
85
- git merge <branch-name> --no-ff -m "feat: merge intent [ID] - [description]"
86
- ```
87
-
88
- Always `--no-ff` to preserve branch history in the merge commit.
89
-
90
- **Worktree-isolated intents (intent 73c3).** A worktree-delivered intent's code lives on
91
- `plastic/{id}--{slug}`, merged together with cleanup in step 9, not on a hand-made feature
92
- branch. Do not delete the worktree before its branch is merged, or the work is lost. For
93
- the full rationale and the already-merged-by-hand no-op case, read
94
- `references/promotion-and-tagging.md`.
95
-
96
- ### 4. Bump Version
97
-
98
- **Stable-cut guard.** Before touching any version file for a stable (no pre-release suffix,
99
- `latest`) cut, run the guard in `scripts/lib/release_guard.rb`:
100
-
101
- ```ruby
102
- require "./scripts/lib/release_guard"
103
- result = ReleaseGuard.check(
104
- package_json: "package.json",
105
- plugin_json: ".claude-plugin/plugin.json",
106
- marketplace_json: ".claude-plugin/marketplace.json",
107
- stable: true
108
- )
109
- raise "release guard failed: #{result.mismatches} #{result.prerelease_suffix}" unless result.ok?
110
- ```
111
-
112
- If it reports a mismatch or a pre-release-suffix violation, stop and resolve it before bumping
113
- any file. For a beta or alpha cut, pass `stable: false`; only version-file agreement is checked,
114
- a pre-release suffix is expected. Read `references/release-lines.md` for the stable-line
115
- guarantees this guard protects.
116
-
117
- Determine which files to update from project.yml:
118
-
119
- - If `release.version_files` is set: update ALL listed files (they must stay in sync).
120
- - Else if `release.version_file` is set: update that single file.
121
- - Else: ask the user which files contain the version.
122
-
123
- Update the version string in each file, then commit:
124
-
125
- **Cut the CHANGELOG entry.** Before committing, edit `CHANGELOG.md` at the repo root so
126
- the changelog change rides this same version-bump commit and reaches the tag. Write one
127
- line in the existing shape:
128
-
129
- `` `<version>` - shipped <date>; collected <intent-id> (<one-line summary>) ``
130
-
131
- Prepend it as the first bullet under `## Released` (newest-first). If this version was
132
- sitting under `## Unreleased`, move it out of that section and into `## Released`. Keep
133
- the line intent-centric narrative (which intents the cut collected and why), NOT commit
134
- detail: step 5's tag-message changelog and step 7's `gh release create --generate-notes`
135
- already own the commit-level detail, so do not duplicate it here.
136
-
137
- ```bash
138
- git add <version-files> CHANGELOG.md
139
- git commit -m "chore: bump version to X.Y.Z - [one-line summary]"
140
- ```
141
-
142
- ### 5. Create Annotated Tag
143
-
144
- Read `release.tag_format` from project.yml to determine the tag name:
145
-
146
- - If set (e.g. `"v{{version}}"`): replace `{{version}}` with the new version string.
147
- - If not set: default to `vX.Y.Z`.
148
-
149
- Generate the changelog from commits since the last tag:
150
-
151
- ```bash
152
- git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-merges | grep -E "^[a-f0-9]+ (feat|fix|refactor):"
153
- ```
154
-
155
- Create the tag with a multi-line message:
156
-
157
- ```bash
158
- git tag -a <tag-name> -m "<tag-name> - [release name]
159
-
160
- - [changelog bullet points from feat/fix/refactor commits]"
161
- ```
162
-
163
- ### 6. Push
164
-
165
- ```bash
166
- git push origin main --tags
167
- ```
168
-
169
- ### 7. Post-Push Actions
170
-
171
- Read `release.on_green` from project.yml. This is a list of actions to run after a successful push. Execute each in order:
172
-
173
- #### `github_release`
174
-
175
- Create a GitHub release from the tag:
176
-
177
- ```bash
178
- gh release create <tag-name> --title "<tag-name> - [release name]" --latest --generate-notes --notes-start-tag <previous-tag>
179
- ```
180
-
181
- `--latest` is REQUIRED. Pre-release (alpha/beta) tags are NOT auto-promoted to the "Latest"
182
- badge by GitHub, so without it the Releases page keeps showing an older version as Latest while
183
- the newest tag sits below it (a real sync drift we hit on the alpha line). Pass `--latest` on
184
- every release so the newest one always carries the badge. Do NOT pass `--prerelease` unless you
185
- specifically want the release hidden from Latest.
186
-
187
- For the first release (no previous tag), write notes manually with `--notes "..."` instead.
188
-
189
- #### `npm_publish`
190
-
191
- Publish the package to npm with the appropriate dist-tag:
192
-
193
- ```bash
194
- # Alpha pre-release (version contains -alpha):
195
- npm publish --access public --tag alpha
196
-
197
- # Beta pre-release (version contains -beta):
198
- npm publish --access public --tag beta
199
-
200
- # Stable release (no pre-release suffix, >= 1.0.0):
201
- npm publish --access public
202
- ```
203
-
204
- The dist-tag is derived from the version string in `package.json`:
205
- - Contains `-alpha` → `--tag alpha`
206
- - Contains `-beta` → `--tag beta`
207
- - No pre-release suffix → no `--tag` flag (publishes to `latest`)
208
-
209
- #### `npm_publish_workflow`
210
-
211
- The tag pushed in step 6 starts the project's publish workflow (GitHub Actions, keyed on the
212
- workflow file `publish.yml`) instead of a local `npm publish`. The workflow runs with a
213
- short-lived, per-run OIDC credential, so no npm token exists in this session or on this
214
- machine.
215
-
216
- 1. **Confirm a run exists for the tag.** A tag cut from a ref that does not carry the
217
- workflow starts no run at all, and silence would read as success:
218
-
219
- ```bash
220
- gh run list --workflow publish.yml --limit 5
221
- ```
222
-
223
- 2. **Follow the run.**
224
-
225
- ```bash
226
- gh run watch <run-id>
227
- ```
228
-
229
- 3. **Verify the registry, not just the run.** The release is not done until the new version
230
- shows up on the expected channel:
231
-
232
- ```bash
233
- npm view <package> dist-tags
234
- ```
235
-
236
- The dist-tag is derived from the version string in `package.json`, the same rule
237
- `ReleaseGuard.dist_tag` implements:
238
-
239
- | Version contains | dist-tag |
240
- | --- | --- |
241
- | `-alpha` | `alpha` |
242
- | `-beta` | `beta` |
243
- | no pre-release suffix | `latest` |
244
-
245
- Do not run `npm whoami` on this path. npm documents that `whoami` does not reflect OIDC
246
- authentication, so on a workflow-published project it can only mislead.
247
-
248
- #### Other values
249
-
250
- If `on_green` contains an action not listed above, log it:
251
-
252
- ```
253
- [releasing] Action "<action>" is configured but not yet implemented. Skipping.
254
- ```
255
-
256
- If `on_green` is empty or absent: skip post-push actions entirely.
257
-
258
- #### Verify sync (always, after the post-push actions)
259
-
260
- A release is not done until all three surfaces show the SAME newest version. Confirm:
261
-
262
- ```bash
263
- npm view <package> dist-tags # channel tag (alpha/beta/latest) -> new version
264
- gh release list --limit 1 # newest release is the new tag AND marked "Latest"
265
- git ls-remote --tags origin | grep <tag-name> # the tag reached the remote
266
- ```
267
-
268
- If the GitHub "Latest" badge is on an older tag (the common drift), fix it without re-releasing:
269
-
270
- ```bash
271
- gh release edit <tag-name> --latest
272
- ```
273
-
274
- ### 8. Clean Up the Intent's Worktrees (merge-then-remove)
275
-
276
- This step now runs BEFORE step 9's `end-intent` call (intent 188, D7): `scripts/end-intent`
277
- gained its own step 5 that disarms (releases the worktree, clears `delivery.lock`) as part
278
- of every close. Its plain-remove shape does not merge, so if `end-intent` ran first on a
279
- release, its step 5 would remove the worktree WITHOUT merging the code branch first,
280
- stranding the integrated work (`Worktree.finish` returns early once the worktree block it
281
- needs is gone, per `worktree.rb`'s own "no-op if nothing was provisioned" contract).
282
- Running this merge-then-remove step first means the worktree is already gone by the time
283
- step 9 runs, so `end-intent`'s own disarm becomes a harmless no-op for the worktree
284
- (nothing left to remove), while for the FIRST time on this path it also clears the delivery
285
- lock correctly (G5): before intent 188 this path left the lock stranded, exactly the class
286
- of bug closed by the End-tail enforcement work.
287
-
288
- This is the release branch of `plastic-intent-ending`'s Step 5 disarm (`merge: true`), not a
289
- separate concern: a release is the merge-then-remove path for the intent's worktree (intent
290
- 73c3), so the intent's code branch is merged back into the default branch BEFORE the worktree
291
- is removed. Drive it through `Worktree.finish` with `merge: true`, which merges the code
292
- branch, then removes the worktree, and prunes the repo:
293
-
294
- ```bash
295
- ruby -r ~/.plastic/scripts/lib/worktree -r ~/.plastic/scripts/lib/arm -e \
296
- 'Worktree.finish(Arm.delivery(intent_dir: "<STORE>/<dir>"), merge: true)'
297
- ```
298
-
299
- (The worktree block is derived from `projects.yml` and the intent id, so the one-liner needs
300
- only the intent directory.)
301
-
302
- Honor the worktree-cleanup rule: never leave an orphaned worktree, and run `git worktree
303
- prune` in the affected repo if you hit a stale reference. For why this is the one place the
304
- merge-vs-remove policy lands on merge, and the fail-open/idempotent guarantees of `finish`,
305
- read `references/promotion-and-tagging.md`.
306
-
307
- ### 9. Complete Active Intent
308
-
309
- 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. The mechanical close (outcome/INDEX/savepoint/commit, AND disarm since intent 188) is `plastic-intent-ending`'s job, not this skill's: run its backing script rather than restating that prose here.
310
-
311
- 1. Read `~/.plastic/INDEX.md` (or the project's INDEX.md) - find active intent(s) related to this release.
312
- 2. For each active intent being delivered:
313
- a. Write a real `outcome.md` (never leave the scaffold placeholder), `disposition: delivered`, referencing the release tag.
314
- b. Update `## Insights` with final observations.
315
- c. Run the mechanical close (`scripts/end-intent`'s steps 1-5): this stamps the intent file's `## Outcome` summary, moves the INDEX.md line to `## Completed` (dated today, with a rich entry description via `--index-note`), appends the terminal savepoint line, commits the store, and disarms (releases the worktree - already gone from step 8 above - and clears `delivery.lock`), all in one call:
316
- ```bash
317
- ruby ~/.plastic/scripts/end-intent --store <store_path> --id <ID> --disposition delivered \
318
- --session "$CLAUDE_CODE_SESSION_ID" \
319
- --outcome-summary "delivered in <tag-name>: <one-line summary>" \
320
- --index-note "<tag-name>, <mode>; <what shipped>; <suite result>"
321
- ```
322
- A non-zero exit needs attention: 4 means a live foreign session holds the lock (back
323
- off), 5 means the code worktree is still dirty (should not happen here, since step 8
324
- already removed it; investigate before overriding with `--discard-worktree-changes`),
325
- 3 means disarm ran but the lock is still present (run `/plastic-doctor check the lock
326
- status`).
327
- d. Update clusters to show `_(completed)_`.
328
-
329
- **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.
330
-
331
- ## Release lines and channels
332
-
333
- Two lanes get code to a release, on top of the workflow above.
334
-
335
- - **Default lane.** Branch, merge to main, cut stable, publish to npm `latest`. This is the
336
- workflow in the steps above, unchanged. Use it for additive, suite-verifiable,
337
- low-blast-radius work.
338
- - **Beta-verified lane.** Branch, merge to `beta`, publish to the npm `beta` channel, verify in
339
- real use, then merge to main and cut stable. Use it for work that changes operational
340
- substrate, or carries data, migration, lock, or state-format risk, or that a hermetic suite
341
- cannot fully validate on its own.
342
-
343
- **Stable-line guarantees.** An external `latest` user can rely on:
344
-
345
- - `main` is always green and releasable; no pending revert awaiting re-land sits on `main`.
346
- - A stable release carries no pre-release suffix, publishes to `latest`, and the newest release
347
- always carries the GitHub "Latest" badge.
348
- - The three version files always agree, checked by `scripts/lib/release_guard.rb` (see Bump
349
- Version above).
350
- - A stable cut collects only intents that cleared their lane's verification bar.
351
- - Channel semantics are fixed: `latest` is stable, `beta` is the verification line, `alpha` is
352
- experimental.
353
-
354
- Read `references/release-lines.md` for the full lane-routing detail, the version-line map, and
355
- the intent-41 re-land playbook.
356
-
357
- ## Conventions
358
-
359
- - **Annotated tags only** - `git tag -a`, never lightweight tags
360
- - **Tag format** - driven by `release.tag_format` in project.yml (default: `vX.Y.Z`)
361
- - **Tag message** - first line: `<tag> - [short name]`, then blank line, then bullet changelog
362
- - **Commit prefixes** - `feat:`, `fix:`, `refactor:`, `chore:`, `docs:` (conventional commits)
363
- - **Hyphens, never em-dashes** - in tag names, release titles, and commit messages, use a hyphen (`-`). Never an em-dash.
364
- - **Latest badge** - always `gh release create --latest`; the newest release must carry GitHub's "Latest" badge.
365
- - **Version files** - driven by project.yml; list and bump EVERY file carrying the version (they drift otherwise)
366
- - **Verify sync** - after pushing, confirm npm dist-tag, GitHub "Latest", and the git tag all show the new version
367
- - **Branch cleanup** - delete merged feature branches: `git branch -d <branch>`
368
-
369
- ## References
370
-
371
- - Read `references/release-lines.md` for the two release lanes, the stable-line guarantees,
372
- the version-line map, and the intent-41 re-land playbook before starting any release
373
- - When promoting a pre-release across channels (alpha to beta, beta to stable) or
374
- tagging a historical release retroactively, read `references/promotion-and-tagging.md`
375
- for the exact commands and rules first
376
- - Read `references/deprecations.md` for the full deprecation process, severity levels, deprecations.yml schema, and dismissal rules when adding or managing deprecations
@@ -1,60 +0,0 @@
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.
@@ -1,70 +0,0 @@
1
- # Promotion, Retroactive Tagging, and Worktree Merge Rationale
2
-
3
- Occasional variant paths off the main release workflow: promoting a pre-release
4
- across channels, tagging historical releases retroactively, and the deep rationale
5
- for why the intent's worktree is merged before removal.
6
-
7
- ## Table of Contents
8
-
9
- - [Worktree merge-then-remove rationale](#worktree-merge-then-remove-rationale)
10
- - [Promotion](#promotion)
11
- - [Retroactive Tagging](#retroactive-tagging)
12
-
13
- ## Worktree merge-then-remove rationale
14
-
15
- **Worktree-isolated intents (intent 73c3).** When the intent was delivered in a Plastic
16
- worktree (the delivery lock has a provisioned `worktree` block), its code lives on the branch
17
- `plastic/{id}--{slug}` inside `<repo>/.claude/worktrees/{id}--{slug}`, not on a hand-made
18
- feature branch. The merge-then-remove of that worktree is handled together with cleanup in
19
- Workflow step 9, which merges `plastic/{id}--{slug}` into the default branch BEFORE removing the
20
- worktree. If you already merged here by hand, step 9 is a clean no-op merge ("Already up to
21
- date") and proceeds straight to removal. Do not delete the worktree before its branch is
22
- merged, or the work is lost.
23
-
24
- A release is the merge-then-remove path for the intent's worktrees. This is the one place
25
- the merge-vs-remove policy lands on "merge": the intent's code branch (`plastic/{id}--{slug}`)
26
- is merged back into the repo's default branch BEFORE the worktree is removed, so the
27
- integrated work is never lost. (The disarm path in `plastic-auto`, by contrast, is a plain
28
- remove because no release is merging the branch.)
29
-
30
- `Worktree.finish` is fail-open and idempotent: a conflicting merge is aborted and logged (the
31
- worktree is still removed rather than stranded), and a second call with the block already
32
- cleared is a no-op.
33
-
34
- ## Promotion
35
-
36
- Promotion is not a CLI flag; there is no `--promote` command. It is a set of steps the
37
- agent performs during the releasing workflow, reusing the normal release mechanics (version
38
- bump, tag, GitHub release). For a project on the `npm_publish_workflow` post-push action,
39
- the tag push itself starts the publish; there is no local publish command to run.
40
-
41
- ```bash
42
- # Promote alpha → beta: set version files from -alpha.N to -beta.1, commit, tag, push.
43
- # The publish workflow reads the new version and publishes to the beta dist-tag.
44
-
45
- # Promote beta → stable: strip the pre-release suffix (e.g., 1.0.0-beta.3 → 1.0.0),
46
- # commit, tag, push. The publish workflow reads the new version and publishes to latest.
47
- ```
48
-
49
- A project still on the `npm_publish` action (publishing locally from the session) runs
50
- `npm publish --access public --tag <channel>` at this point instead, per that action's own
51
- section in SKILL.md.
52
-
53
- **Promotion rules:**
54
- - Linear only: alpha → beta → stable. Cannot skip channels.
55
- - Version files are bumped and committed as in a normal release.
56
- - An annotated tag is created for the promoted version, and the GitHub release is cut
57
- as in the normal workflow (`gh release create ... --latest` for stable).
58
- - To point a channel at an already-published version without republishing, move the
59
- dist-tag directly: `npm dist-tag add @zalom/plastic@<version> <channel>`. To move the
60
- GitHub "Latest" badge: `gh release edit <tag> --latest`.
61
-
62
- ## Retroactive Tagging
63
-
64
- For repos without prior tags, tag historical releases:
65
-
66
- ```bash
67
- git tag -a v0.1.0 <commit-sha> -m "v0.1.0 - [description]"
68
- ```
69
-
70
- Use `git log --oneline` to find the right commits (look for version bump commits or major feature merges).