@zalom/plastic 1.0.0-alpha.9 → 1.0.0-beta.10

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 (115) hide show
  1. package/PLASTIC.md +170 -469
  2. package/README.md +95 -58
  3. package/agents/plastic-brainstorming.md +45 -0
  4. package/agents/plastic-enforcer.md +36 -0
  5. package/agents/plastic-executor.md +47 -0
  6. package/agents/{future-intent-researcher.md → plastic-future-intent-researcher.md} +1 -1
  7. package/agents/{intent-curator.md → plastic-intent-curator.md} +8 -6
  8. package/agents/plastic-planner.md +47 -0
  9. package/agents/plastic-spec-specialist.md +45 -0
  10. package/bin/plastic.js +57 -0
  11. package/bin/test +28 -0
  12. package/deprecations.yml +1 -10
  13. package/hooks/auto-arm +5 -0
  14. package/hooks/bash-gate +3 -0
  15. package/hooks/check-update +12 -8
  16. package/hooks/code-gate +12 -0
  17. package/hooks/create-gate +3 -0
  18. package/hooks/gate-check +3 -1
  19. package/hooks/hooks.json +52 -0
  20. package/hooks/qmd-search +8 -0
  21. package/hooks/statusline +150 -41
  22. package/package.json +2 -2
  23. package/scripts/agent-report +142 -0
  24. package/scripts/dashboard.rb +687 -0
  25. package/scripts/doctor.rb +1219 -621
  26. package/scripts/hook-auto-arm +51 -0
  27. package/scripts/hook-bash-gate +41 -0
  28. package/scripts/hook-code-gate +27 -0
  29. package/scripts/hook-continue +15 -114
  30. package/scripts/hook-create-gate +59 -0
  31. package/scripts/hook-gate-check +47 -32
  32. package/scripts/hook-qmd-search +44 -0
  33. package/scripts/hook-session-start +106 -38
  34. package/scripts/install.rb +91 -529
  35. package/scripts/lib/boot_banner.rb +28 -0
  36. package/scripts/lib/bridge.rb +452 -19
  37. package/scripts/lib/frontmatter_writer.rb +130 -0
  38. package/scripts/lib/graph_rebuild.rb +328 -0
  39. package/scripts/lib/installer_core.rb +812 -0
  40. package/scripts/lib/intent_validator.rb +235 -0
  41. package/scripts/lib/links_projection.rb +160 -0
  42. package/scripts/lib/links_section.rb +207 -0
  43. package/scripts/lib/power_tools.rb +76 -0
  44. package/scripts/lib/qmd_hook.rb +57 -0
  45. package/scripts/lib/qmd_sync.rb +230 -0
  46. package/scripts/lib/store_provisioning.rb +100 -0
  47. package/scripts/migrate-to-global +1 -1
  48. package/scripts/new-intent +327 -0
  49. package/scripts/project-links +287 -0
  50. package/scripts/provision-project-store +53 -0
  51. package/scripts/qmd-sync +139 -0
  52. package/scripts/rebuild-graph +244 -0
  53. package/scripts/select-update-target +93 -0
  54. package/scripts/spawn-preamble +138 -0
  55. package/scripts/uninstall.rb +53 -0
  56. package/scripts/update.rb +164 -0
  57. package/scripts/validate-intent +54 -0
  58. package/scripts/versions.rb +141 -0
  59. package/skills/_active-intent-gate.md +1 -1
  60. package/skills/add-project-store/SKILL.md +54 -0
  61. package/skills/auto/SKILL.md +87 -7
  62. package/skills/auto/evals/evals.json +255 -0
  63. package/skills/auto/references/agent-architecture.md +155 -0
  64. package/skills/auto/references/agent-report-contract.md +86 -0
  65. package/skills/brainstorming/SKILL.md +10 -9
  66. package/skills/brainstorming/evals/evals.json +22 -0
  67. package/skills/brainstorming-grill-me/SKILL.md +6 -6
  68. package/skills/continuing/SKILL.md +99 -82
  69. package/skills/continuing/evals/evals.json +145 -0
  70. package/skills/continuing/references/context-management.md +32 -0
  71. package/skills/creating-intent/SKILL.md +82 -36
  72. package/skills/creating-intent/evals/evals.json +72 -0
  73. package/skills/creating-intent/references/lifecycle.md +81 -0
  74. package/skills/creating-intent/references/wikilinks.md +8 -0
  75. package/skills/creating-project/SKILL.md +40 -8
  76. package/skills/creating-project/references/hubs-projects.md +55 -0
  77. package/skills/dashboard/SKILL.md +126 -0
  78. package/skills/dashboard/evals/evals.json +22 -0
  79. package/skills/dashboard/templates/dashboard-global.md +31 -0
  80. package/skills/dashboard/templates/dashboard-project.md +40 -0
  81. package/skills/doctor/SKILL.md +51 -4
  82. package/skills/doctor/references/gates-stuck-detection.md +38 -0
  83. package/skills/doctor/report.md +4 -0
  84. package/skills/evaluating-skills/SKILL.md +140 -0
  85. package/skills/evaluating-skills/assets/eval-template.json +12 -0
  86. package/skills/evaluating-skills/evals/evals.json +75 -0
  87. package/skills/evaluating-skills/references/convention-checks.md +76 -0
  88. package/skills/evaluating-skills/references/eval-methodology.md +154 -0
  89. package/skills/executing-plan/SKILL.md +5 -3
  90. package/skills/install/SKILL.md +69 -8
  91. package/skills/intent-curator/SKILL.md +6 -4
  92. package/skills/intent-curator/evals/evals.json +22 -0
  93. package/skills/linking-intents/SKILL.md +22 -7
  94. package/skills/linking-intents/evals/evals.json +22 -0
  95. package/skills/linking-intents/references/zettelkasten.md +45 -0
  96. package/skills/managing-index/SKILL.md +11 -1
  97. package/skills/managing-index/evals/evals.json +22 -0
  98. package/skills/managing-index/references/zettelkasten-linking.md +7 -2
  99. package/skills/releasing/SKILL.md +80 -23
  100. package/skills/releasing/references/deprecations.md +60 -0
  101. package/skills/research/SKILL.md +10 -2
  102. package/skills/research/evals/evals.json +22 -0
  103. package/skills/savepoint/SKILL.md +46 -37
  104. package/skills/savepoint/references/context-management.md +32 -0
  105. package/skills/uninstall/SKILL.md +39 -28
  106. package/skills/update/SKILL.md +41 -44
  107. package/skills/versions/SKILL.md +65 -0
  108. package/skills/writing-instructions/SKILL.md +159 -0
  109. package/skills/writing-instructions/references/agentskills-spec.md +135 -0
  110. package/skills/writing-plans/SKILL.md +5 -5
  111. package/templates/agents.md +7 -7
  112. package/templates/outcome.md +13 -0
  113. package/templates/savepoint.md +14 -13
  114. package/templates/spec.md +25 -0
  115. package/bin/install.js +0 -29
