@zalom/plastic 1.8.0 → 1.10.0

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 (127) hide show
  1. package/PLASTIC.md +94 -556
  2. package/README.md +18 -6
  3. package/agents/plastic-enforcer.md +3 -2
  4. package/agents/plastic-intent-curator.md +2 -2
  5. package/agents/plastic-intent-discovery.md +7 -0
  6. package/bin/plastic.js +17 -8
  7. package/deprecations.yml +10 -2
  8. package/hooks/auto-arm +2 -2
  9. package/hooks/bash-gate +1 -1
  10. package/hooks/check-update +1 -1
  11. package/hooks/continue +2 -2
  12. package/hooks/edit-gates +3 -0
  13. package/hooks/future-intent-check +2 -2
  14. package/hooks/gate-check +3 -3
  15. package/hooks/hooks.json +4 -44
  16. package/hooks/power-tools +8 -0
  17. package/hooks/session-start +1 -1
  18. package/package.json +1 -2
  19. package/scripts/codex-hook +57 -118
  20. package/scripts/doctor.rb +146 -1012
  21. package/scripts/exec-worktree +103 -0
  22. package/scripts/hash-intent +1 -1
  23. package/scripts/hook-bash-gate +19 -0
  24. package/scripts/hook-code-gate +16 -28
  25. package/scripts/hook-continue +2 -2
  26. package/scripts/hook-create-gate +13 -57
  27. package/scripts/hook-edit-gates +58 -0
  28. package/scripts/hook-gate-check +17 -0
  29. package/scripts/hook-links-gate +11 -31
  30. package/scripts/hook-lock-gate +19 -60
  31. package/scripts/hook-power-tools +38 -0
  32. package/scripts/hook-savepoint-pre +11 -11
  33. package/scripts/hook-session-start +21 -15
  34. package/scripts/lib/apply_patch_envelope.rb +46 -13
  35. package/scripts/lib/bridge.rb +85 -17
  36. package/scripts/lib/codex_edit_gates.rb +138 -0
  37. package/scripts/lib/doctor_core.rb +1087 -0
  38. package/scripts/lib/edit_gates.rb +398 -0
  39. package/scripts/lib/exec_worktree.rb +325 -0
  40. package/scripts/lib/harness_text.rb +57 -0
  41. package/scripts/lib/hook_registry.rb +64 -28
  42. package/scripts/lib/installer_core.rb +166 -24
  43. package/scripts/lib/lock.rb +196 -47
  44. package/scripts/lib/qmd_hook.rb +21 -41
  45. package/scripts/lib/qmd_sync.rb +0 -15
  46. package/scripts/lib/revisions_writer.rb +1 -1
  47. package/scripts/lib/ruby_probe.rb +60 -0
  48. package/scripts/lib/scaffold_intent.rb +392 -0
  49. package/scripts/lib/spec_header.rb +83 -0
  50. package/scripts/lib/start_intent.rb +296 -0
  51. package/scripts/lib/verify_intent.rb +262 -0
  52. package/scripts/lib/worktree.rb +15 -1
  53. package/scripts/link-suggest +1 -1
  54. package/scripts/maintenance-run +5 -5
  55. package/scripts/migrate-to-global +2 -2
  56. package/scripts/restore-intent-v1 +17 -12
  57. package/scripts/scaffold-intent +120 -0
  58. package/scripts/start-intent +89 -0
  59. package/scripts/verify-intent +73 -0
  60. package/skills/agent-advisor/SKILL.md +5 -5
  61. package/skills/auto/SKILL.md +52 -32
  62. package/skills/auto/evals/evals.json +2 -2
  63. package/skills/auto/references/agent-architecture.md +1 -1
  64. package/skills/auto/references/agent-report-contract.md +1 -1
  65. package/skills/auto/references/human-report-contract.md +22 -3
  66. package/skills/auto/references/tiers.md +24 -2
  67. package/skills/conventions/SKILL.md +31 -0
  68. package/skills/conventions/references/completion-and-done.md +43 -0
  69. package/skills/conventions/references/gates-and-enforcement.md +39 -0
  70. package/skills/conventions/references/knowledge-graph.md +47 -0
  71. package/skills/conventions/references/lifecycle-and-savepoints.md +11 -0
  72. package/skills/conventions/references/locks-and-worktrees.md +113 -0
  73. package/skills/conventions/references/maintenance-and-revisions.md +170 -0
  74. package/skills/conventions/references/roadmaps.md +44 -0
  75. package/skills/conventions/references/tiers-and-dispatch.md +135 -0
  76. package/skills/dashboard/SKILL.md +1 -1
  77. package/skills/doctor/SKILL.md +15 -6
  78. package/skills/doctor/references/gates-stuck-detection.md +13 -8
  79. package/skills/doctor/report.md +1 -1
  80. package/skills/install/SKILL.md +1 -1
  81. package/skills/intent-brainstorming/SKILL.md +4 -2
  82. package/skills/intent-continuing/SKILL.md +4 -0
  83. package/skills/intent-creating/SKILL.md +13 -8
  84. package/skills/intent-creating/references/lifecycle.md +1 -1
  85. package/skills/intent-discovering/SKILL.md +10 -3
  86. package/skills/intent-ending/SKILL.md +12 -7
  87. package/skills/intent-executing/SKILL.md +37 -19
  88. package/skills/intent-grilling/SKILL.md +5 -3
  89. package/skills/intent-linking/SKILL.md +4 -0
  90. package/skills/intent-locking/SKILL.md +4 -0
  91. package/skills/intent-planning/SKILL.md +14 -3
  92. package/skills/intent-researching/SKILL.md +0 -2
  93. package/skills/intent-savepoint/SKILL.md +4 -0
  94. package/skills/intent-speccing/SKILL.md +4 -0
  95. package/skills/intent-starting/SKILL.md +20 -2
  96. package/skills/project-creating/SKILL.md +0 -2
  97. package/skills/project-creating/references/project-scaffolding.md +3 -3
  98. package/skills/releasing/SKILL.md +1 -1
  99. package/skills/releasing/references/promotion-and-tagging.md +14 -8
  100. package/skills/releasing/references/release-lines.md +1 -1
  101. package/skills/roadmap/SKILL.md +4 -0
  102. package/skills/roadmap-continuing/SKILL.md +4 -0
  103. package/skills/skill-creating/SKILL.md +8 -2
  104. package/skills/skill-creating/references/defaults-first.md +23 -0
  105. package/skills/skill-creating/references/hooks.md +4 -1
  106. package/skills/store-curating/SKILL.md +8 -0
  107. package/skills/store-indexing/SKILL.md +16 -5
  108. package/skills/store-indexing/references/zettelkasten-linking.md +1 -1
  109. package/skills/tutorial/references/track-1-guided.md +2 -2
  110. package/skills/tutorial/references/track-2-auto.md +10 -8
  111. package/skills/tutorial/references/track-3-projects-and-roadmaps.md +1 -1
  112. package/skills/uninstall/SKILL.md +6 -9
  113. package/templates/agents.md +12 -12
  114. package/templates/config.yml +6 -7
  115. package/templates/index.md +6 -3
  116. package/templates/spec.md +1 -1
  117. package/PLASTIC-reference.md +0 -138
  118. package/hooks/code-gate +0 -27
  119. package/hooks/create-gate +0 -3
  120. package/hooks/links-gate +0 -3
  121. package/hooks/lock-gate +0 -21
  122. package/hooks/qmd-search +0 -8
  123. package/hooks/retrieval-gate +0 -10
  124. package/hooks/savepoint-pre +0 -10
  125. package/scripts/hook-qmd-search +0 -44
  126. package/scripts/hook-retrieval-gate +0 -148
  127. package/scripts/lib/retrieval_gate.rb +0 -211
