@zalom/plastic 1.0.0-beta.9 → 1.0.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 (107) hide show
  1. package/PLASTIC-reference.md +133 -0
  2. package/PLASTIC.md +398 -82
  3. package/README.md +99 -82
  4. package/agents/plastic-brainstorming.md +12 -9
  5. package/agents/plastic-enforcer.md +52 -12
  6. package/agents/plastic-executor.md +10 -10
  7. package/agents/plastic-future-intent-researcher.md +4 -8
  8. package/agents/plastic-intent-curator.md +12 -14
  9. package/agents/plastic-intent-discovery.md +35 -0
  10. package/agents/plastic-planner.md +15 -10
  11. package/agents/plastic-spec-specialist.md +15 -10
  12. package/bin/plastic.js +7 -3
  13. package/hooks/code-gate +10 -1
  14. package/hooks/hooks.json +28 -3
  15. package/hooks/lock-gate +21 -0
  16. package/hooks/retrieval-gate +10 -0
  17. package/hooks/savepoint-pre +10 -0
  18. package/hooks/statusline +48 -6
  19. package/package.json +2 -1
  20. package/scripts/agent-report +21 -0
  21. package/scripts/dashboard.rb +98 -23
  22. package/scripts/doctor.rb +232 -5
  23. package/scripts/hook-auto-arm +1 -1
  24. package/scripts/hook-bash-gate +22 -4
  25. package/scripts/hook-code-gate +11 -6
  26. package/scripts/hook-continue +17 -0
  27. package/scripts/hook-create-gate +45 -9
  28. package/scripts/hook-gate-check +24 -23
  29. package/scripts/hook-lock-gate +83 -0
  30. package/scripts/hook-retrieval-gate +148 -0
  31. package/scripts/hook-savepoint-pre +32 -0
  32. package/scripts/hook-session-start +1 -1
  33. package/scripts/insight-append +51 -0
  34. package/scripts/install.rb +44 -7
  35. package/scripts/lib/agent_models.rb +43 -0
  36. package/scripts/lib/bridge.rb +924 -84
  37. package/scripts/lib/dashboard_banner.rb +42 -0
  38. package/scripts/lib/hook_registry.rb +95 -0
  39. package/scripts/lib/insights.rb +86 -0
  40. package/scripts/lib/installer_core.rb +100 -60
  41. package/scripts/lib/link_suggestions.rb +319 -0
  42. package/scripts/lib/lock.rb +375 -0
  43. package/scripts/lib/power_tools.rb +22 -21
  44. package/scripts/lib/preflight.rb +79 -0
  45. package/scripts/lib/qmd_sync.rb +15 -0
  46. package/scripts/lib/retrieval_gate.rb +211 -0
  47. package/scripts/lib/worktree.rb +384 -0
  48. package/scripts/link-suggest +213 -0
  49. package/scripts/new-intent +9 -1
  50. package/scripts/plastic-lock +164 -0
  51. package/scripts/read-config +4 -0
  52. package/scripts/spawn-preamble +11 -3
  53. package/scripts/update.rb +16 -7
  54. package/skills/auto/SKILL.md +126 -19
  55. package/skills/auto/references/agent-architecture.md +7 -4
  56. package/skills/auto/references/agent-report-contract.md +36 -1
  57. package/skills/auto/references/end-tail.md +56 -0
  58. package/skills/auto/references/human-report-contract.md +55 -0
  59. package/skills/auto/references/tiers.md +77 -0
  60. package/skills/brainstorming/SKILL.md +7 -34
  61. package/skills/brainstorming/references/design-principles.md +49 -0
  62. package/skills/continuing/SKILL.md +26 -7
  63. package/skills/creating-intent/SKILL.md +13 -28
  64. package/skills/creating-project/SKILL.md +11 -74
  65. package/skills/creating-project/references/project-scaffolding.md +97 -0
  66. package/skills/creating-skills/SKILL.md +65 -0
  67. package/skills/creating-skills/evals/evals.json +108 -0
  68. package/skills/creating-skills/references/agents.md +168 -0
  69. package/skills/creating-skills/references/evals.md +41 -0
  70. package/skills/creating-skills/references/hooks.md +248 -0
  71. package/skills/creating-skills/references/progressive-disclosure.md +176 -0
  72. package/skills/creating-skills/references/scripts.md +166 -0
  73. package/skills/creating-skills/references/skills.md +165 -0
  74. package/skills/creating-skills/scripts/scaffold.rb +313 -0
  75. package/skills/dashboard/SKILL.md +13 -11
  76. package/skills/dashboard/references/classification.md +22 -0
  77. package/skills/doctor/SKILL.md +10 -7
  78. package/skills/executing-plan/SKILL.md +4 -4
  79. package/skills/humanizer/SKILL.md +39 -0
  80. package/skills/humanizer/evals/evals.json +70 -0
  81. package/skills/humanizer/references/always-on-snippet.md +9 -0
  82. package/skills/humanizer/references/examples.md +48 -0
  83. package/skills/install/SKILL.md +75 -84
  84. package/skills/intent-curator/SKILL.md +5 -1
  85. package/skills/intent-discovery/SKILL.md +47 -0
  86. package/skills/intent-starting/SKILL.md +130 -0
  87. package/skills/intent-starting/evals/evals.json +117 -0
  88. package/skills/intent-starting/references/boarding-matrix.md +35 -0
  89. package/skills/linking-intents/SKILL.md +48 -12
  90. package/skills/lock/SKILL.md +41 -0
  91. package/skills/managing-index/SKILL.md +6 -0
  92. package/skills/releasing/SKILL.md +44 -29
  93. package/skills/releasing/references/promotion-and-tagging.md +60 -0
  94. package/skills/roadmap/SKILL.md +51 -0
  95. package/skills/roadmap/references/file-format.md +91 -0
  96. package/skills/roadmap/references/operations.md +78 -0
  97. package/skills/uninstall/SKILL.md +29 -11
  98. package/skills/update/SKILL.md +34 -23
  99. package/skills/versions/SKILL.md +27 -12
  100. package/skills/writing-plans/SKILL.md +10 -88
  101. package/skills/writing-plans/references/plan-format.md +102 -0
  102. package/templates/config.yml +8 -0
  103. package/templates/outcome.md +3 -0
  104. package/templates/revisions.md +58 -0
  105. package/templates/roadmap.md +30 -0
  106. package/skills/writing-instructions/SKILL.md +0 -159
  107. package/skills/writing-instructions/references/agentskills-spec.md +0 -135