@@ -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
 
@@ -21,13 +21,13 @@ Explicit wikilinks in the `## Links` section. Bidirectional — add to both inte
21
21
  ```
22
22
 
23
23
  ### 2. Sources (Backward)
24
- The `sources` array in frontmatter. What influenced this intent — backward links to parent/prior work:
24
+ The `sources` array in frontmatter. The direct ascendant(s) this intent was created from / emerged from the lifecycle of (formation, not topic similarity), backward links to the work it was built out of:
25
25
  ```yaml
26
26
  sources: ["1a", "1a2"]
27
27
  ```
28
28
 
29
29
  ### 3. Chain (Forward)
30
- The `chain` array in frontmatter. What this intent spawned — forward links to children/follow-on work:
30
+ The `chain` array in frontmatter. What this intent spawned AND related-but-not-spawned successors it leads to, forward links to children, follow-on, and related work:
31
31
  ```yaml
32
32
  chain: ["1b1", "1b2"]
33
33
  ```
@@ -41,6 +41,12 @@ tags: [plastic, project-reddit-kb]
41
41
  ## Workflow
42
42
 
43
43
  ### 1. Identify Intents to Connect
44
+
45
+ QMD-first (when available): before scanning the store with grep/Read, run
46
+ `ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to surface candidate, prior, or related
47
+ intents to propose as sources/chain, then open the authoritative intent file for any hit you act
48
+ on. The command is a no-op when QMD is absent, so fall back to the directory scan below.
49
+
44
50
  Show existing intents by scanning the store's directory for intent files:
45
51
  ```bash
46
52
  for dir in $STORE_ROOT/store/*/; do
@@ -55,18 +61,27 @@ done
55
61
 
56
62
  ### 2. Choose Connection Type
57
63
  Ask the user which type of connection:
58
- - **source** — "this was influenced by that" (add to `sources[]`, update `chain[]` on the target)
59
- - **cross-reference** — "these are related" (add wikilink in `## Links` of both intents)
64
+ - **source**: "this was CREATED FROM that" (D1). The reciprocal update is one-directional (I1): add the ascendant id to this intent's `sources[]` AND add this intent's id to the ascendant's `chain[]`. A merely-related (not-created-from) connection is NOT a source: record it on the predecessor's `chain[]` only, plus a `## Links` wikilink, with NO `sources` (the related-but-not-spawned rule).
65
+ - **cross-reference**: "these are related" (add wikilink in `## Links` of both intents)
60
66
 
61
67
  ### 3. Apply Connection
62
68
 
63
- **For sources:**
64
- Update frontmatter arrays on both intents:
69
+ **For sources (a true created-from edge only):**
70
+ Update frontmatter arrays on both intents (I1, two-sided):
65
71
  - Add the parent's ID to the child's `sources` array
66
72
  - Add the child's ID to the parent's `chain` array
67
73
 
74
+ For the merely-related case, only the predecessor's `chain` (and both sides' `## Links`)
75
+ get the link, never `sources`. `chain` is NOT strictly the reverse of `sources` (I2):
76
+ relational `chain` entries are valid and must never be "corrected" by adding a reciprocal
77
+ `sources`.
78
+
68
79
  **For cross-references:**
69
80
  Add a wikilink in the `## Links` section of **both** intents (bidirectional).
70
81
 
71
82
  ### 4. Update INDEX.md Clusters
72
83
  If both intents share a topic, ensure they're in the same cluster.