@@ -12,8 +12,6 @@ Write comprehensive implementation plans assuming the engineer has zero context
12
12
 
13
13
  Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
14
14
 
15
- **Announce at start:** "I'm using the writing-plans skill to plan intent {id}: {name}."
16
-
17
15
  ## Active Intent Gate
18
16
 
19
17
  Before proceeding, resolve the active intent:
@@ -31,6 +29,10 @@ If the spec covers multiple independent subsystems, it should have been broken i
31
29
 
32
30
  ## Tier shapes
33
31
 
32
+ Read `../plastic-conventions/references/tiers-and-dispatch.md` for tier sizing and the
33
+ stage-to-agent dispatch rules behind this section. This path resolves relative to this skill's own
34
+ installed directory.
35
+
34
36
  Read the spec's stamped `Tier:` line (written by intent-speccing) and pick the action shape it calls for. Every tier produces at least one REAL action file in `actions/`; the tier only changes how many:
35
37
 
36
38
  - **S or M (default):** write ONE consolidated `actions/ACTION_1.md` that carries the whole ordered delivery (the steps plus the exact changes). `plan.md` still holds the overall map and `checklist.md` still mirrors the task list. You may split into a few action files when that reads cleaner, but one real action file is the floor.
@@ -51,13 +53,19 @@ This structure informs the task decomposition. Each task should produce self-con
51
53
 
52
54
  ## Bite-Sized Task Granularity
53
55
 
54
- **Each step is one action (2-5 minutes):**
56
+ Granularity follows the `Tier:` line the spec stamped.
57
+
58
+ **At M or L, each step is one action (2-5 minutes):**
55
59
  - "Write the failing test" - step
56
60
  - "Run it to make sure it fails" - step
57
61
  - "Implement the minimal code to make the test pass" - step
58
62
  - "Run the tests and make sure they pass" - step
59
63
  - "Commit" - step
60
64
 
65
+ **At S, size each step to the work.** Do not slice a small delivery into fixed 2-5 minute steps. Keep steps coarse enough to read in one pass, and let the one consolidated `actions/ACTION_1.md` carry the whole delivery. Each step still names its exact file paths, its exact changes, and how it is verified. Only the slicing relaxes.
66
+
67
+ This changes granularity, nothing else. Every tier still produces at least one real `actions/ACTION_N.md`, and an empty or `.gitkeep`-only `actions/` still fails the How gate (see `## Tier shapes` above).
68
+
61
69
  ## Plan Format
62
70
 
63
71
  For the exact plan/task/checklist/action format (the Plan Document Header
@@ -121,6 +129,9 @@ When collecting owner rulings for `[ORCHESTRATOR]` hard-gate items, read
121
129
  - **Produces:** `plan.md`, `checklist.md`, and at least one real `actions/ACTION_N.md` (every tier; one consolidated file at S/M, one per task at L).
122
130
  - **Next:** /plastic-intent-executing.
123
131
 
132
+ Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
133
+ report-home contract this handoff relies on.
134
+
124
135
  ## Git Commit
125
136
 
126
137
  After writing all artifacts (plan.md, checklist.md, and the actions/ACTION_N.md files), commit to the store:
@@ -8,8 +8,6 @@ user-invocable: true
8
8
 
9
9
  Investigate a topic related to the active intent. Choose the right depth, produce a cited report.
10
10
 
11
- **Announce at start:** "I'm researching [topic] for intent {id} — {name}."
12
-
13
11
  ## Active Intent Gate
14
12
 
15
13
  Before proceeding, resolve the active intent:
@@ -22,6 +22,10 @@ It is **sugar on top of the conventions**, not a source of truth. The gate hook
22
22
  nothing to save by hand. State is always derivable from files-on-disk; the ledger just lets
23
23
  a resuming agent read the cycle's succession from one glance (last line = where we are).
24
24
 
25
+ Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
26
+ report-home contract that this ledger feeds. This path resolves relative to this skill's own
27
+ installed directory.
28
+
25
29
  ## When to Use
26
30
  - A PreCompact hook fires, or the user says "save" / "savepoint": verify the ledger is current.
27
31
  - Resuming an intent: read the ledger to learn the cycle's succession quickly.
@@ -47,6 +47,10 @@ not the Transition Gates table row). Writing `plan.md` is what opens the code ga
47
47
  writing `plan.md` is not this skill's job, that is `plastic-intent-planning`. State this to the user
