@zalom/plastic 1.9.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 (92) hide show
  1. package/PLASTIC.md +23 -8
  2. package/README.md +15 -4
  3. package/agents/plastic-enforcer.md +3 -2
  4. package/agents/plastic-intent-discovery.md +7 -0
  5. package/bin/plastic.js +17 -8
  6. package/hooks/auto-arm +2 -2
  7. package/hooks/bash-gate +1 -1
  8. package/hooks/check-update +1 -1
  9. package/hooks/continue +2 -2
  10. package/hooks/edit-gates +1 -1
  11. package/hooks/future-intent-check +2 -2
  12. package/hooks/gate-check +3 -3
  13. package/hooks/power-tools +1 -1
  14. package/hooks/session-start +1 -1
  15. package/package.json +1 -1
  16. package/scripts/codex-hook +50 -106
  17. package/scripts/doctor.rb +132 -1080
  18. package/scripts/exec-worktree +103 -0
  19. package/scripts/hash-intent +1 -1
  20. package/scripts/hook-bash-gate +19 -0
  21. package/scripts/hook-code-gate +4 -1
  22. package/scripts/hook-continue +2 -2
  23. package/scripts/hook-create-gate +6 -3
  24. package/scripts/hook-gate-check +17 -0
  25. package/scripts/hook-links-gate +4 -1
  26. package/scripts/hook-lock-gate +7 -3
  27. package/scripts/hook-savepoint-pre +4 -1
  28. package/scripts/hook-session-start +21 -15
  29. package/scripts/lib/apply_patch_envelope.rb +46 -13
  30. package/scripts/lib/bridge.rb +83 -15
  31. package/scripts/lib/codex_edit_gates.rb +138 -0
  32. package/scripts/lib/doctor_core.rb +1087 -0
  33. package/scripts/lib/edit_gates.rb +61 -5
  34. package/scripts/lib/exec_worktree.rb +325 -0
  35. package/scripts/lib/harness_text.rb +57 -0
  36. package/scripts/lib/hook_registry.rb +32 -28
  37. package/scripts/lib/installer_core.rb +67 -7
  38. package/scripts/lib/lock.rb +196 -47
  39. package/scripts/lib/ruby_probe.rb +60 -0
  40. package/scripts/lib/scaffold_intent.rb +392 -0
  41. package/scripts/lib/spec_header.rb +83 -0
  42. package/scripts/lib/start_intent.rb +296 -0
  43. package/scripts/lib/verify_intent.rb +262 -0
  44. package/scripts/lib/worktree.rb +15 -1
  45. package/scripts/link-suggest +1 -1
  46. package/scripts/maintenance-run +5 -5
  47. package/scripts/migrate-to-global +2 -2
  48. package/scripts/restore-intent-v1 +1 -1
  49. package/scripts/scaffold-intent +120 -0
  50. package/scripts/start-intent +89 -0
  51. package/scripts/verify-intent +73 -0
  52. package/skills/agent-advisor/SKILL.md +5 -5
  53. package/skills/auto/SKILL.md +42 -32
  54. package/skills/auto/references/agent-architecture.md +1 -1
  55. package/skills/auto/references/agent-report-contract.md +1 -1
  56. package/skills/auto/references/human-report-contract.md +22 -3
  57. package/skills/auto/references/tiers.md +24 -2
  58. package/skills/conventions/references/completion-and-done.md +3 -0
  59. package/skills/conventions/references/gates-and-enforcement.md +28 -12
  60. package/skills/conventions/references/locks-and-worktrees.md +3 -3
  61. package/skills/conventions/references/tiers-and-dispatch.md +7 -6
  62. package/skills/dashboard/SKILL.md +1 -1
  63. package/skills/doctor/SKILL.md +6 -5
  64. package/skills/doctor/references/gates-stuck-detection.md +13 -8
  65. package/skills/doctor/report.md +1 -1
  66. package/skills/install/SKILL.md +1 -1
  67. package/skills/intent-brainstorming/SKILL.md +0 -2
  68. package/skills/intent-creating/SKILL.md +6 -6
  69. package/skills/intent-creating/references/lifecycle.md +1 -1
  70. package/skills/intent-discovering/SKILL.md +10 -3
  71. package/skills/intent-ending/SKILL.md +8 -7
  72. package/skills/intent-executing/SKILL.md +27 -19
  73. package/skills/intent-grilling/SKILL.md +5 -3
  74. package/skills/intent-planning/SKILL.md +7 -3
  75. package/skills/intent-researching/SKILL.md +0 -2
  76. package/skills/intent-starting/SKILL.md +10 -2
  77. package/skills/project-creating/SKILL.md +0 -2
  78. package/skills/project-creating/references/project-scaffolding.md +1 -1
  79. package/skills/releasing/SKILL.md +1 -1
  80. package/skills/releasing/references/promotion-and-tagging.md +14 -8
  81. package/skills/releasing/references/release-lines.md +1 -1
  82. package/skills/skill-creating/SKILL.md +5 -2
  83. package/skills/store-indexing/SKILL.md +8 -5
  84. package/skills/store-indexing/references/zettelkasten-linking.md +1 -1
  85. package/skills/tutorial/references/track-1-guided.md +2 -2
  86. package/skills/tutorial/references/track-2-auto.md +9 -6
  87. package/skills/tutorial/references/track-3-projects-and-roadmaps.md +1 -1
  88. package/skills/uninstall/SKILL.md +6 -9
  89. package/templates/agents.md +12 -12
  90. package/templates/config.yml +6 -7
  91. package/templates/index.md +6 -3
  92. package/templates/spec.md +1 -1
@@ -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,9 +55,11 @@ 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).
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).
59
61
 
60
- Checkpoint: read one gate message from the run so far and name which of the three gates it
62
+ Checkpoint: read one gate message from the run so far and name which of the five gates it
61
63
  came from.
62
64
 
63
65
  ### 4. Reading the per-stage reports
@@ -65,7 +67,8 @@ came from.
65
67
  No new command. At each stage boundary (What, Why, How, Exec, Done) the agent briefs in a
66
68
  fixed three-line shape: State (what happened and why it matters), Risk (the one thing that
67
69
  could bite, or "nothing flagged"), and Call (the decision left to the user, or the call the
68
- 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.
69
72
 
70
73
  Checkpoint: in the most recent report, point at the State line, the Risk line, and the Call
71
74
  line.
@@ -84,10 +87,10 @@ at and how that matched what was actually on disk.
84
87
  ## Wrap and where to go next
85
88
 
86
89
  Auto keeps the same stages and the same gates as guided; the only difference is who steers.
87
- Read `docs/guides/pick-your-mode.md` for the honest trade-off between guided and auto, and
88
- `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
89
92
  it connects to roadmap-driven delivery. For denial messages met along the way, read
90
- `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).
91
94
 
92
95
  Note on terms: "guided" means the user starts each stage with a command and the agent
93
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
  - ...