84
+
85
+ ## References
86
+
87
+ - 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,22 @@
1
+ {
2
+ "skill_name": "plastic-linking-intents",
3
+ "notes": "Intent 66a. Spec for the QMD-first discovery step (surface candidate/related intents to propose as sources/chain before grep/Read). Runner is intent 76; this case is a spec, not executed.",
4
+ "evals": [
5
+ {
6
+ "id": 1,
7
+ "scope": "behavior",
8
+ "set": "validation",
9
+ "prompt": "QMD is present. The user says: link this intent to the related upload-pipeline work.",
10
+ "expected_output": "Before scanning the store directory with grep/Read to identify related intents, runs `ruby ~/.plastic/scripts/qmd-sync search \"upload pipeline\"` to surface candidate or related intents to propose as sources/chain, then opens the authoritative intent file for any hit it links. No-op fallback to the directory scan when QMD is absent.",
11
+ "files": [],
12
+ "assertions": [
13
+ {
14
+ "type": "human",
15
+ "check": "qmd-sync search is run before the directory scan; authoritative file opened for any hit before proposing sources/chain",
16
+ "observed": "SKILL.md (or agent file) carries the QMD-first step: run qmd-sync search before grep/Read, then open the authoritative file; no-op fallback when QMD is absent",
17
+ "result": "pass"
18
+ }
19
+ ]
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,45 @@
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
+ `## Links` mirrors the frontmatter graph exactly. Each entry is
14
+ `- [[id--slug|<target's full intent: text>]]` (cross-store: `- [[store:id--slug|...]]`),
15
+ a clickable `id--slug` target with the target's full `intent:` text as the label.
16
+ Ordering is mandatory: all `sources` first (top), then all `chain`, frontmatter order
17
+ preserved within each group. Sources never appear at the end. No source/chain tags, no
18
+ sub-grouping. An intent with empty `sources` and `chain` carries the empty-state comment.
19
+
20
+ ## Folgezettel IDs
21
+
22
+ IDs encode lineage using Luhmann's alternating convention:
23
+ - Root intents: sequential numbers (`1`, `2`, `3`...)
24
+ - Branches alternate letters and numbers: `1` → `1a` → `1a1` → `1a1a` → ...
25
+ - Multiple branches from the same parent increment: `1a`, `1b`, `1c`
26
+ - IDs are assigned at creation time and never change
27
+
28
+ ## Knowledge Graph
29
+
30
+ `sources` and `chain` form the directed knowledge graph:
31
+ - `sources` = the direct ascendant(s) this intent was created from / emerged from the
32
+ lifecycle of (formation, not topic similarity); a DAG (acyclic), strong must-load context.
33
+ - `chain` = forward continuations AND related-but-not-spawned successors it leads to; a
34
+ directed graph that may cycle, lighter contributory context.
35
+ - Reciprocity is one-directional: every `sources` edge has a reciprocal `chain` entry (I1),
36
+ but `chain` may carry relational entries with no reciprocal `sources` (I2), so the graph is
37
+ NOT strictly double-linked.
38
+
39
+ ## Dual-Mode
40
+
41
+ This store works in two modes without modification:
42
+ - **Obsidian** (human, offline) — browse, link, write markdown
43
+ - **Programmatic** (any agent) — read/write via filesystem operations
44
+
45
+ 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
 
@@ -43,6 +43,12 @@ All completed intents with dates. Links preserved, never deleted.
43
43
 
44
44
  ## Workflow
45
45
 
46
+ QMD-first (when available): when you need to locate a specific intent (to reclassify, flag, or
47
+ cluster it) rather than rebuild every section, before scanning the store with grep/Read run
48
+ `ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to surface candidate or related intents, then
49
+ open the authoritative intent file for any hit you act on. The command is a no-op when QMD is
50
+ absent, so fall back to the directory scan below.
51
+
46
52
  ### Rebuild Sections
47
53
  Scan the active store's `store/` directory for intent files and rebuild each section:
48
54
 
@@ -64,3 +70,7 @@ When 3+ intents share tags but aren't in a cluster, suggest a new cluster headin
64
70
  Intents with no links (empty `sources`, empty `chain`, no `## Links` entries, not in any cluster) should be flagged for curation.
65
71
 
66
72
  REQUIRED BACKGROUND: linking-intents (for understanding connection types and Zettelkasten theory)
73
+
74
+ ## References
75
+
76
+ - Read `references/zettelkasten-linking.md` for the three structural layers (Folgezettel, directed graph, tags) and how they map to INDEX.md organization
@@ -0,0 +1,22 @@
1
+ {
2
+ "skill_name": "plastic-managing-index",
3
+ "notes": "Intent 66a. Spec for the QMD-first step when locating a specific intent to reclassify/flag/cluster before grep/Read. Runner is intent 76; spec only.",
4
+ "evals": [
5
+ {
6
+ "id": 1,
7
+ "scope": "behavior",
8
+ "set": "validation",
9
+ "prompt": "QMD is present. The user says: move the intent about the statusline into the Completed section.",
10
+ "expected_output": "When locating one specific intent rather than rebuilding every section, before scanning the store with grep/Read runs `ruby ~/.plastic/scripts/qmd-sync search \"statusline\"` to surface the candidate intent, then opens the authoritative intent file for the hit it reclassifies. No-op fallback to the directory scan when QMD is absent.",
11
+ "files": [],
12
+ "assertions": [
13
+ {
14
+ "type": "human",
15
+ "check": "qmd-sync search is run before the directory scan when locating a specific intent; authoritative file opened for the hit",
16
+ "observed": "SKILL.md (or agent file) carries the QMD-first step: run qmd-sync search before grep/Read, then open the authoritative file; no-op fallback when QMD is absent",
17
+ "result": "pass"
18
+ }
19
+ ]
20
+ }
21
+ ]
22
+ }
@@ -8,8 +8,13 @@
8
8
 
9
9
  ## Three Connection Types (Ranked)
10
10
 
11
- 1. **Direct links** (strongest) — wikilinks in `## Links` section
12
- 2. **Sources/Chain** (knowledge graph) — `sources` array (backward), `chain` array (forward) in frontmatter
11
+ 1. **Direct links** (strongest): wikilinks in the `## Links` section, the projection of the
12
+ frontmatter graph. Each entry is `- [[id--slug|<target's full intent: text>]]` (cross-store:
13
+ `- [[store:id--slug|...]]`), a clickable `id--slug` target labeled with the target's full
14
+ `intent:` text. Ordering is mandatory: all `sources` first (top), then all `chain`,
15
+ frontmatter order preserved within each group. Sources never appear at the end. No
16
+ source/chain tags, no sub-grouping.
17
+ 2. **Sources/Chain** (knowledge graph): `sources` = direct ascendants this was created from (formation, acyclic, must-load); `chain` = forward continuations and related successors (may cycle, lighter context). See `docs/concepts/how-plastic-sources-and-chains-intents.md` for the full model.
13
18
  3. **Tags** (weakest) — shared tags, `project-<name>` for project membership
14
19
 
15
20
  ## When to Create a Cluster
@@ -1,12 +1,12 @@
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
+ Project configuration drives the workflow - no hardcoded assumptions.
10
10
 
11
11
  ## Checklist
12
12
 
@@ -18,6 +18,7 @@ Project configuration drives the workflow — no hardcoded assumptions.
18
18
  - [ ] Create annotated tag
19
19
  - [ ] Push to remote with tags
20
20
  - [ ] Run post-push actions (GitHub release, npm publish, etc.)
21
+ - [ ] Verify release sync (npm dist-tag, GitHub "Latest", git tag all show the new version)
21
22
  - [ ] Complete active intent
22
23
 
23
24
  ## Workflow
@@ -26,9 +27,9 @@ Project configuration drives the workflow — no hardcoded assumptions.
26
27
 
27
28
  Before anything else, determine which project we are releasing and load its config.
28
29
 
29
- 1. Read `~/.plastic/projects.yml` — find the project whose `path` matches the current working directory.
30
+ 1. Read `~/.plastic/projects.yml` - find the project whose `path` matches the current working directory.
30
31
  2. Extract the project slug (the key under `projects:`).
31
- 3. Read `~/.plastic/projects/{slug}/project.yml` — this contains the `release:` section.
32
+ 3. Read `~/.plastic/projects/{slug}/project.yml` - this contains the `release:` section.
32
33
 
33
34
  Expected `release:` keys in project.yml:
34
35
 
@@ -37,8 +38,9 @@ release:
37
38
  verify: "bin/rails test" # command to run before release
38
39
  version_file: package.json # single file containing the version
39
40
  version_files: # multiple files (overrides version_file)
40
- - package.json
41
- - .claude-plugin/plugin.json
41
+ - package.json # list EVERY file carrying the version;
42
+ - .claude-plugin/plugin.json # they must all be bumped together or they drift
43
+ - .claude-plugin/marketplace.json
42
44
  tag_format: "v{{version}}" # tag naming pattern ({{version}} is replaced)
43
45
  on_green: # actions to run after push succeeds
44
46
  - github_release
@@ -47,7 +49,7 @@ release:
47
49
  on_red: stop # what to do if verification fails
48
50
  ```
49
51
 
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.
52
+ **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
53
 
52
54
  ### 1. Verify Tests Pass
53
55
 
@@ -77,7 +79,7 @@ Pre-1.0: minor bumps for features, patch for fixes. No major until stable.
77
79
 
78
80
  ```bash
79
81
  git checkout main
80
- git merge <branch-name> --no-ff -m "feat: merge intent [ID] — [description]"
82
+ git merge <branch-name> --no-ff -m "feat: merge intent [ID] - [description]"
81
83
  ```
82
84
 
83
85
  Always `--no-ff` to preserve branch history in the merge commit.
@@ -94,7 +96,7 @@ Update the version string in each file, then commit:
94
96
 
95
97
  ```bash
96
98
  git add <version-files>
97
- git commit -m "chore: bump version to X.Y.Z — [one-line summary]"
99
+ git commit -m "chore: bump version to X.Y.Z - [one-line summary]"
98
100
  ```
99
101
 
100
102
  ### 5. Create Annotated Tag
@@ -113,7 +115,7 @@ git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-merges | grep -E
113
115
  Create the tag with a multi-line message:
114
116
 
115
117
  ```bash
116
- git tag -a <tag-name> -m "<tag-name> — [release name]
118
+ git tag -a <tag-name> -m "<tag-name> - [release name]
117
119
 
118
120
  - [changelog bullet points from feat/fix/refactor commits]"
119
121
  ```
@@ -133,23 +135,37 @@ Read `release.on_green` from project.yml. This is a list of actions to run after
133
135
  Create a GitHub release from the tag:
134
136
 
135
137
  ```bash
136
- gh release create <tag-name> --title "<tag-name> — [release name]" --generate-notes --notes-start-tag <previous-tag>
138
+ gh release create <tag-name> --title "<tag-name> - [release name]" --latest --generate-notes --notes-start-tag <previous-tag>
137
139
  ```
138
140
 
141
+ `--latest` is REQUIRED. Pre-release (alpha/beta) tags are NOT auto-promoted to the "Latest"
142
+ badge by GitHub, so without it the Releases page keeps showing an older version as Latest while
143
+ the newest tag sits below it (a real sync drift we hit on the alpha line). Pass `--latest` on
144
+ every release so the newest one always carries the badge. Do NOT pass `--prerelease` unless you
145
+ specifically want the release hidden from Latest.
146
+
139
147
  For the first release (no previous tag), write notes manually with `--notes "..."` instead.
140
148
 
141
149
  #### `npm_publish`
142
150
 
143
- Publish the package to npm:
151
+ Publish the package to npm with the appropriate dist-tag:
144
152
 
145
153
  ```bash
146
- # For pre-release versions (0.x.y, or version contains -alpha/-beta/-rc):
154
+ # Alpha pre-release (version contains -alpha):
147
155
  npm publish --access public --tag alpha
148
156
 
149
- # For stable versions (>= 1.0.0, no pre-release suffix):
157
+ # Beta pre-release (version contains -beta):
158
+ npm publish --access public --tag beta
159
+
160
+ # Stable release (no pre-release suffix, >= 1.0.0):
150
161
  npm publish --access public
151
162
  ```
152
163
 
164
+ The dist-tag is derived from the version string in `package.json`:
165
+ - Contains `-alpha` → `--tag alpha`
166
+ - Contains `-beta` → `--tag beta`
167
+ - No pre-release suffix → no `--tag` flag (publishes to `latest`)
168
+
153
169
  #### Other values
154
170
 
155
171
  If `on_green` contains an action not listed above, log it:
@@ -160,6 +176,22 @@ If `on_green` contains an action not listed above, log it:
160
176
 
161
177
  If `on_green` is empty or absent: skip post-push actions entirely.
162
178
 
179
+ #### Verify sync (always, after the post-push actions)
180
+
181
+ A release is not done until all three surfaces show the SAME newest version. Confirm:
182
+
183
+ ```bash
184
+ npm view <package> dist-tags # channel tag (alpha/beta/latest) -> new version
185
+ gh release list --limit 1 # newest release is the new tag AND marked "Latest"
186
+ git ls-remote --tags origin | grep <tag-name> # the tag reached the remote
187
+ ```
188
+
189
+ If the GitHub "Latest" badge is on an older tag (the common drift), fix it without re-releasing:
190
+
191
+ ```bash
192
+ gh release edit <tag-name> --latest
193
+ ```
194
+
163
195
  ### 8. Complete Active Intent
164
196
 
165
197
  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.
@@ -171,25 +203,50 @@ A release IS a delivery. The active intent that drove this work must be complete
171
203
  c. Update `## Insights` with final observations
172
204
  d. Move from `## Active` to `## Completed` in INDEX.md (with today's date)
173
205
  e. Update clusters to show `_(completed)_`
174
- 3. Auto-commit: `cd ~/.plastic && git add . && git commit -m "feat: complete intent <ID> — delivered in <tag-name>"`
206
+ 3. Auto-commit: `cd ~/.plastic && git add . && git commit -m "feat: complete intent <ID> - delivered in <tag-name>"`
175
207
 
176
- **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.
208
+ **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.
177
209
 
178
210
  ## Conventions
179
211
 
180
- - **Annotated tags only** — `git tag -a`, never lightweight tags
181
- - **Tag format** — driven by `release.tag_format` in project.yml (default: `vX.Y.Z`)
182
- - **Tag message** — first line: `<tag> — [short name]`, then blank line, then bullet changelog
183
- - **Commit prefixes** — `feat:`, `fix:`, `refactor:`, `chore:`, `docs:` (conventional commits)
184
- - **Version files** — driven by project.yml; all listed files must always match
185
- - **Branch cleanup** — delete merged feature branches: `git branch -d <branch>`
212
+ - **Annotated tags only** - `git tag -a`, never lightweight tags
213
+ - **Tag format** - driven by `release.tag_format` in project.yml (default: `vX.Y.Z`)
214
+ - **Tag message** - first line: `<tag> - [short name]`, then blank line, then bullet changelog
215
+ - **Commit prefixes** - `feat:`, `fix:`, `refactor:`, `chore:`, `docs:` (conventional commits)
216
+ - **Hyphens, never em-dashes** - in tag names, release titles, and commit messages, use a hyphen (`-`). Never an em-dash.
217
+ - **Latest badge** - always `gh release create --latest`; the newest release must carry GitHub's "Latest" badge.
218
+ - **Version files** - driven by project.yml; list and bump EVERY file carrying the version (they drift otherwise)
219
+ - **Verify sync** - after pushing, confirm npm dist-tag, GitHub "Latest", and the git tag all show the new version
220
+ - **Branch cleanup** - delete merged feature branches: `git branch -d <branch>`
221
+
222
+ ## Promotion
223
+
224
+ To promote a release across channels, use `--promote`:
225
+
226
+ ```bash
227
+ plastic-releasing --promote beta # promotes current alpha → beta
228
+ plastic-releasing --promote stable # promotes current beta → stable
229
+ ```
230
+
231
+ **Promotion rules:**
232
+ - Linear only: alpha → beta → stable. Cannot skip channels.
233
+ - `--promote beta`: reads version from `package.json`, changes `-alpha.N` suffix
234
+ to `-beta.1`, publishes with `--tag beta`.
235
+ - `--promote stable`: reads version from `package.json`, strips pre-release suffix
236
+ entirely (e.g., `1.0.0-beta.3` → `1.0.0`), publishes to `latest`.
237
+ - Version files are bumped and committed as in a normal release.
238
+ - An annotated tag is created for the promoted version.
186
239
 
187
240
  ## Retroactive Tagging
188
241
 
189
242
  For repos without prior tags, tag historical releases:
190
243
 
191
244
  ```bash
192
- git tag -a v0.1.0 <commit-sha> -m "v0.1.0 — [description]"
245
+ git tag -a v0.1.0 <commit-sha> -m "v0.1.0 - [description]"
193
246
  ```
194
247
 
195
248
  Use `git log --oneline` to find the right commits (look for version bump commits or major feature merges).
249
+
250
+ ## References
251
+
252
+ - 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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plastic:research
2
+ name: plastic-research
3
3
  description: "Research a topic for the active intent. Agent decides shallow vs deep based on scope. Produces reports in the intent's resources/ directory."
4
4
  ---
5
5
 
@@ -14,9 +14,17 @@ Investigate a topic related to the active intent. Choose the right depth, produc
14
14
  Before proceeding, resolve the active intent:
15
15
 
16
16
  1. **Detect store:** Read `~/.plastic/projects.yml`, match CWD against registered project paths. If match → project store at `~/.plastic/projects/{slug}/store/`. If no match → global store at `~/.plastic/store/`.
17
- 2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic:creating-intent"
17
+ 2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic-creating-intent"
18
18
  3. **Resolve intent directory:** `{store}/store/{id}--{slug}/`
19
19
 
20
+ ## Check Prior Work First
21
+
22
+ QMD-first (when available): before scanning the store with grep/Read or searching the web, run
23
+ `ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to surface candidate, prior, or related intents
24
+ and existing research, then open the authoritative intent file for any hit you act on. Reusing a
25
+ prior report beats re-deriving it. The command is a no-op when QMD is absent, so fall back to the
26
+ existing INDEX.md / file scan.
27
+
20
28
  ## Depth Decision
21
29
 
22
30
  Before starting research, assess the question against these criteria:
@@ -0,0 +1,22 @@
1
+ {
2
+ "skill_name": "plastic-research",
3
+ "notes": "Intent 66a. Spec for the QMD-first step before researching (reuse prior intents/reports before grep/Read or web search). Runner is intent 76; spec only.",
4
+ "evals": [
5
+ {
6
+ "id": 1,
7
+ "scope": "behavior",
8
+ "set": "validation",
9
+ "prompt": "QMD is present. The user asks the agent to research installer patterns for the active intent.",
10
+ "expected_output": "Before scanning the store with grep/Read or searching the web, runs `ruby ~/.plastic/scripts/qmd-sync search \"installer patterns\"` to surface candidate, prior, or related intents and existing research, then opens the authoritative intent file for any hit it reuses. No-op fallback to INDEX.md / file scan when QMD is absent.",
11
+ "files": [],
12
+ "assertions": [
13
+ {
14
+ "type": "human",
15
+ "check": "qmd-sync search is run before grep/Read and web search; authoritative file opened for any prior report reused",
16
+ "observed": "SKILL.md (or agent file) carries the QMD-first step: run qmd-sync search before grep/Read, then open the authoritative file; no-op fallback when QMD is absent",
17
+ "result": "pass"
18
+ }
19
+ ]
20
+ }
21
+ ]
22
+ }
@@ -1,57 +1,66 @@
1
1
  ---
2
- name: plastic:savepoint
3
- description: Use when context is being compacted (PreCompact hook), user says "save" or "savepoint", or before ending a session. Saves the active intent's state so work can resume after /clear.
2
+ name: plastic-savepoint
3
+ description: Use when verifying or repairing an intent's savepoint ledger, when the user says "save" or "savepoint", or when a PreCompact hook fires. The ledger is written automatically by the gate hook at each lifecycle boundary; this skill only reads, verifies, and rebuilds it.
4
4
  ---
5
5
 
6
6
  # Savepoint
7
7
 
8
- ## When to Use
9
- - PreCompact hook fires (automatic)
10
- - User says "save", "savepoint", or "save progress"
11
- - Before ending a long session
12
- - Before switching to a different intent
8
+ `savepoint.md` is a deterministic, append-only ledger of an intent's cycle steps, one line
9
+ per lifecycle milestone, newest at the bottom:
13
10
 
14
- ## Workflow
11
+ ```
12
+ 2026-06-16T14:02Z What 34--cycle-step-savepoints.md
13
+ 2026-06-16T14:20Z Why spec.md created
14
+ 2026-06-16T15:10Z How plan.md created
15
+ 2026-06-16T15:11Z How checklist.md created
16
+ 2026-06-16T16:40Z Exec outcome.md created
17
+ ```
15
18
 
16
- ### 1. Find Active Intent(s)
17
- Read `~/.plastic/INDEX.md` (or the project INDEX.md) and extract all intents listed under `## Active`.
19
+ It is **sugar on top of the conventions**, not a source of truth. The gate hook
20
+ (`hook-gate-check`) writes each line automatically when a stage file is created, so there is
21
+ nothing to save by hand. State is always derivable from files-on-disk; the ledger just lets
22
+ a resuming agent read the cycle's succession from one glance (last line = where we are).
18
23
 
19
- ### 2. For Each Active Intent
20
- Read the intent directory at `~/.plastic/store/ID--slug/`:
24
+ ## When to Use
25
+ - A PreCompact hook fires, or the user says "save" / "savepoint": verify the ledger is current.
26
+ - Resuming an intent: read the ledger to learn the cycle's succession quickly.
27
+ - The ledger looks stale, empty, or missing: rebuild it from the filesystem.
21
28
 
22
- **a. Update checklist.md** (if exists):
23
- - Check off completed items
24
- - Add any new items discovered during the session
29
+ ## What this skill does NOT do
30
+ - It does not write prose, "in progress", "next step", or "blockers". The old 50%-context
31
+ prose savepoint is retired. The semantic trace lives in `## Insights` (append-only,
32
+ newest at the bottom); the byte history lives in git.
25
33
 
26
- **b. Create/update savepoint.md:**
27
- ```markdown
28
- # Savepoint
34
+ ## Workflow
29
35
 
30
- ## Last Updated
31
- {{DATE}} — Session #{{N}}
36
+ ### 1. Find Active Intent(s)
37
+ Read the active store's `INDEX.md` and extract intents under `## Active`.
32
38
 
33
- ## In Progress
34
- - (what was being worked on when savepoint triggered)
35
- - Next: (immediate next step)
39
+ ### 2. For Each Active Intent — verify the ledger
40
+ - Read `savepoint.md`. Confirm it exists and is non-empty.
41
+ - Confirm the **last line's stage** matches the stage derived from files-on-disk
42
+ (`Bridge.derive_stage`). If they disagree, or the file is missing/empty, the ledger has
43
+ drifted.
36
44
 
37
- ## Blockers
38
- (any blockers or open questions)
45
+ ### 3. Rebuild on drift
46
+ Reconstruct from the filesystem rather than hand-editing:
39
47
 
40
- ## Key Discoveries This Session
41
- - (important things learned)
48
+ ```bash
49
+ ruby -r ~/.plastic/scripts/lib/bridge -e \
50
+ 'Bridge.rebuild_savepoint("<intent_dir>")'
42
51
  ```
43
52
 
44
- **c. Update `{ID}--{slug}.md`:**
45
- - Add observations to `## Insights` section
46
-
47
- ### 3. Update INDEX.md
48
- Verify the `## Active` section is accurate.
53
+ This rewrites `savepoint.md` from the milestone files present (timestamps from mtimes),
54
+ in stage order. Safe to run anytime: the ledger is derived.
49
55
 
50
- ### 4. Commit
56
+ ### 4. Commit (store only)
57
+ If a rebuild changed the ledger, commit it in the store repo:
51
58
  ```bash
52
- git add .plastic/
53
- git commit -m "chore: savepoint — [active intent name]"
59
+ cd <store-root> && git add . && git commit -m "chore: rebuild savepoint ledger — [intent]"
54
60
  ```
61
+ Never push `~/.plastic/`.
62
+
63
+ ## References
55
64
 
56
- ### 5. Notify User
57
- Tell the user: "Context is getting large. I've saved progress to intent [ID] — [name]. Please run `/clear` and say `continue` to resume."
65
+ - Read `references/context-management.md` for the full save/continue protocol and how the
66
+ resume flow consumes the ledger.