48
48
  at step 6 so the handoff at step 8 is expected, not a surprise.
49
49
 
50
+ Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
51
+ report-home contract behind this handoff. This path resolves relative to this skill's own
52
+ installed directory.
53
+
50
54
  ## Tier stamp (step 3, convention only)
51
55
 
52
56
  Write `Tier: S|M|L` as the literal first line of the file, above the `# Spec:` heading. This line
@@ -10,8 +10,6 @@ user-invocable: true
10
10
 
11
11
  # Intent Starting — board a session onto an intent
12
12
 
13
- Announce: "Boarding intent [ID] — [name]."
14
-
15
13
  `plastic-intent-starting` is the Start procedure. It boards a session onto one intent: take
16
14
  the lock FIRST, confirm the delivery state, ask **auto or guided ONCE**, board at the latest
17
15
  delivered station, then run the cycle to Done. The What → Why → How → Exec stations are the
@@ -32,6 +30,10 @@ The lock is non-negotiable and comes before any mutating work. The ACTION-3 lock
32
30
  enforces it: without a held lock, mutating writes to this active intent's dir are denied with
33
31
  "run /plastic-intent-starting to lock and begin".
34
32
 
33
+ Read `../plastic-conventions/references/locks-and-worktrees.md` for delivery isolation: the
34
+ single-owner lock, claims, worktrees, solo mode, and the station ledger behind everything below.
35
+ This path resolves relative to this skill's own installed directory.
36
+
35
37
  1. **Ensure the intent is in INDEX `## Active`.** If it sits in `## Future`, activate it
36
38
  (move it to `## Active`, auto-commit) before arming. Creation precedes activation, so a
37
39
  brand-new What intent is activated here, then locked.
@@ -66,6 +68,16 @@ enforces it: without a held lock, mutating writes to this active intent's dir ar
66
68
  lock-owner-only rule is untouched. This is advisory context for Why, not a gate: if
67
69
  discovery yields nothing, proceed to Why normally.
68
70
 
71
+ **Skip the dispatch only at Tier S, when there is nothing to discover.** The skip fires
72
+ only when BOTH hold: a size of S is already on record for this intent, and the activating
73
+ intent's `chain` and `sources` frontmatter fields are both empty. On record means a
74
+ stamped `Tier: S` line at the top of `spec.md`. Sizing happens at Why, which is after this
75
+ step, so a first activation usually has no size yet: run the pass. The skip mainly earns
76
+ its keep on a re-activated intent that is already sized S. Never guess a size here to
77
+ unlock the skip. When both conditions hold, write the single line
78
+ `no chain/sources, discovery skipped` to `resources/discovery--<slug>.md` in its place,
79
+ then go to Why.
80
+
69
81
  **Session id resolution (verbatim from `plastic-auto`).** The first argument is the session
70
82
  id the bridge is keyed by: pass the hook stdin `session_id` when you have it; in the executable
71
83
  snippets, a nonblank `CODEX_THREAD_ID` identifies Codex, otherwise a nonblank
@@ -106,12 +118,18 @@ Never re-ask at a later station.
106
118
  - **auto** → `arm_auto` (lock + auto), then hand off to `plastic-auto`. The auto branch's
107
119
  only remaining job is the handoff; `plastic-auto` runs the cycle from here.
108
120
 
121
+ Read `../plastic-conventions/references/tiers-and-dispatch.md` for tier sizing and the
122
+ stage-to-agent dispatch rules behind the auto branch above.
123
+
109
124
  ## Board at the latest delivered station
110
125
 
111
126
  The station is derived from `savepoint.md` last line + real artifacts on disk. See
112
127
  `references/boarding-matrix.md` for the full table (last line → latest delivered → boards at →
113
128
  continue with) and the per-station notes. Summary of what "continue" means per station:
114
129
 
130
+ Read `../plastic-conventions/references/gates-and-enforcement.md` for the transition-gate
131
+ mechanics, the audited escape, and gate logging that govern moving between the stations below.
132
+
115
133
  - **What** → do what What requires (106-expanded), then brainstorm → `spec.md`.
116
134
  - **Why** → continue brainstorming → `spec.md`.
117
135
  - **How** → continue `plan.md` + `actions/` + `checklist.md`.
@@ -10,8 +10,6 @@ user-invocable: true
10
10
 
11
11
  # Creating a Project
12
12
 
13
- Announce: "Creating project `<slug>` from intent [ID] — [name]."
14
-
15
13
  ## Precondition
16
14
 
17
15
  An active intent must exist with enough context to define a project — at minimum: name/slug, path, and key decisions from `## Context > ### Decisions`.