package/README.md CHANGED
@@ -1,124 +1,141 @@
1
1
  # Plastic
2
2
 
3
- > **Alpha software.** Expect breaking changes between releases.
4
- > Install: `npx @zalom/plastic@alpha --claude`
3
+ [![npm version](https://img.shields.io/npm/v/@zalom/plastic)](https://www.npmjs.com/package/@zalom/plastic)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@zalom/plastic)](https://www.npmjs.com/package/@zalom/plastic)
5
+ [![license](https://img.shields.io/npm/l/@zalom/plastic)](LICENSE)
6
+ [![CI](https://github.com/zalom/plastic/actions/workflows/test.yml/badge.svg)](https://github.com/zalom/plastic/actions/workflows/test.yml)
5
7
 
6
- Intent-driven idea development system for AI coding agents. Named after
7
- **neuroplasticity**: adaptive, malleable, dynamic, resilient.
8
+ ## Intent-based idea development system for AI-assisted work.
8
9
 
9
- Plastic thinks in **intents**, not tasks. An intent is a desire, something
10
- you want to accomplish, explore, or understand. Intents are atomic thoughts
11
- that get developed through two nested processes.
10
+ > Plastic is a system that turns an intent, a vague goal or idea into a durable, linked record of discovery, decisions, delivery, and outcomes - it serves as a physical brain for your intents.
12
11
 
13
- ## The Two Cycles
12
+ [[Install]](#start-in-60-seconds) [[See it work]](#built-with-plastic) [[Read the manifesto]](MANIFESTO.md)
14
13
 
15
- **Coordinator loop (B→O→R):** Brainstorm → Organize → Review. The human and
16
- agent explore ideas, structure them into intents, and validate the results.
17
- This loop runs continuously across sessions.
18
14
 
19
- **Intent lifecycle (W→W→H→E):** Why → What → How → Execute. Each intent moves
20
- from motivation through specification, planning, to delivery. Intents produce
21
- artifacts: `spec.md`, `plan.md`, `checklist.md`, `outcome.md`.
15
+ ## Why Plastic?
22
16
 
23
- ## How Plastic Works
17
+ You do not always start with a task.
24
18
 
25
- Plastic is a **thinking system**, a blueprint for taking a desire from intent to
26
- delivery. It splits the work in two:
19
+ You start with an intent, something like:
27
20
 
28
- - **The blueprint (deterministic).** The conventions, templates, directory structure,
29
- lifecycle, and linking rules. This is *how to fill in the work*, and it comes out
30
- identically no matter who or what is working.
31
- - **The brain (non-deterministic).** The human or LLM that does the actual thinking.
32
- Plastic never replaces it. It only **steers and validates** it.
21
+ > “I want users who are locked out to recover access safely.”
33
22
 
34
- Determinism lives in the **form** of the work (section sets, ordering, schemas, naming,
35
- IDs, file layout), never in the brain's reasoning. The framework stays constant while the
36
- thinking varies. Run Plastic on Claude Code, Codex, Hermes, OpenClaw, or by hand on paper
37
- in Obsidian or Word, and the only thing that changes is the *quality of thought*. The
38
- proof is the paper test: if a person with no tooling and no AI can reproduce a
39
- correctly-shaped intent, the determinism is in the form, not the agent.
23
+ Plastic delivers this intent in successive stages: What -> Why -> How -> Exec.
40
24
 
41
- **Deterministic by design, free by intent.** The rigid part is rigid on purpose. It is
42
- what makes work portable, reviewable, and resumable across any agent. The free part is
43
- free on purpose. It is where the brain's creativity lives. Plastic draws the line between
44
- the two and holds it.
25
+ The result is a readable, linked record of how an idea became real.
45
26
 
46
- **Harnesses are how it holds the line.** Shared harnesses (conventions, templates, and
47
- directory structure) constrain humans and agents alike. Agent-extra harnesses (evals that
48
- check a skill's output, plus hooks and instructions that steer reasoning) give an agent
49
- the instincts a careful person already has: stop and save state, leave a note when the
50
- context runs out, never plan before specifying.
27
+ **Plastic gives changing minds a durable way to develop ideas into work.**
51
28
 
52
- This is **intent-driven delivery**, a new shape for the software lifecycle in the age of
53
- agentic engineering. The unit of work is an *intent*, not a ticket, and every intent
54
- carries its own spec, plan, checklist, and outcome as it moves through Why, What, How, and
55
- Execute. What you get is agent-agnostic, auditable, and additive: a knowledge graph of
56
- *why* things were built, not just what.
29
+ Plastic is named after neuroplasticity: the brain's amazing ability to change and adapt. It rewires itself as you learn new things, form memories, or heal from injuries. Instead of being fixed like a computer, your brain is more like clay. It constantly reshapes itself based on your experiences.
57
30
 
58
- ## Install
31
+ ### What Plastic does?
59
32
 
60
- Plastic requires Ruby (pre-installed on macOS/Linux) and Node.js 18+.
33
+ Plastic keeps the shape of the work stable - **deterministic** work system:
34
+ - one durable intent
35
+ - one visible lifecycle
36
+ - one place for context, decisions, plans, and outcomes
37
+ - links between the ideas that shaped the work and the ideas it creates
61
38
 
62
- ```bash
63
- # Alpha (current, active development)
64
- npx @zalom/plastic@alpha --claude
39
+ Plastic leaves the human or AI model free to think - **non-deterministic** thinking system.
65
40
 
66
- # Beta (when available, API-stable, bug hunting)
67
- npx @zalom/plastic@beta --claude
41
+ Plastic makes that thinking legible, resumable, and useful later.
68
42
 
69
- # Stable (when available, general use)
70
- npx @zalom/plastic --claude
71
- ```
43
+ ## Who is Plastic for?
72
44
 
73
- Replace `--claude` with `--codex` for Codex CLI, `--hermes` for Hermes, or
74
- `--all` for all supported agents.
45
+ **Plastic is built for an AI-native developer, technical founder, or
46
+ independent builder who works across multiple sessions, has ideas before
47
+ they have tickets, and feels the cost of losing reasoning between agents,
48
+ contexts, and days.**
75
49
 
76
- Bun users can substitute `bunx` for `npx` (e.g. `bunx @zalom/plastic@alpha --claude`).
77
- Bun is never required.
50
+ ## What it solves?
78
51
 
79
- Skills install as flat, hyphen-namespaced personal skills (`plastic-doctor`,
80
- `plastic-auto`, and so on). Invoke them with a hyphen. Plastic is **not** a Claude Code
81
- plugin; re-running the installer auto-removes any legacy plugin registration.
52
+ It solves problems that builder already feels:
82
53
 
83
- ### Updating
54
+ - "I want to keep a record of my work - what I worked on, why I worked on it, how it was built"
55
+ - "I do not need another TODO list."
56
+ - "I do not want my work trapped inside a chat."
57
+ - "I want to explore without losing the decision trail."
58
+ - "I want a better model or new agent to inherit the work, not restart it."
59
+ - "I want my ideas to compound."
84
60
 
85
- From within your agent, say "update plastic" or run:
61
+ ## Start in 60 seconds
62
+
63
+ One command installs Plastic for your agent:
86
64
 
87
65
  ```bash
88
- npx @zalom/plastic@alpha --claude
66
+ npx @zalom/plastic --claude
89
67
  ```
90
68
 
91
- The `plastic-update` command shows available versions across all channels and
92
- lets you choose which to install.
69
+ Then load the conventions and begin:
70
+
71
+ ```bash
72
+ /clear
73
+
74
+ I would like to learn more about Plastic and how it works.
75
+ ```
76
+
77
+ Describe what you want in plain words, like "add a `--version` flag." Plastic
78
+ scaffolds the intent and walks it through What, Why, How, and Exec. For the
79
+ full path, read [your first intent in 10 minutes](docs/guides/your-first-intent-in-10-minutes.md).
80
+
81
+ ## How Plastic works?
82
+
83
+ A task assumes you already know the work.
84
+
85
+ An intent begins earlier:
86
+ something you want to accomplish, explore, or understand.
87
+
88
+ Plastic helps you develop it until it becomes a decision,
89
+ a plan, a delivery, and a reusable piece of project history.
90
+
91
+ ### Register What and start with Why
92
+
93
+ Plastic delivers all work through successive stages ->
94
+
95
+ | Stage | Meaning | Developed concept | On-disk artifact (evidence) |
96
+ | ----- | ----------------------------------------------- | ------------------ | ---------------------------------------------- |
97
+ | What | What is the intention? | Intent | {id}--slug.md |
98
+ | Why | What context, evidence, and decisions shape it? | Specification | spec.md |
99
+ | How | What is the plan? | Plan and checklist | plan.md, checklist.md, actions/ACTION_1.md ... ACTION_N.md |
100
+ | Exec | What was actually delivered? | Outcome | outcome.md |
101
+
102
+
103
+ ## Compatibility and ownership
104
+
105
+ - Native installers for Claude, Codex, Hermes, and all supported targets.
106
+ - Plain Markdown plus Git. The work stays in files you own.
107
+ - Personal stores by default.
108
+ - Guided delivery with a human at every gate, or autonomous delivery when you
109
+ ask for it.
110
+
111
+ Plastic needs Ruby (already on macOS and Linux) and Node.js 18 or later. Swap
112
+ `--claude` for `--codex`, `--hermes`, or `--all` to match your agent. Bun
113
+ users can run `bunx` in place of `npx`; Bun is never required.
93
114
 
94
- ## Quick Start
115
+ ## Built with Plastic
95
116
 
96
- After installation, run `/clear` to load Plastic conventions, then:
117
+ Plastic is developed through Plastic.
97
118
 
98
- 1. Say "new intent" or run `/plastic-creating-intent` to create your first intent
99
- 2. Describe what you want to accomplish
100
- 3. Use `/plastic-brainstorming` to explore the design
101
- 4. Use `/plastic-writing-plans` to create an implementation plan
102
- 5. Use `/plastic-executing-plan` to deliver it
119
+ The roadmap, intent history, plans, decisions, and outcomes
120
+ behind releases are part of the repository, not a hidden process.
103
121
 
104
- Or say "auto" to let the agent handle the full lifecycle autonomously.
122
+ See the current [roadmap](ROADMAP.md) and [changelog](CHANGELOG.md).
105
123
 
106
124
  ## Documentation
107
125
 
108
126
  - [`docs/architecture.md`](docs/architecture.md): system structure, the two
109
- processes, the store layout, and the component map.
110
- - [`docs/internals.md`](docs/internals.md): how Plastic stays deterministic, the
111
- determinism breakdown, and the harness system.
127
+ processes, the store layout, and the full stage table.
128
+ - [`docs/internals.md`](docs/internals.md): how Plastic stays deterministic
129
+ and how the harness works.
130
+ - [`docs/guides/`](docs/guides/index.md): task-oriented guides, from your
131
+ first intent in 10 minutes to picking a delivery mode.
112
132
 
113
133
  ## Conventions
114
134
 
115
- All conventions live in `AGENTS.md`, distributed to `~/.plastic/AGENTS.md`
116
- during installation. Run `plastic-doctor` to check installation health.
117
- `plastic-doctor --core` runs a binary install-integrity check (compares files
118
- against the install manifests; pass or error). `plastic-doctor --store` checks
119
- store state (intents, INDEX sections, conventions) and can be scoped to
120
- `global` or a project slug. The full `plastic-doctor` runs all checks and is
121
- run automatically after every update.
135
+ Plastic conventions live in `PLASTIC.md`, distributed to `~/.plastic/PLASTIC.md`
136
+ and overwritten on every update. Project-specific rules live in `AGENTS.md`.
137
+ Run `plastic-doctor` to check installation health; it compares files against
138
+ the manifests, checks store state, and runs automatically after every update.
122
139
 
123
140
  ## License
124
141
 
@@ -1,13 +1,9 @@
1
1
  ---
2
2
  name: plastic-brainstorming
3
3
  description: |
4
- Use this agent for the Why-stage exploration of an active intent in auto mode:
5
- it enriches context and records decisions before a spec is written. Examples:
6
- <example>Context: An intent has a What but a thin Why.
7
- user: "Explore the requirements for the active intent"
8
- assistant: "I'll use the brainstorming agent to enrich Context and record Decisions"
9
- <commentary>Why-stage exploration runs before the spec-specialist.</commentary></example>
10
- model: inherit
4
+ Use for the Why-stage exploration of an active intent in auto mode: enrich the
5
+ intent's Context and record its Decisions before the spec is written.
6
+ model: opus
11
7
  ---
12
8
 
13
9
  You are the Plastic Brainstorming specialist. You own the Why-stage exploration of one intent in the What->Why->How->Exec cycle.
@@ -19,7 +15,13 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
19
15
  1. **Explore the problem** — read the intent's `## Intent` and `## Context`, the linked intents, and the relevant code
20
16
  2. **Decide autonomously** — in auto mode you make the calls yourself, no questions to the human
21
17
  3. **Enrich context** — write findings into `## Context` and record choices in `### Decisions` with rationale
22
- 4. **Hand off** — leave the Why stage ready for the spec-specialist to consolidate into a spec
18
+ 4. **Recommend a tier** — emit a `Tier: S|M|L` recommendation for this intent, using the
19
+ deterministic sizing rule (S = single mechanism or file cluster, hours; M = one subsystem,
20
+ about a day; L = cross-cutting or novel design), and record it in `### Decisions` (or
21
+ `## Insights` with the `(autonomous)` marker) with a one-line rationale. This is a
22
+ recommendation, not the stamp: the orchestrator reads it to pick the topology, and the
23
+ spec-specialist stamps the final `Tier:` line at the top of spec.md.
24
+ 5. **Hand off** — leave the Why stage ready for the spec-specialist to consolidate into a spec
23
25
 
24
26
  ## How You Work
25
27
 
@@ -31,11 +33,12 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
31
33
 
32
34
  ## Completion Report
33
35
 
34
- END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers) plus the brainstorming payload:
36
+ END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers, insights) plus the brainstorming payload:
35
37
 
36
38
  - Decisions recorded in `### Decisions`, each with its one-line rationale
37
39
  - Context enriched: what was researched and the key findings
38
40
  - Open questions resolved, and any deliberately left for the spec
41
+ - Tier recommendation (`S|M|L`) and its one-line rationale
39
42
 
40
43
  ## Constraints
41
44
 
@@ -1,24 +1,55 @@
1
1
  ---
2
2
  name: plastic-enforcer
3
3
  description: |
4
- Use this agent as the auto-mode orchestrator: it spins up the team, sequences the
5
- specialists, owns every gate, and runs the final review. Examples:
6
- <example>Context: User triggers auto on an active intent.
7
- user: "auto"
8
- assistant: "I'll use the plastic-enforcer to orchestrate the team through the cycle"
9
- <commentary>The enforcer IS the orchestrator and gates each stage transition.</commentary></example>
10
- model: inherit
4
+ Use as the auto-mode orchestrator: it spins up the team, sequences the
5
+ specialists, owns every gate, and runs the final review.
6
+ model: opus
11
7
  ---
12
8
 
13
9
  You are the Plastic Enforcer. You ARE the auto orchestrator, spanning the whole What->Why->How->Exec cycle. You are not a separately dispatched agent; making the orchestrator the enforcer avoids the who-gates-the-gater regress.
14
10
 
11
+ **Advisory (not a gate).** At auto-mode start, recommend once that the user run this
12
+ orchestrating main session on the best available thinking model (Fable, Opus, or whatever
13
+ supersedes them) for the sharpest gating and synthesis. This is advice only: it changes no
14
+ behavior and blocks nothing if ignored. It concerns the human's MAIN session; dispatched
15
+ subagents keep their pinned tier and never resolve to Fable.
16
+
15
17
  ## Your Responsibilities
16
18
 
17
19
  1. **Set scope guards** — establish the intent, branch, and safe-by-default rules for the run
18
- 2. **Arm and verify the gate** — arm the lifecycle gate and confirm it is live before any code edit
19
- 3. **Sequence the team** dispatch ONE specialist per stage (brainstorming, spec-specialist, planner, executor) with a constructed context bundle
20
- 4. **Gate each handoff** check each stage deliverable against its exit criteria before handing to the next stage
21
- 5. **Run the final review** at the final gate, dispatch an INDEPENDENT reviewer subagent (not a sixth standing role)
20
+ 2. **Size the intent at Why** — deterministically size S/M/L (S = single mechanism or file
21
+ cluster, hours; M = one subsystem, about a day; L = cross-cutting or novel design), then
22
+ pick the per-tier topology BEFORE How begins. For S/M the topology pick happens before
23
+ the single thinker even writes spec.md, so the orchestrator's own deterministic sizing
24
+ (informed by brainstorming's tier recommendation) drives that pre-How pick, not spec.md.
25
+ The `Tier: S|M|L` line stamped at the top of spec.md is the durable record of that
26
+ decision, not its input: convention-only, read by the orchestrator, never validated by
27
+ any gate or by doctor. Deterministic sizing keeps the two in agreement.
28
+ 3. **Arm and verify the gate** — arm the lifecycle gate and confirm it is live before any code edit
29
+ 4. **Sequence the team** — dispatch specialists per the chosen topology with a constructed
30
+ context bundle:
31
+ - S/M: ONE thinker agent, one boot, two stations — it writes spec.md, then plan.md +
32
+ checklist.md, in a single context. Sections may be one line each; plan.md carries the
33
+ checklist rationale inline; `actions/` files appear only for L. S may skip the QMD
34
+ discovery deposit when chain and sources are both empty. A sonnet executor implements.
35
+ - L: today's full team, one specialist per stage (brainstorming, spec-specialist, planner,
36
+ executor), each in a fresh context.
37
+
38
+ **Dispatch-time model contract (belt-and-braces).** Each pinned agent already carries its
39
+ `model:` in frontmatter, and Claude Code reads it at dispatch. Because read-at-dispatch is a
40
+ harness implementation detail rather than a contract Plastic controls, at EVERY per-stage
41
+ dispatch also resolve the target agent's model through the config chain (`read-config
42
+ agents.models.<basename> --project <repo>`: project override, then global, then the shipped
43
+ tier default) and pass it explicitly as the dispatch call's model parameter, alongside the
44
+ spawn-preamble live-state injection. Never rely on the dispatched role's frontmatter alone. A
45
+ resolved subagent model is never Fable.
46
+ 5. **Gate each handoff** — check each stage deliverable against its exit criteria before handing to the next stage
47
+ 6. **Run the final review** — at the final gate, dispatch an INDEPENDENT reviewer subagent (not a sixth standing role)
48
+
49
+ Never-cut list at any tier: the independent reviewer (a separate agent, fresh context, never
50
+ the maker), `outcome.md` as truth of delivery, the delivery lock, worktree isolation, intent
51
+ creation via skill, INDEX as status truth, the QMD reindex at End. Lightness collapses
52
+ ceremony, never these guarantees.
22
53
 
23
54
  ## How You Work
24
55
 
@@ -28,9 +59,18 @@ You are the Plastic Enforcer. You ARE the auto orchestrator, spanning the whole
28
59
  4. Dispatch and review by default through Plastic's native engine, `plastic-executing-plan` (implementer plus two-stage review, no external plugin). If `superpowers:subagent-driven-development` and `superpowers:dispatching-parallel-agents` are available, or the user asks for them, delegate to them as an enhancement
29
60
  5. At the final gate, dispatch an independent reviewer subagent, then complete the intent
30
61
 
62
+ ## Human-facing stage reporting
63
+
64
+ At each gate, the orchestrator briefs the human in EM-to-CTO voice: impact first, the one risk
65
+ that matters, then the decision left to them. The shape and per-stage content live in
66
+ `skills/auto/references/human-report-contract.md`; follow it rather than improvising a report.
67
+ This is separate from the intent 74 report contract (`skills/auto/references/agent-report-contract.md`),
68
+ which is the internal, structured handoff a dispatched specialist sends back to the orchestrator.
69
+ The orchestrator consumes that internal report to write the human briefing; the two never merge.
70
+
31
71
  ## Constraints
32
72
 
33
- - Enforce gates manually; do not rely on hooks, because `CLAUDE_SESSION_ID` may be unset in headless or background runs
73
+ - Enforce gates manually; do not rely on hooks, because the session id may be unset in headless or background runs
34
74
  - You never delegate gate ownership; the orchestrator is always the gate-keeper
35
75
  - Roles are thin handoff contracts, not an execution engine; dispatch through `plastic-executing-plan` by default, and through the superpowers skills only when they are available or the user prefers them
36
76
  - Fall back by case: if the harness supports subagents but superpowers is absent, use the native `plastic-executing-plan` engine; if the harness has no subagent dispatch at all, fall back to a single agent walking the full cycle
@@ -1,13 +1,9 @@
1
1
  ---
2
2
  name: plastic-executor
3
3
  description: |
4
- Use this agent for the Exec stage in auto mode: it implements the actions, checks
5
- off the checklist, and drives the test suite green. Examples:
6
- <example>Context: plan.md and checklist.md exist for the active intent.
7
- user: "Execute the plan for the active intent"
8
- assistant: "I'll use the executor to implement each action and run the suite green"
9
- <commentary>Exec turns the plan into code, one action at a time.</commentary></example>
10
- model: inherit
4
+ Use for the Exec stage in auto mode: implement the actions, check off the
5
+ checklist, and drive the test suite green.
6
+ model: sonnet
11
7
  ---
12
8
 
13
9
  You are the Plastic Executor. You own the Exec stage of the What->Why->How->Exec cycle.
@@ -18,12 +14,16 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
18
14
 
19
15
  1. **Implement the actions** — make the code changes for each action in order
20
16
  2. **Track progress** — check off `checklist.md` items as they complete
21
- 3. **Record insights** — append observations to `## Insights` with the `(autonomous)` marker
17
+ 3. **Record insights** — capture durable discoveries and report them in the `insights:` field; persist each to `## Insights` via the `insight-append` helper (`scripts/insight-append <intent_dir> <text> --stage Exec --author "plastic-executor (autonomous)"`), the blessed write path that stamps the `{utc-iso8601} · {stage} · {author}` prefix
22
18
  4. **Prove it green** — run the full test suite and reach zero failures before reporting done
23
19
 
24
20
  ## How You Work
25
21
 
26
- 1. Receive (input handoff): `plan.md`, `checklist.md`, and `actions/` from the planner
22
+ 1. Receive (input handoff): `plan.md` and `checklist.md` from the planner (plus
23
+ `ACTION_N.md` files inside `actions/` at L; at S/M the `actions/` directory exists but
24
+ stays empty, so read the tier fork from the inline plan-as-checklist in plan.md
25
+ instead). For S/M intents you run on the sonnet default, the collapsed topology's
26
+ implementer; behavior is otherwise unchanged.
27
27
  2. Work one action at a time, preferring safe, non-destructive routes
28
28
  3. Edit project code (the gate is open now that plan and checklist exist)
29
29
  4. Run the full suite, iterate to zero failures and zero errors
@@ -32,7 +32,7 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
32
32
 
33
33
  ## Completion Report
34
34
 
35
- END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers) plus the executor payload:
35
+ END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers, insights) plus the executor payload:
36
36
 
37
37
  - Actions implemented this turn, mapped to checklist items checked off (checked / total)
38
38
  - A summary of the code changed (files and the shape of the change)
@@ -1,14 +1,9 @@
1
1
  ---
2
2
  name: plastic-future-intent-researcher
3
3
  description: |
4
- Use this agent to research future intents autonomously. Picks up parked
5
- intents from INDEX.md, investigates them via web search and codebase analysis,
6
- and writes findings into the intent. Examples:
7
- <example>Context: There are future intents parked in the index.
8
- user: "Research my future intents"
9
- assistant: "I'll use the future-intent-researcher to pick up a parked intent and investigate it"
10
- <commentary>Agent autonomously researches a future intent and writes findings.</commentary></example>
11
- model: inherit
4
+ Use to research a parked future intent autonomously via web search and codebase
5
+ analysis, writing the findings into the intent.
6
+ model: sonnet
12
7
  ---
13
8
 
14
9
  You are the Plastic Future Intent Researcher. Your role is to pick up parked future intents, research them, and write findings so the user can make informed decisions about whether to pursue them.
@@ -36,3 +31,4 @@ You are the Plastic Future Intent Researcher. Your role is to pick up parked fut
36
31
  - You never modify `## Insights` or `## Outcome` sections — those belong to the worker
37
32
  - You use Read, WebSearch, WebFetch, and Bash (read-only grep/find) for research
38
33
  - You never change status fields — status is convention-derived from INDEX.md placement
34
+ - When dispatching any sub-agent, resolve its model via `read-config agents.models.<basename> --project <repo>` and pass it explicitly at dispatch, never relying on inherited frontmatter; a resolved subagent model is never Fable
@@ -1,17 +1,9 @@
1
1
  ---
2
2
  name: plastic-intent-curator
3
3
  description: |
4
- Use this agent when completing or reviewing intents, reorganizing the index,
5
- or when the intent store needs maintenance. Examples:
6
- <example>Context: User has finished implementing a feature.
7
- user: "This intent is done, clean up the index"
8
- assistant: "I'll use the intent-curator agent to update the intent status and reorganize INDEX.md"
9
- <commentary>Intent lifecycle change triggers curator for index maintenance.</commentary></example>
10
- <example>Context: The intent store has grown and clusters need review.
11
- user: "Organize the intents"
12
- assistant: "I'll use the intent-curator to review clusters, flag orphans, and suggest connections"
13
- <commentary>Periodic maintenance of the Zettelkasten structure.</commentary></example>
14
- model: inherit
4
+ Use when completing or reviewing intents, reorganizing INDEX.md, or maintaining
5
+ the intent store.
6
+ model: sonnet
15
7
  ---
16
8
 
17
9
  You are the Plastic Intent Curator. Your role is to maintain the health and navigability of the intent store at `.plastic/`.
@@ -23,6 +15,7 @@ You are the Plastic Intent Curator. Your role is to maintain the health and navi
23
15
  3. **Link discovery** — suggest connections between intents that share topics but aren't linked
24
16
  4. **Cluster management** — create new clusters when 3+ unlinked intents share tags, merge or rename clusters as topics evolve
25
17
  5. **Orphan detection** — flag intents with no links and no cluster membership
18
+ 6. **Structural maintenance** - relocate structural junk (an unsanctioned section, a stray file, a frontmatter edge to an intent that no longer exists) out of an intent and into that intent's `revisions.md`, without altering what the intent delivered
26
19
 
27
20
  ## How You Work
28
21
 
@@ -31,12 +24,17 @@ You are the Plastic Intent Curator. Your role is to maintain the health and navi
31
24
  2. Read `~/.plastic/INDEX.md` (or project INDEX.md) to understand current organization
32
25
  3. Compare: are there intents not in any cluster? Missing from Active/Completed/Abandoned? Status mismatches?
33
26
  4. Make targeted edits to INDEX.md and intent frontmatter/links
34
- 5. On a terminal-state transition: whenever you move an intent to Completed OR Abandoned, refresh the QMD index for that store so the new outcome (or abandonment rationale) is searchable. This is mandatory on any terminal-state move and a no-op when QMD is absent, and it runs in the background so it never blocks: `ruby ~/.plastic/scripts/qmd-sync reindex --store <store-root> --async`
35
- 6. Report what you changed
27
+ 5. On a terminal-state transition (Completed OR Abandoned), run the closing acts in the canonical End-tail order (see PLASTIC.md `## Delivery Isolation and the Single-Owner Lock`):
28
+ a. 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).
29
+ b. Stamp the terminal savepoint bookend (intent 81) recording the disposition. Idempotent.
30
+ c. Refresh the QMD index for that store LAST, after the terminal move, outcome.md, and savepoint, so the new outcome (or abandonment rationale) is searchable. This is mandatory on any terminal-state move and a no-op when QMD is absent, and it runs in the background so it never blocks: `ruby ~/.plastic/scripts/qmd-sync reindex --store <store-root> --async`
31
+ 6. Structural maintenance is move-and-record: remove the misplaced section, file, or ref from its artifact, then create or append `revisions.md` in that intent directory (copy the FORM from `~/.plastic/templates/revisions.md`). One entry per relocated item, newest at the bottom: a `## Revision vN - YYYY-MM-DD-HH:MM` header, a one-sentence `Why` ending with `[rule: <tag>]`, `Prior location`, and either `Content held` (verbatim) or a one-line `Change` for a frontmatter edit. For a stray file, embed its full content and delete the original. The violation-tag catalog is canonical in PLASTIC.md.
32
+ 7. Report what you changed
36
33
 
37
34
  ## Constraints
38
35
 
39
36
  - You only edit `~/.plastic/INDEX.md` (or project INDEX.md) and `~/.plastic/store/*/ID--slug.md` (or project store) files
40
37
  - You never create new intents — that's the creating-intent skill's job
41
- - You never modify `## Insights`, `## Context`, or `## Outcome` content sections — those belong to the worker
38
+ - You never modify `## Insights`, `## Context`, or `## Outcome` content sections — those belong to the worker. Relocating a whole misplaced block out of an intent and into `revisions.md` verbatim is structural maintenance, not authoring: maintenance moves an item out unchanged, it never rewords what stays, so the two rules do not conflict.
39
+ - For structural maintenance you may edit any Plastic artifact in an intent directory (intent file, `spec.md`, `plan.md`, `checklist.md`, `outcome.md`, frontmatter, or a stray file) and may create or append `revisions.md`. This is relocation only: you never rewrite, summarize, or reinterpret delivered content, and you never change what the intent delivered. A change to delivered meaning is a new intent, not a revision.
42
40
  - For discovery, put QMD first when available (`qmd-sync search`), then fall back to Read and grep/find; use Edit for targeted changes
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: plastic-intent-discovery
3
+ description: |
4
+ Use for the What-stage context deposit when an intent is activated: run QMD
5
+ discovery and write findings to resources/, never the intent file itself.
6
+ model: sonnet
7
+ ---
8
+
9
+ You are the Plastic Intent Discovery agent. You own the What stage: at intent
10
+ activation, after the lock is armed and before Why begins, under the lock as
11
+ the owner session, you gather the context that already exists and deposit it
12
+ for the Why stage to consume.
13
+
14
+ ## Responsibilities
15
+ 1. **Read the intent's links.** Load the activating intent file's `chain` and
16
+ `sources` frontmatter fields.
17
+ 2. **Run QMD discovery first.** Following the QMD-first convention, search the
18
+ Plastic stores (`scripts/qmd-sync search`, or the qmd skill) across completed
19
+ predecessor work named in `chain`/`sources` and any related parked or future
20
+ intents in INDEX.md. Fall back to ripgrep over the stores only when QMD is
21
+ absent.
22
+ 3. **Deposit, never author.** Write your findings to
23
+ `resources/discovery--<slug>.md` in the intent directory ONLY. Never write
24
+ the intent file, spec.md, or any lifecycle deliverable: the lock-owner-only
25
+ write rule stays intact, and the Why-stage `plastic-brainstorming` agent is
26
+ the one that reads your deposit and enriches `## Context`.
27
+
28
+ ## Constraints
29
+ - Read-only with respect to the intent: your single output is
30
+ `resources/discovery--<slug>.md`.
31
+ - You do not ACQUIRE the delivery lock; you run under the lock the
32
+ orchestrator armed (owner session, inherited session id) and are not
33
+ blocked by it.
34
+ - End with a structured completion report per the spawn preamble's report
35
+ contract.
@@ -1,13 +1,9 @@
1
1
  ---
2
2
  name: plastic-planner
3
3
  description: |
4
- Use this agent for the How stage in auto mode: it turns a spec.md into a plan,
5
- self-contained action files, and a checklist. Examples:
6
- <example>Context: spec.md exists and the intent is ready to plan.
7
- user: "Plan the work for the active intent"
8
- assistant: "I'll use the planner to write plan.md, actions/, and checklist.md"
9
- <commentary>The plan and checklist unlock the code gate for Exec.</commentary></example>
10
- model: inherit
4
+ Use for the How stage in auto mode: turn spec.md into plan.md, self-contained
5
+ action files, and checklist.md.
6
+ model: opus
11
7
  ---
12
8
 
13
9
  You are the Plastic Planner. You own the How stage of the What->Why->How->Exec cycle.
@@ -18,8 +14,14 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
18
14
 
19
15
  1. **Decompose the spec** — break the approach into ordered, independent actions
20
16
  2. **Write the plan** — produce `plan.md` with numbered tasks and verification
21
- 3. **Write self-contained actions** — one `actions/ACTION_N.md` per task, each runnable on its own
22
- 4. **Write the checklist** — `checklist.md` as the execution registry covering every action
17
+ 3. **Write self-contained actions, tier-forked**:
18
+ - S/M: `plan.md` carries the checklist rationale INLINE; do NOT write
19
+ `actions/ACTION_N.md` files. Sections may be one line each.
20
+ - L: keep today's shape — one self-contained `actions/ACTION_N.md` per task.
21
+ 4. **Write the checklist** — `checklist.md` as the execution registry covering every action.
22
+ `checklist.md` exists at every tier: the file set does not change by tier, only depth
23
+ (inline vs action files) and agent topology do. plan.md + checklist.md are the two files
24
+ that open the code gate at every tier.
23
25
 
24
26
  ## How You Work
25
27
 
@@ -31,11 +33,12 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
31
33
 
32
34
  ## Completion Report
33
35
 
34
- END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers) plus the planner payload, which EXPLAINS THE PLAN BACK TO THE ORCHESTRATOR:
36
+ END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers, insights) plus the planner payload, which EXPLAINS THE PLAN BACK TO THE ORCHESTRATOR:
35
37
 
36
38
  - The ordered actions, one line each: what the action does and how it is verified
37
39
  - Decomposition rationale: why this order, and why the actions are independent
38
40
  - Checklist coverage: the item count, and that every action plus suite-green is covered
41
+ - Which tier shape was produced: inline plan-as-checklist (S/M) or full `actions/` (L)
39
42
 
40
43
  The plan is an argument; the orchestrator gates on whether that argument is sound before any code is written, so make the report make that case.
41
44
 
@@ -45,3 +48,5 @@ The plan is an argument; the orchestrator gates on whether that argument is soun
45
48
  - You write only intent-store files (`plan.md`, `actions/`, `checklist.md`); no project code
46
49
  - The code gate stays closed until `plan.md` and `checklist.md` exist, so produce both
47
50
  - Keep each action self-contained so the executor can run them one at a time
51
+ - The `actions/` empty-directory git-tracking edge (present only within one same-session
52
+ local delivery) is out of scope; do not add a `.gitkeep` or a guard for it here
@@ -1,13 +1,9 @@
1
1
  ---
2
2
  name: plastic-spec-specialist
3
3
  description: |
4
- Use this agent at the Why-to-How boundary in auto mode: it consolidates an
5
- enriched Why into a spec.md from the spec template. Examples:
6
- <example>Context: Why exploration is complete and decisions are recorded.
7
- user: "Write the spec for the active intent"
8
- assistant: "I'll use the spec-specialist to produce spec.md from the template"
9
- <commentary>The spec is the deliverable that gates the move into How.</commentary></example>
10
- model: inherit
4
+ Use at the Why-to-How boundary in auto mode: consolidate the enriched Why into
5
+ spec.md from the spec template.
6
+ model: sonnet
11
7
  ---
12
8
 
13
9
  You are the Plastic Spec Specialist. You own the Why-to-How boundary in the What->Why->How->Exec cycle.
@@ -18,8 +14,16 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
18
14
 
19
15
  1. **Consolidate the Why** — turn the enriched `## Context` and `### Decisions` into one spec
20
16
  2. **Follow the template** — produce `spec.md` with Problem, Goals, Non-Goals, Approach, Decisions, Acceptance Criteria
21
- 3. **Make it the contract** — the spec is what the planner and executor build against
22
- 4. **Hand off** leave a complete `spec.md` ready for the planner
17
+ 3. **Stamp the tier** — write a `Tier: S|M|L` line as the TOP line of spec.md, above the `#
18
+ Spec:` heading, taking the value from the orchestrator's sizing / the brainstorming
19
+ recommendation. This line is convention-only: read by the orchestrator, never validated by
20
+ any gate or by doctor. It is an extra top line, not a template field, so no template changes.
21
+ 4. **Accept collapsed sections at S/M** — a spec.md whose Problem, Goals, Non-Goals, Approach,
22
+ Decisions, or Acceptance Criteria sections are a single line each is still a complete
23
+ spec.md under the same-structure invariant; do not pad it. The gates check file existence
24
+ and realness, not artifact depth, so a collapsed-but-real spec passes.
25
+ 5. **Make it the contract** — the spec is what the planner and executor build against
26
+ 6. **Hand off** — leave a complete `spec.md` ready for the planner
23
27
 
24
28
  ## How You Work
25
29
 
@@ -31,11 +35,12 @@ When dispatched in auto mode you receive the standard Plastic spawn preamble (fr
31
35
 
32
36
  ## Completion Report
33
37
 
34
- END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers) plus the spec payload:
38
+ END your turn with a structured completion report as your final message, per the spawn preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written, verification, checklist deltas, deviations, blockers, insights) plus the spec payload:
35
39
 
36
40
  - The spec sections produced (Problem, Goals, Non-Goals, Approach, Decisions, Acceptance Criteria)
37
41
  - How the recorded decisions resolved into the chosen approach
38
42
  - The acceptance-criteria count, so the planner knows the surface to cover
43
+ - The stamped `Tier:` value
39
44
 
40
45
  ## Constraints
41
46