@@ -17,8 +17,8 @@ Create `AGENTS.md` in the project root with:
17
17
  ```markdown
18
18
  # <Project Name> — Agent Instructions
19
19
 
20
- Read `PLASTIC.md` in `~/.plastic/`. It contains all Plastic conventions.
21
- Follow it exactly.
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
22
 
23
23
  This file is the operating contract for this project. Any agent entering
24
24
  this project reads this file first.
@@ -74,7 +74,7 @@ Update the project's `~/.plastic/projects/{slug}/INDEX.md`:
74
74
  # Index
75
75
 
76
76
  ## Active
77
- - [1 — <intent name>](store/1--<slug>/1.md) — implementation, from: global:<ID>
77
+ - [1 — <intent name>](store/1--<slug>/1--<slug>.md) — implementation, from: global:<ID>
78
78
  ```
79
79
 
80
80
  **For multi-intent spawning (Hub):**
@@ -332,7 +332,7 @@ the intent-41 re-land playbook.
332
332
 
333
333
  - Read `references/release-lines.md` for the two release lanes, the stable-line guarantees,
334
334
  the version-line map, and the intent-41 re-land playbook before starting any release
335
- - When promoting a pre-release across channels (`--promote beta`/`--promote stable`) or
335
+ - When promoting a pre-release across channels (alpha to beta, beta to stable) or
336
336
  tagging a historical release retroactively, read `references/promotion-and-tagging.md`
337
337
  for the exact commands and rules first
338
338
  - Read `references/deprecations.md` for the full deprecation process, severity levels, deprecations.yml schema, and dismissal rules when adding or managing deprecations
@@ -33,21 +33,27 @@ cleared is a no-op.
33
33
 
34
34
  ## Promotion
35
35
 
36
- To promote a release across channels, use `--promote`:
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
38
+ (version bump, tag, `npm publish` with the channel's dist-tag, GitHub release):
37
39
 
38
40
  ```bash
39
- plastic-releasing --promote beta # promotes current alpha beta
40
- plastic-releasing --promote stable # promotes current beta → stable
41
+ # Promote alpha → beta: set version files from -alpha.N to -beta.1, commit, tag, then
42
+ npm publish --access public --tag beta
43
+
44
+ # Promote beta → stable: strip the pre-release suffix (e.g., 1.0.0-beta.3 → 1.0.0),
45
+ # commit, tag, then
46
+ npm publish --access public # no --tag flag publishes to latest
41
47
  ```
42
48
 
43
49
  **Promotion rules:**
44
50
  - Linear only: alpha → beta → stable. Cannot skip channels.
45
- - `--promote beta`: reads version from `package.json`, changes `-alpha.N` suffix
46
- to `-beta.1`, publishes with `--tag beta`.
47
- - `--promote stable`: reads version from `package.json`, strips pre-release suffix
48
- entirely (e.g., `1.0.0-beta.3` → `1.0.0`), publishes to `latest`.
49
51
  - Version files are bumped and committed as in a normal release.
50
- - An annotated tag is created for the promoted version.
52
+ - An annotated tag is created for the promoted version, and the GitHub release is cut
53
+ as in the normal workflow (`gh release create ... --latest` for stable).
54
+ - To point a channel at an already-published version without republishing, move the
55
+ dist-tag directly: `npm dist-tag add @zalom/plastic@<version> <channel>`. To move the
56
+ GitHub "Latest" badge: `gh release edit <tag> --latest`.
51
57
 
52
58
  ## Retroactive Tagging
53
59
 
@@ -20,7 +20,7 @@ green Minitest run can fully vouch for.
20
20
 
21
21
  **Beta-verified lane.** Branch, merge to the `beta` branch, publish to the npm `beta` dist-tag,
22
22
  verify in real use, then merge `beta` into `main` and cut stable. It sits on top of the existing
23
- promotion mechanics (`--promote beta` / `--promote stable`, linear only, see
23
+ promotion mechanics (agent-performed channel promotion, linear only, see
24
24
  `promotion-and-tagging.md`); it names when to use them, not new machinery.
25
25
 
26
26
  ## Routing rule
@@ -43,6 +43,10 @@ See `references/file-format.md` for the exact entry-line shape, status vocabular
43
43
  format, and a worked example. See `references/operations.md` for step-by-step mechanics of each
44
44
  verb above.
45
45
 
46
+ Read `../plastic-conventions/references/roadmaps.md` for the roadmap file format, batch
47
+ semantics, and the status-mirror rule that this skill's own file-format reference builds on. This
48
+ path resolves relative to this skill's own installed directory.
49
+
46
50
  ## Notes
47
51
 
48
52
  - File location and the four-section shape are identical across tiers; do not invent a different
@@ -45,6 +45,10 @@ roadmap handoff had to be resumed by hand, carried as a free-prose note in `171`
45
45
  4. A genuine tie (two candidates equally live) is presented to the user and resolved by the
46
46
  single ask below, not silently picked.
47
47
 
48
+ Read `../plastic-conventions/references/roadmaps.md` for the roadmap file format, batch
49
+ semantics, and the status-mirror rule behind the candidates gathered above. This path resolves
50
+ relative to this skill's own installed directory.
51
+
48
52
  ## Present state
49
53
 
50
54
  Present the chosen roadmap's `## Goal`, the current batch with each entry's mirrored status, the
@@ -35,8 +35,11 @@ routes each authoring task to the reference that holds the depth.
35
35
  - Build at least three evals before writing extensive docs.
36
36
  - Match determinism to fragility: a deterministic script for fragile or
37
37
  repeated mechanical steps, prose for judgment calls.
38
- - Imperative voice, no second person. No em-dashes or en-dashes in any shipped
39
- skill or doc (use commas, periods, parentheses, colons).
38
+ - Imperative voice, no second person. User-facing docs (README, docs/, AGENTS.md,
39
+ CLAUDE.md) never use em-dashes or en-dashes, and newly authored skill text avoids
40
+ them (use commas, periods, parentheses, colons). Existing internal files and the
41
+ sanctioned template emissions (templates/index.md's INDEX line shape) are not
42
+ violations.
40
43
 
41
44
  ## Route the authoring task to its reference
42
45
 
@@ -49,6 +52,9 @@ routes each authoring task to the reference that holds the depth.
49
52
  | Deciding script versus prose, or writing a script | `references/scripts.md` |
50
53
  | Building evals for a skill | `references/evals.md` |
51
54
 
55
+ Read `references/defaults-first.md` before naming an external skill as a default, for the
56
+ Plastic-first, delegate-by-exception rule.
57
+
52
58
  ## Shrink context, or let a skill self-improve
53
59
 
54
60
  - When prompts or tool output blow the context budget, open `references/hooks.md` (E7) for
@@ -0,0 +1,23 @@
1
+ # Defaults First
2
+
3
+ This chapter holds the Plastic-first, delegate-by-exception rule for naming an external skill as a default.
4
+
5
+ ### Defaults-First
6
+
7
+ Plastic stands on its own. Skills and agents use Plastic's own defaults; an
8
+ external skill (for example `superpowers:*`) is opt-in, never load-bearing.
9
+
10
+ - **Default to Plastic, delegate by exception.** Name the Plastic-native path as
11
+ the default. Delegate to an external skill only when (a) it is available in the
12
+ harness, or (b) the user explicitly asks for it. A user without that plugin must
13
+ still get the core behavior.
14
+ - **Phrase external skills as enhancements.** Write "use Plastic's native X by
15
+ default; if `superpowers:<skill>` is available, or the user prefers it, delegate
16
+ to it" never "delegate to `superpowers:<skill>`" as the only path.
17
+ - **Optional dependencies detect then degrade.** `qmd` is the reference shape:
18
+ `scripts/lib/qmd_sync.rb` detects the binary first and every verb no-ops cleanly
19
+ when it is absent (see `scripts/qmd-sync`). Optional CLIs and MCP servers follow
20
+ the same detect-then-skip pattern, so a missing tool never crashes a session.
21
+ - **Legitimate hard dependencies are exempt.** Ruby, Node, git, and POSIX tools are
22
+ the cost of running Plastic, not silent coupling. The principle targets accidental
23
+ dependence on external skills doing work Plastic should do itself.
@@ -77,7 +77,10 @@ Notes that change the choice of event: [E2]
77
77
  - PreCompact fires before the runtime compacts the conversation. Use it to write a savepoint
78
78
  while the full context still exists.
79
79
 
80
- Plastic ships working instances of each: `scripts/hook-code-gate` (PreToolUse gate),
80
+ Plastic ships working instances of each: `hooks/edit-gates` -> `scripts/hook-edit-gates`
81
+ (PreToolUse, the merged dispatcher that runs code-gate, lock-gate, savepoint-pre, links-gate,
82
+ and create-gate in one process; each gate's own logic lives in `scripts/lib/edit_gates.rb`
83
+ and is also reachable through the standalone `scripts/hook-code-gate` CLI wrapper),
81
84
  `scripts/hook-session-start` (SessionStart boot and inject), `scripts/hook-savepoint-pre`
82
85
  (PreCompact savepoint). Read one before authoring a new hook of the same shape.
83
86
 
@@ -39,6 +39,10 @@ The agent handles:
39
39
  - Cluster management (create, merge, rename)
40
40
  - Orphan detection
41
41
 
42
+ Read `../plastic-conventions/references/knowledge-graph.md` for the linking doctrine: tiers of
43
+ influence, sources versus chain, and the `## Links` projection, before judging a link discovery or
44
+ orphan finding. This path resolves relative to this skill's own installed directory.
45
+
42
46
  When an intent reaches a terminal state, moved to Completed OR Abandoned, do these things:
43
47
 
44
48
  1. Author a real `outcome.md` in the intent directory from `~/.plastic/templates/outcome.md`, with the frontmatter `disposition: delivered` for a completed intent or `disposition: abandoned` for an abandoned one. `outcome.md` is MANDATORY at every terminal, delivered and abandoned alike: on abandon it records the abandonment reason and replaces the scaffolded placeholder sentinel (never leave `outcome.md` a placeholder at a terminal).
@@ -54,3 +58,7 @@ follows its own step 7: it detects (never acquires) the target's delivery lock,
54
58
  clean working tree, and performs the fix on a fresh branch merged back to main as one closed
55
59
  operation, with an append-only `revisions.md` receipt in the same pass as the edit. See
56
60
  `agents/plastic-intent-curator.md` for the exact mechanics.
61
+
62
+ Read `../plastic-conventions/references/maintenance-and-revisions.md` for WORK versus
63
+ MAINTENANCE, the `revisions.md` move-and-record contract, and the violation-tag catalog before
64
+ running a maintenance dispatch like this one.
@@ -14,20 +14,20 @@ user-invocable: false
14
14
 
15
15
  ## INDEX.md Structure
16
16
 
17
- INDEX.md is a Zettelkasten main structure note - the brain's entry point. It has four sections:
17
+ INDEX.md is a Zettelkasten main structure note - the brain's entry point. It has five sections:
18
18
 
19
19
  ### Active
20
20
  Intents currently being worked on. Max 1-2 for focus.
21
21
  ```markdown
22
22
  ## Active
23
- - [1a2 — Design Plastic](store/1a2--design-plastic-state-system/1a2.md) — decision, human
23
+ - [1a2 — Design Plastic](store/1a2--design-plastic-state-system/1a2--design-plastic-state-system.md) — decision, human
24
24
  ```
25
25
 
26
26
  ### Future
27
27
  Intents parked for later. May be picked up by agents.
28
28
  ```markdown
29
29
  ## Future
30
- - [1b1 — Build Reddit KB](store/1b1--build-reddit-knowledge-base/1b1.md) — implementation, human
30
+ - [1b1 — Build Reddit KB](store/1b1--build-reddit-knowledge-base/1b1--build-reddit-knowledge-base.md) — implementation, human
31
31
  ```
32
32
 
33
33
  ### Clusters
@@ -35,10 +35,13 @@ Topic-based groupings. Manually curated. Create a new cluster when 3+ intents sh
35
35
  ```markdown
36
36
  ## Clusters
37
37
  ### Reddit Knowledge Base
38
- - [1a — Research](store/1a--research-reddit-saved-posts/1a.md)
39
- - [1a1 — Plan](store/1a1--plan-reddit-knowledge-base/1a1.md)
38
+ - [1a — Research](store/1a--research-reddit-saved-posts/1a--research-reddit-saved-posts.md)
39
+ - [1a1 — Plan](store/1a1--plan-reddit-knowledge-base/1a1--plan-reddit-knowledge-base.md)
40
40
  ```
41
41
 
42
+ ### Abandoned
43
+ Intents ended without delivery. Links preserved, never deleted.
44
+
42
45
  ### Completed
43
46
  All completed intents with dates. Links preserved, never deleted.
44
47
 
@@ -75,8 +78,16 @@ When 3+ intents share tags but aren't in a cluster, suggest a new cluster headin
75
78
  ### Flag Orphans
76
79
  Intents with no links (empty `sources`, empty `chain`, no `## Links` entries, not in any cluster) should be flagged for curation.
77
80
 
81
+ Before reclassifying a structural finding outside routine indexing, read
82
+ `../plastic-conventions/references/maintenance-and-revisions.md` for WORK versus MAINTENANCE, the
83
+ `revisions.md` move-and-record contract, and the violation-tag catalog.
84
+
78
85
  REQUIRED BACKGROUND: intent-linking (for understanding connection types and Zettelkasten theory)
79
86
 
87
+ Read `../plastic-conventions/references/knowledge-graph.md` for the linking doctrine: tiers of
88
+ influence, sources versus chain, and the `## Links` projection. This path resolves relative to
89
+ this skill's own installed directory.
90
+
80
91
  ## References
81
92
 
82
93
  - Read `references/zettelkasten-linking.md` for the three structural layers (Folgezettel, directed graph, tags) and how they map to INDEX.md organization
@@ -14,7 +14,7 @@
14
14
  `intent:` text. Ordering is mandatory: all `sources` first (top), then all `chain`,
15
15
  frontmatter order preserved within each group. Sources never appear at the end. No
16
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.
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 [`how-plastic-sources-and-chains-intents.md`](https://github.com/zalom/plastic/blob/main/docs/concepts/how-plastic-sources-and-chains-intents.md) for the full model.
18
18
  3. **Tags** (weakest) — shared tags, `project-<name>` for project membership
19
19
 
20
20
  ## When to Create a Cluster
@@ -120,6 +120,6 @@ two, exactly the README section (or note) just delivered.
120
120
  ## Wrap and where to go next
121
121
 
122
122
  That is the full cycle once: create, board, decide, spec, plan, build, done. Read
123
- `docs/guides/your-first-intent-in-10-minutes.md` for the same path condensed to a single
124
- read, and `docs/guides/what-the-gates-are-telling-you.md` for what to do if a station denies
123
+ [`your-first-intent-in-10-minutes.md`](https://github.com/zalom/plastic/blob/main/docs/guides/your-first-intent-in-10-minutes.md) for the same path condensed to a single
124
+ read, and [`what-the-gates-are-telling-you.md`](https://github.com/zalom/plastic/blob/main/docs/guides/what-the-gates-are-telling-you.md) for what to do if a station denies
125
125
  an action instead of completing it.
@@ -55,18 +55,20 @@ Checkpoint: name one thing auto will always stop and ask about, rather than deci
55
55
 
56
56
  No new command. Auto still honors every hard gate a guided session would hit: the delivery
57
57
  lock (one owner at a time), the code gate (shut until `plan.md` and `checklist.md` exist),
58
- and the create gate (intents only come from the tool that makes them, never hand-authored).
59
- One gate, retrieval, is advisory only and never blocks anything; it just adds a note.
58
+ the create gate (intents only come from the tool that makes them, never hand-authored), the
59
+ links gate (a `## Links` section changes only to match the file's own frontmatter), and the
60
+ bash gate (a shell command cannot write project code the code gate would have blocked).
60
61
 
61
- Checkpoint: read one gate message from the run so far and say whether it is one of the hard
62
- gates or the one advisory note.
62
+ Checkpoint: read one gate message from the run so far and name which of the five gates it
63
+ came from.
63
64
 
64
65
  ### 4. Reading the per-stage reports
65
66
 
66
67
  No new command. At each stage boundary (What, Why, How, Exec, Done) the agent briefs in a
67
68
  fixed three-line shape: State (what happened and why it matters), Risk (the one thing that
68
69
  could bite, or "nothing flagged"), and Call (the decision left to the user, or the call the
69
- agent is taking on its own).
70
+ agent is taking on its own). That is the depth for a medium or large intent. A small intent
71
+ gets one briefing, at How, folding in what the earlier stages would have said.
70
72
 
71
73
  Checkpoint: in the most recent report, point at the State line, the Risk line, and the Call
72
74
  line.
@@ -85,10 +87,10 @@ at and how that matched what was actually on disk.
85
87
  ## Wrap and where to go next
86
88
 
87
89
  Auto keeps the same stages and the same gates as guided; the only difference is who steers.
88
- Read `docs/guides/pick-your-mode.md` for the honest trade-off between guided and auto, and
89
- `docs/guides/using-plastic-with-claude-code.md` for how that choice feels day to day and how
90
+ Read [`pick-your-mode.md`](https://github.com/zalom/plastic/blob/main/docs/guides/pick-your-mode.md) for the honest trade-off between guided and auto, and
91
+ [`using-plastic-with-claude-code.md`](https://github.com/zalom/plastic/blob/main/docs/guides/using-plastic-with-claude-code.md) for how that choice feels day to day and how
90
92
  it connects to roadmap-driven delivery. For denial messages met along the way, read
91
- `docs/guides/what-the-gates-are-telling-you.md`.
93
+ [`what-the-gates-are-telling-you.md`](https://github.com/zalom/plastic/blob/main/docs/guides/what-the-gates-are-telling-you.md).
92
94
 
93
95
  Note on terms: "guided" means the user starts each stage with a command and the agent
94
96
  narrows the thinking inside it, the same shape track 1 walked. "Manual", editing project
@@ -106,6 +106,6 @@ waiting on a release to exist first.
106
106
 
107
107
  This is the same What, Why, How, Exec cycle from tracks 1 and 2, repeated across a project
108
108
  and gathered by a roadmap. Read
109
- `docs/guides/using-plastic-with-claude-code.md` for roadmap-driven delivery in more depth,
109
+ [`using-plastic-with-claude-code.md`](https://github.com/zalom/plastic/blob/main/docs/guides/using-plastic-with-claude-code.md) for roadmap-driven delivery in more depth,
110
110
  including a real worked roadmap. For the exact roadmap file format beyond what this
111
111
  walkthrough covers, the `plastic-roadmap` skill itself is the reference.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plastic-uninstall
3
- description: Use when the user wants to remove Plastic from an agent. Runs the manifest-driven uninstaller (removes skills, hooks, statusline, and any legacy plugin layout), reports exactly what was removed and what was left behind, then gives verification steps. Optionally deletes the intent store.
3
+ description: Use when the user wants to remove Plastic from an agent. Runs the manifest-driven uninstaller (removes skills, hooks, statusline, and any legacy plugin layout), reports exactly what was removed and what was left behind, then gives verification steps. The intent store always stays.
4
4
  user-invocable: true
5
5
  ---
6
6
 
@@ -51,7 +51,7 @@ ls ~/.claude/hooks | grep '^plastic-' # -> no output
51
51
  grep -n plastic ~/.claude/settings.json # -> no plastic hook/plugin refs
52
52
  ```
53
53
 
54
- ### Step 4: Report + offer the data decision
54
+ ### Step 4: Report
55
55
 
56
56
  Emit the reporting block, using the Step 3 checks for the verification line:
57
57
 
@@ -67,12 +67,9 @@ Then:
67
67
  ```
68
68
  Plastic is uninstalled from [agent].
69
69
  Your intent store at ~/.plastic/ is untouched.
70
-
71
- Delete it too?
72
- a) Keep everything (recommended): re-install anytime with npx
73
- b) Delete everything now: removes ~/.plastic/ entirely (irreversible)
74
70
  ```
75
71
 
76
- - **Keep:** "Your data is at ~/.plastic/. Re-install anytime with
77
- `npx -y @zalom/plastic@latest install --claude` (or your channel)."
78
- - **Delete:** run `rm -rf ~/.plastic/` and confirm.
72
+ Uninstall removes installed harness files only. The store at `~/.plastic/` (intents,
73
+ history, projects, config, version ledger) always stays; no uninstall path deletes it.
74
+ Tell the user: "Your data is at ~/.plastic/. Re-install anytime with
75
+ `npx -y @zalom/plastic@latest install --claude` (or your channel)."
@@ -23,31 +23,30 @@ means preferring a detected tool's own search or navigation over a generic file
23
23
  4. **Use [[global:ID]]** to link back to the governing strategic intent
24
24
  5. **Auto-commit** all intent changes in this project's git repo
25
25
 
26
- ## Intent Lifecycle — What→Why→How→Next
26
+ ## Intent Lifecycle — What→Why→How→Exec
27
27
 
28
28
  State is derived from filesystem conventions, not frontmatter fields:
29
29
 
30
30
  | Convention | Signal |
31
31
  |---|---|
32
- | `## Context` has content | Intent is permanent (not fleeting) |
33
- | `actions/` directory exists | Intent is actionable |
32
+ | `## Context` has content | Intent is permanent (developed, actionable) |
34
33
  | `## Outcome` has content | Intent is done |
35
34
 
36
35
  Sections map to the lifecycle:
37
36
  - **## Intent** — What (the desire)
38
37
  - **## Context** — Why (background + ### Decisions)
39
- - **## Outcome** — How (the result, deliverables)
40
- - **## Insights** — Next (observations, raw material for future intents)
38
+ - **## Outcome** — Exec (the result; How's deliverables are the `plan.md`, `actions/`, and `checklist.md` files)
39
+ - **## Insights** — observations across all stages, raw material for future intents
41
40
 
42
41
  Active/Future/Completed placement is managed in INDEX.md, not in frontmatter.
43
42
 
44
43
  ## Creating Tactical Intents
45
44
 
46
- 1. Scan `.plastic/store/` for the next sequential ID
47
- 2. Generate ID: `~/.plastic/scripts/folgezettel-id`
48
- 3. Create `.plastic/store/ID--slug/ID--slug.md`
49
- 4. Set frontmatter: `id`, `intent`, `sources` (array link to governing intent), `chain` (starts empty), `created`, `author`, `tags`
50
- 5. Add `[[global:ID]]` backlink in `## Links`
45
+ Create through the `plastic-intent-creating` skill, which scaffolds with one call:
46
+ `ruby ~/.plastic/scripts/new-intent --store .plastic/store --intent "<one-line>" --slug <slug> [--sources <governing-id>]`.
47
+ It allocates the Folgezettel ID, creates `.plastic/store/ID--slug/ID--slug.md` born
48
+ complete, and wires the links. Never hand-author the files: the write-time create gate
49
+ rejects an incomplete or malformed intent file.
51
50
 
52
51
  ## Lifecycle Skills
53
52
 
@@ -56,12 +55,13 @@ Plastic has its own lifecycle skills. When a Plastic skill exists for the curren
56
55
  | Phase | Skill | Produces |
57
56
  |-------|-------|----------|
58
57
  | What | `plastic-intent-creating` | Intent file |
59
- | Why | `plastic-intent-brainstorming` | `spec.md` |
58
+ | Why | `plastic-intent-brainstorming` | Enriched `## Context` + `### Decisions` |
59
+ | Why | `plastic-intent-speccing` | `spec.md` |
60
60
  | Why | `plastic-intent-researching` | `resources/*.md` |
61
61
  | Why | `plastic-intent-grilling` | Deep interrogation |
62
62
  | How | `plastic-intent-planning` | `plan.md`, `checklist.md`, `actions/` |
63
63
  | Exec | `plastic-intent-executing` | Code + `outcome.md` |
64
- | Done | `plastic-store-curating` | Lifecycle transition |
64
+ | Done | `plastic-intent-ending` | Lifecycle transition |
65
65
 
66
66
  **Artifact convention:** ALL lifecycle artifacts go to the active intent directory (`store/{id}--{slug}/`). Never write specs to `docs/superpowers/specs/` or plans to `docs/superpowers/plans/`.
67
67
 
@@ -8,7 +8,8 @@ hash_algorithm: sha256-base36
8
8
  max_slug_words: 5
9
9
  agent:
10
10
  type: claude-code
11
- parallel_mode: linear
11
+ # read-config falls back to linear when this key is absent
12
+ parallel_mode: agent-teams
12
13
  architect:
13
14
  style:
14
15
 
@@ -27,14 +28,14 @@ architect:
27
28
  # plastic-executor: sonnet
28
29
  # plastic-enforcer: opus
29
30
  # codex:
30
- # plastic-executor: gpt-5.1-codex
31
+ # plastic-executor: gpt-5.6-terra
31
32
 
32
33
  # The advisor (intent 185): two consultation agents, plastic-advisor (the real
33
34
  # advisor, expensive, model fable by default) and plastic-faux-advisor (the
34
35
  # cheaper imitation, model opus by default, carrying the same reasoning
35
36
  # discipline inline). advisor.enabled defaults to enabled; missing or
36
- # unreadable counts as enabled (fail-open). The claude.default/primary/
37
- # secondary values are AGENT NAMES, never model names, so a slot can point at
37
+ # unreadable counts as enabled (fail-open). The claude.default value is an
38
+ # AGENT NAME, never a model name, so it can point at
38
39
  # a locally registered agent instead. Set at install time via --no-advisor /
39
40
  # --advisor, or uncomment here directly. Each agent's actual model is a plain
40
41
  # agents.models.claude.<name> override, same mechanism as any other agent.
@@ -42,6 +43,4 @@ architect:
42
43
  # enabled: false # skip installing both advisor agents and the
43
44
  # # agent-advisor skill entirely
44
45
  # claude:
45
- # default: plastic-faux-advisor # which agent the advisor skill routes to
46
- # primary: plastic-advisor # the real advisor slot
47
- # secondary: plastic-faux-advisor # the cheaper advisor slot
46
+ # default: plastic-advisor # which agent the advisor skill routes to
@@ -1,9 +1,9 @@
1
1
  # Index
2
2
 
3
3
  ## Active
4
- <!-- Line shape: `- [ID — Title](path)`. The em-dash (U+2014, not a plain hyphen)
5
- between id and title is load-bearing: Bridge.intent_active? matches only that
6
- shape, and a plain hyphen there fails the lock gate open (see docs/internals.md). -->
4
+ <!-- Line shape: `- [ID — Title](path)`. Writes emit the em-dash (U+2014) between
5
+ id and title; readers (Bridge.index_entry_match) accept the em-dash or a plain
6
+ hyphen, so either form parses (see https://github.com/zalom/plastic/blob/main/docs/internals.md). -->
7
7
  (no active intents)
8
8
 
9
9
  ## Future
@@ -12,5 +12,8 @@
12
12
  ## Clusters
13
13
  (clusters emerge as intents accumulate; add headings when 3+ intents share a topic)
14
14
 
15
+ ## Abandoned
16
+ (links preserved, never deleted)
17
+
15
18
  ## Completed
16
19
  (links preserved, never deleted)
package/templates/spec.md CHANGED
@@ -13,7 +13,7 @@
13
13
  (the chosen approach, in prose)
14
14
 
15
15
  ## Alternatives Considered
16
- - <alternative> not chosen because ...
16
+ - <alternative>: not chosen because ...
17
17
 
18
18
  ## Decisions
19
19
  - ...