@zalom/plastic 1.14.0 → 2.0.0-alpha.1

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 (190) hide show
  1. package/PLASTIC.md +101 -294
  2. package/README.md +5 -6
  3. package/agents/plastic-advisor.md +18 -17
  4. package/agents/plastic-enforcer.md +57 -69
  5. package/agents/plastic-executor.md +34 -20
  6. package/agents/plastic-faux-advisor.md +18 -18
  7. package/config_asks.yml +38 -0
  8. package/hooks/capture +4 -0
  9. package/hooks/check-update +12 -3
  10. package/hooks/close +5 -0
  11. package/hooks/hooks.json +9 -49
  12. package/hooks/record +4 -0
  13. package/package.json +3 -2
  14. package/scripts/agent-report +8 -9
  15. package/scripts/append-ledger +195 -0
  16. package/scripts/codex-hook +101 -95
  17. package/scripts/dashboard.rb +4 -4
  18. package/scripts/doctor.rb +106 -43
  19. package/scripts/end-intent +77 -76
  20. package/scripts/exec-worktree +11 -20
  21. package/scripts/file-session-intent +61 -0
  22. package/scripts/hook-capture +242 -0
  23. package/scripts/hook-close +34 -0
  24. package/scripts/hook-record +149 -0
  25. package/scripts/hook-session-start +95 -12
  26. package/scripts/install.rb +8 -6
  27. package/scripts/lib/agent_models.rb +1 -7
  28. package/scripts/lib/arm.rb +283 -0
  29. package/scripts/lib/backfill_intent.rb +316 -0
  30. package/scripts/lib/bridge.rb +24 -1597
  31. package/scripts/lib/doctor_core.rb +17 -88
  32. package/scripts/lib/doctor_session_ledger.rb +106 -0
  33. package/scripts/lib/exec_worktree.rb +14 -60
  34. package/scripts/lib/harness_text.rb +5 -4
  35. package/scripts/lib/hook_registry.rb +44 -107
  36. package/scripts/lib/insights.rb +3 -4
  37. package/scripts/lib/installer_core.rb +19 -30
  38. package/scripts/lib/lock.rb +6 -26
  39. package/scripts/lib/outcome_guard.rb +7 -5
  40. package/scripts/lib/project_validator.rb +30 -1
  41. package/scripts/lib/roadmap_queue.rb +3 -3
  42. package/scripts/lib/roadmap_savepoint.rb +1 -1
  43. package/scripts/lib/rule_catalog.rb +6 -3
  44. package/scripts/lib/savepoint.rb +320 -0
  45. package/scripts/lib/scaffold_intent.rb +13 -179
  46. package/scripts/lib/session_backfill.rb +184 -0
  47. package/scripts/lib/session_close.rb +84 -0
  48. package/scripts/lib/session_git.rb +469 -0
  49. package/scripts/lib/session_ledger.rb +497 -0
  50. package/scripts/lib/store_discovery.rb +1 -1
  51. package/scripts/lib/store_provisioning.rb +1 -1
  52. package/scripts/maintenance-run +7 -7
  53. package/scripts/new-intent +63 -4
  54. package/scripts/plastic-lock +94 -41
  55. package/scripts/promote-session-item +150 -0
  56. package/scripts/rebuild-graph +1 -1
  57. package/scripts/roadmap-next +2 -2
  58. package/scripts/rollback.rb +42 -3
  59. package/scripts/scaffold-intent +37 -63
  60. package/scripts/session-commit +116 -0
  61. package/scripts/spawn-preamble +5 -5
  62. package/scripts/update.rb +7 -3
  63. package/skills/agent-advisor/SKILL.md +3 -3
  64. package/skills/agent-advisor/references/advisor-protocol.md +20 -20
  65. package/skills/auto/SKILL.md +218 -317
  66. package/skills/auto/evals/evals.json +10 -10
  67. package/skills/auto/references/agent-architecture.md +102 -90
  68. package/skills/auto/references/agent-report-contract.md +4 -21
  69. package/skills/auto/references/end-tail.md +47 -53
  70. package/skills/auto/references/human-report-contract.md +8 -8
  71. package/skills/conventions/SKILL.md +1 -3
  72. package/skills/conventions/references/lifecycle-and-savepoints.md +35 -1
  73. package/skills/conventions/references/locks-and-worktrees.md +47 -55
  74. package/skills/conventions/references/maintenance-and-revisions.md +12 -12
  75. package/skills/dashboard/SKILL.md +1 -1
  76. package/skills/direct/SKILL.md +66 -0
  77. package/skills/direct/references/request-signals.md +59 -0
  78. package/skills/doctor/SKILL.md +58 -11
  79. package/skills/doctor/report.md +3 -1
  80. package/skills/install/SKILL.md +11 -9
  81. package/skills/intent-continuing/SKILL.md +131 -89
  82. package/skills/intent-continuing/references/boarding-matrix.md +34 -0
  83. package/skills/intent-continuing/references/context-management.md +2 -2
  84. package/skills/intent-creating/SKILL.md +2 -2
  85. package/skills/intent-creating/references/lifecycle.md +1 -1
  86. package/skills/intent-ending/SKILL.md +28 -37
  87. package/skills/intent-ending/evals/evals.json +4 -4
  88. package/skills/intent-executing/SKILL.md +12 -49
  89. package/skills/intent-executing/plan-reviewer-prompt.md +39 -0
  90. package/skills/intent-speccing/SKILL.md +108 -51
  91. package/skills/intent-speccing/evals/evals.json +5 -5
  92. package/skills/intent-speccing/references/per-section-fill-rules.md +4 -4
  93. package/skills/intent-speccing/references/self-verify-checklist.md +1 -2
  94. package/skills/project-creating/SKILL.md +1 -1
  95. package/skills/releasing/SKILL.md +7 -8
  96. package/skills/tutorial/SKILL.md +2 -2
  97. package/skills/tutorial/references/track-1-guided.md +16 -18
  98. package/skills/tutorial/references/track-2-auto.md +12 -13
  99. package/skills/tutorial/references/track-3-projects-and-roadmaps.md +2 -2
  100. package/templates/agents.md +4 -7
  101. package/templates/project.yml +7 -0
  102. package/templates/roadmap.md +1 -1
  103. package/templates/savepoint.md +2 -2
  104. package/templates/session-intent.md +29 -0
  105. package/agents/plastic-brainstorming.md +0 -48
  106. package/agents/plastic-future-intent-researcher.md +0 -35
  107. package/agents/plastic-intent-curator.md +0 -47
  108. package/agents/plastic-intent-discovery.md +0 -43
  109. package/agents/plastic-planner.md +0 -56
  110. package/agents/plastic-spec-specialist.md +0 -53
  111. package/hooks/auto-arm +0 -5
  112. package/hooks/bash-gate +0 -3
  113. package/hooks/continue +0 -31
  114. package/hooks/edit-gates +0 -3
  115. package/hooks/future-intent-check +0 -25
  116. package/hooks/gate-check +0 -12
  117. package/hooks/power-tools +0 -8
  118. package/scripts/hook-auto-arm +0 -51
  119. package/scripts/hook-bash-gate +0 -78
  120. package/scripts/hook-code-gate +0 -38
  121. package/scripts/hook-continue +0 -48
  122. package/scripts/hook-create-gate +0 -51
  123. package/scripts/hook-edit-gates +0 -58
  124. package/scripts/hook-future-intent-check +0 -90
  125. package/scripts/hook-gate-check +0 -169
  126. package/scripts/hook-links-gate +0 -54
  127. package/scripts/hook-lock-gate +0 -47
  128. package/scripts/hook-power-tools +0 -38
  129. package/scripts/hook-savepoint-pre +0 -32
  130. package/scripts/lib/codex_edit_gates.rb +0 -138
  131. package/scripts/lib/edit_gates.rb +0 -398
  132. package/scripts/lib/links_gate.rb +0 -140
  133. package/scripts/lib/qmd_hook.rb +0 -41
  134. package/scripts/lib/spec_header.rb +0 -83
  135. package/scripts/lib/start_intent.rb +0 -296
  136. package/scripts/start-intent +0 -89
  137. package/skills/_active-intent-gate.md +0 -26
  138. package/skills/auto/references/tiers.md +0 -100
  139. package/skills/continuing/SKILL.md +0 -34
  140. package/skills/continuing/evals/evals.json +0 -91
  141. package/skills/conventions/references/gates-and-enforcement.md +0 -53
  142. package/skills/conventions/references/tiers-and-dispatch.md +0 -135
  143. package/skills/doctor/references/gates-stuck-detection.md +0 -43
  144. package/skills/intent-brainstorming/SKILL.md +0 -118
  145. package/skills/intent-brainstorming/evals/evals.json +0 -67
  146. package/skills/intent-continuing/evals/evals.json +0 -145
  147. package/skills/intent-discovering/SKILL.md +0 -56
  148. package/skills/intent-grilling/SKILL.md +0 -108
  149. package/skills/intent-linking/SKILL.md +0 -128
  150. package/skills/intent-linking/evals/evals.json +0 -22
  151. package/skills/intent-linking/references/zettelkasten.md +0 -45
  152. package/skills/intent-locking/SKILL.md +0 -64
  153. package/skills/intent-planning/SKILL.md +0 -145
  154. package/skills/intent-planning/evals/evals.json +0 -81
  155. package/skills/intent-planning/references/plan-format.md +0 -130
  156. package/skills/intent-researching/SKILL.md +0 -123
  157. package/skills/intent-researching/evals/evals.json +0 -22
  158. package/skills/intent-savepoint/SKILL.md +0 -83
  159. package/skills/intent-savepoint/references/context-management.md +0 -32
  160. package/skills/intent-starting/SKILL.md +0 -151
  161. package/skills/intent-starting/evals/evals.json +0 -117
  162. package/skills/intent-starting/references/boarding-matrix.md +0 -35
  163. package/skills/project-continuing/SKILL.md +0 -119
  164. package/skills/project-continuing/evals/evals.json +0 -100
  165. package/skills/roadmap-continuing/SKILL.md +0 -89
  166. package/skills/roadmap-continuing/evals/evals.json +0 -82
  167. package/skills/skill-creating/SKILL.md +0 -75
  168. package/skills/skill-creating/evals/evals.json +0 -108
  169. package/skills/skill-creating/references/agents.md +0 -168
  170. package/skills/skill-creating/references/defaults-first.md +0 -23
  171. package/skills/skill-creating/references/evals.md +0 -41
  172. package/skills/skill-creating/references/hooks.md +0 -251
  173. package/skills/skill-creating/references/progressive-disclosure.md +0 -176
  174. package/skills/skill-creating/references/scripts.md +0 -166
  175. package/skills/skill-creating/references/skills.md +0 -169
  176. package/skills/skill-creating/scripts/scaffold.rb +0 -313
  177. package/skills/skill-evaluating/SKILL.md +0 -141
  178. package/skills/skill-evaluating/assets/eval-template.json +0 -12
  179. package/skills/skill-evaluating/evals/evals.json +0 -75
  180. package/skills/skill-evaluating/references/convention-checks.md +0 -76
  181. package/skills/skill-evaluating/references/eval-methodology.md +0 -154
  182. package/skills/store-curating/SKILL.md +0 -64
  183. package/skills/store-curating/evals/evals.json +0 -38
  184. package/skills/store-indexing/SKILL.md +0 -93
  185. package/skills/store-indexing/evals/evals.json +0 -22
  186. package/skills/store-indexing/references/zettelkasten-linking.md +0 -32
  187. package/skills/store-provisioning/SKILL.md +0 -55
  188. /package/skills/{project-continuing → intent-continuing}/references/board-fill.md +0 -0
  189. /package/skills/{roadmap-continuing → intent-continuing}/references/liveness-ranking.md +0 -0
  190. /package/skills/{intent-brainstorming → intent-speccing}/references/design-principles.md +0 -0
@@ -1,53 +0,0 @@
1
- # Gates and Enforcement
2
-
3
- This chapter holds the escape-and-logging depth for each transition gate.
4
-
5
- #### Hook and skill naming and ownership
6
-
7
- The `plastic-` prefix is reserved for both surfaces: hooks `HookRegistry` registers and skills
8
- Plastic ships. A user-owned hook or skill must never take it: the installer purges Plastic's
9
- registrations from the agent's hook config on every update, matching by registry launcher name
10
- (current plus `RETIRED_HOOK_NAMES`), and doctor reports every violation it can find. On disk,
11
- `hooks_no_orphans` reports an unregistered `plastic-*` launcher file the registry does not know.
12
- In the live config, `hooks_entries_owned` (Claude) and `codex_hooks_entries_owned` (Codex)
13
- report a config entry that is neither a current registration nor recognizably ours, and,
14
- separately, a current registration whose launcher file is missing from disk. For skills,
15
- `stray_skills` reports a `plastic-*` skill directory the manifest does not track. Renaming or
16
- removing a hook from `events` means adding its old name to `RETIRED_HOOK_NAMES` in the same
17
- change, or every existing install keeps a dead registration.
18
-
19
- #### The gates by name
20
-
21
- Each gate guards one thing. `scripts/lib/hook_registry.rb` is the single source of truth for
22
- registration. On the edit path (Write, Edit, NotebookEdit, and MCP structural edits) five
23
- gates run inside one dispatcher process per write, in this fixed order with the first deny
24
- winning:
25
-
26
- - **savepoint-pre** appends the `started` savepoint ledger line before a write into an intent
27
- directory; it records and never denies.
28
- - **lock-gate** arbitrates ownership and claims: it admits only the intent's lock owner or a
29
- registered delegate to write into an active intent directory, and every deny names the
30
- resolving `plastic-lock` command.
31
- - **code-gate** denies a code edit before How is delivered and a code edit outside the
32
- provisioned worktree (stage rule or worktree rule, first match wins). It carries the audited
33
- `# plastic-ok` escape described under bash-gate.
34
- - **links-gate** is the write-time belt for the `## Links` contract: hand-written links lines
35
- that do not project from the `sources`/`chain` frontmatter are denied.
36
- - **create-gate** validates the proposed intent file at What write-time (Write, Edit, and MCP
37
- edits), so a malformed or incomplete intent never lands.
38
-
39
- Alongside the edit-path dispatcher the registry defines:
40
-
41
- - **bash-gate** (on the Bash matcher) intercepts a write attempted through a bash or interpreter
42
- one-liner (a heredoc, a `>` redirect, a `ruby -e` or `python -c` write), so the same rules
43
- apply whether an edit goes through the Write tool or a shell. A trailing `# plastic-ok`
44
- comment is an auditable escape that lets a deliberate command through, and every use is
45
- logged to `~/.plastic/.cache/gate-escapes.log`. The code gate (Write and Edit) carries the
46
- identical audited `# plastic-ok` escape, logged to the same file. The escape does not extend
47
- to `NotebookEdit` or MCP structural edits: they are still gated, just without an escape hatch.
48
- - **gate-check** (PostToolUse on Write and Edit) enforces lifecycle stage order (spec.md before
49
- plan.md, the plan triplet before the checklist, all checklist items before outcome.md).
50
- - **future-intent-check** (UserPromptSubmit) surfaces parked future intents whose keywords match
51
- the user's message; like the other prompt-time hooks (continue, auto-arm, power-tools) it
52
- informs and never denies.
53
-
@@ -1,135 +0,0 @@
1
- # Tiers and Dispatch
2
-
3
- This chapter holds tier depth beyond the S/M/L definition, the agent-model and dispatch mechanics, and the auto-mode human reporting contract.
4
-
5
- Speed comes from two levers only: artifact content depth and agent topology. The
6
- same-structure invariant holds: same file set, stage order, gates, and savepoint ledger at
7
- every tier and in both modes.
8
-
9
- S/M collapse the topology (one thinker agent writes spec.md then plan.md plus
10
- checklist.md plus at least one real action file in one context, consolidated into a single
11
- actions/ACTION_1.md at S/M and one file per task at L; a sonnet executor implements). L
12
- keeps the full team.
13
-
14
- Never cut at any tier: the independent reviewer, outcome.md as truth of delivery, the
15
- delivery lock, worktree isolation, intent creation via skill, INDEX as status truth, the
16
- QMD reindex at End.
17
-
18
- Guided mode is unchanged: full-depth artifacts, the human at every gate.
19
-
20
- Every lifecycle stage has exactly one dispatchable background agent, plus the enforcer that
21
- orchestrates them: see PLASTIC.md's Agent Models and Dispatch table for the stage-to-agent
22
- mapping (What, Why, How, Exec, Done).
23
-
24
- Final-gate code review stays an ad-hoc subagent the enforcer dispatches at the final gate, not
25
- a standing role.
26
-
27
- **The advisor: two consultation agents, never injected (intent 185).** Neither is a stage
28
- role: never in PLASTIC.md's Agent Models and Dispatch table, never dispatched by the auto
29
- pipeline, and neither ever touches a user's own session. `plastic-advisor` is the real advisor, ships `model: fable`,
30
- expensive, billed through usage credits. `plastic-faux-advisor` is the imitation advisor, ships
31
- `model: opus`, an ordinary model carrying the Operating Manual's reasoning discipline inlined
32
- in its own body (not injected into anything), so it reasons the same disciplined way at a
33
- fraction of the cost. The `plastic-agent-advisor` skill is the one front door: it teaches when
34
- consulting is worth the money (from the Advisor Protocol: buy one-way doors, plans, adversarial
35
- review, deadlocks, ranking; never buy what a tool can answer, code volume, or confirmation of a
36
- decision already made), routes to the configured agent, and can set the config on request. The
37
- user or the main session states a TIER (S, M, or L) and an EFFORT line in the brief; shipped
38
- effort is `xhigh` for `plastic-advisor` and `max` for `plastic-faux-advisor`.
39
-
40
- Config is harness-scoped, keys matching `InstallerCore::DEFAULT_AGENTS` exactly (`claude`,
41
- `codex`, `hermes`, never `claude_code`): `advisor.enabled` (false skips installing both agents and the
42
- skill), `advisor.claude.default` (which agent the skill routes to; an agent NAME never a model
43
- name, so it can point at a locally registered agent, and the only advisor routing key the
44
- installer writes). Each agent's actual model is a plain `agents.models.claude.<name>`
45
- override, the SAME harness-scoped mechanism every other agent uses, resolved through
46
- `InstallerCore#agent_model_overrides(harness:)`; there is no separate advisor-model key.
47
- `agents.models` is harness-scoped from this release (`agents.models.claude.*`,
48
- `agents.models.codex.*`), with the pre-existing flat form (`agents.models.<name>: value`)
49
- still honored as the claude harness and nested winning over flat. This closes a real latent
50
- bug: previously the same override map fed both the Claude frontmatter rewrite and the Codex
51
- TOML generator, so a literal Claude model id could leak into a Codex config; a model named
52
- under `claude` is now never emitted to `codex`. Install asks which advisor is the default
53
- (Claude Code only), with a plain description of each: Faux Fable (recommended, cheaper,
54
- available on any plan) or Fable 5 (the frontier model, billed through credits). Update asks
55
- the same question once when the key is unset, then never again. Claude-only for this release:
56
- the owner has not evaluated the Codex reasoning-model ecosystem long enough to judge it, so
57
- `generate_codex_agents` skips both agents by name, tracked at intent 186, not a permanent
58
- exclusion.
59
-
60
- **Auto-mode entry.** `plastic-auto` is the entry skill for autonomous delivery: it takes over How
61
- and Exec, spins up the stage-agent team named in PLASTIC.md's Agent Models and Dispatch table,
62
- and works the dashboard's dispatchable queue. The dashboard's
63
- `--data` output splits intents into a `dispatchable_queue` (work an agent can pick up) and
64
- `human_only` (intents that need a person); auto mode consumes the former.
65
-
66
- **Model contract.** Every agent in `agents/*.md` pins an explicit Claude Code model alias in
67
- its own frontmatter: `opus`, `sonnet`, or `haiku`. Never `inherit`, never Fable by default,
68
- unless an explicit `agents.models.<name>` config override names Fable for that role, in which
69
- case the override is honored as written. The two advisors, `plastic-advisor` and
70
- `plastic-faux-advisor`, are not lifecycle stage roles: the never-Fable rule governs stage
71
- agents only. Neither is ever dispatched by the auto pipeline; they are consultation roles
72
- summoned deliberately by the user or the main session, and their models are user configuration
73
- (fable and opus by default on Claude Code). Aliases track "latest
74
- per tier" so no Plastic release is required to advance a tier. The tier by role:
75
- `plastic-enforcer`, `plastic-brainstorming`, `plastic-planner` are `opus`;
76
- `plastic-spec-specialist`, `plastic-executor`, `plastic-intent-curator`,
77
- `plastic-future-intent-researcher`, `plastic-intent-discovery` are `sonnet`.
78
-
79
- **Config and installer mechanism.** `agents.models.<basename>` in a project's
80
- `<dir>/.plastic_store/config.yml` or the global `~/.plastic/config.yml` overrides one agent's
81
- tier. Precedence is project, then global, then the shipped default, matching every other
82
- `read-config` key. The installer applies the resolved override to each agent file's `model:`
83
- line at copy time (install, update, and repair, across every harness target). With no override
84
- configured, the shipped frontmatter passes through unchanged.
85
-
86
- **Dispatch-time contract.** Frontmatter is primary, and Claude Code reads it at dispatch, but
87
- because that read is a harness implementation detail rather than a contract Plastic controls,
88
- every dispatch site also resolves the target agent's model through the config chain
89
- (`read-config agents.models.<basename> --project <repo>`) and passes it explicitly at dispatch,
90
- belt-and-braces on top of the frontmatter pin.
91
-
92
- **Cross-harness portability.** The dispatch and model-tier contract above is harness-facing. The
93
- adapter layer that maps Plastic's hooks and model aliases onto each supported agent runtime
94
- (Claude, Codex, Hermes) is the cross-harness portability layer; see
95
- [`harness-adapters.md`](https://github.com/zalom/plastic/blob/main/docs/reference/harness-adapters.md) for the adapter contract.
96
-
97
- **Spawn preamble (intent 152).** `scripts/spawn-preamble` emits a live-state block purely from
98
- filesystem state: the active intent, stage, role/cycle-step, the honor instruction, and the
99
- report contract. When the intent's code worktree is resolvable and exists on disk, it also
100
- appends the worktree's absolute path plus a verbatim instruction to `cd` there directly, for
101
- harnesses whose `EnterWorktree` cannot discover a nested repo from a non-repo launch directory.
102
- Output is byte-identical when no worktree resolves.
103
-
104
- **Orchestrator advisory.** At auto-mode start, the orchestrator recommends once that the user
105
- run the main session on the best available thinking model (Fable, Opus, or whatever supersedes
106
- them). This is advisory only: it changes no behavior and blocks nothing if ignored, and it
107
- concerns the human's main session, never a dispatched subagent. The two advisors,
108
- `plastic-advisor` and `plastic-faux-advisor`, are not lifecycle stage roles: the never-Fable
109
- rule governs stage agents only. Neither is ever dispatched by the auto pipeline; they are
110
- consultation roles summoned deliberately by the user or the main session, and their models are
111
- user configuration (fable and opus by default on Claude Code).
112
-
113
- **`plastic-intent-discovery`.** The What-stage agent. It fires at intent activation, after the
114
- delivery lock is armed and before Why begins, running under that lock as the owner session (it
115
- does not acquire the lock itself and is not blocked by it): it reads the intent's
116
- `chain`/`sources` frontmatter, runs QMD-first discovery over completed predecessor work and
117
- related parked or future intents, and deposits findings to `resources/discovery--<slug>.md` in
118
- the intent directory ONLY. It never writes the intent file, `spec.md`, or any other lifecycle
119
- deliverable; the Why-stage `plastic-brainstorming` agent reads its deposit and enriches
120
- `## Context`.
121
-
122
- `savepoint.md`: a deterministic, append-only ledger of cycle-step milestones (one line per
123
- lifecycle boundary, newest at the bottom), written automatically by the gate hook. It is
124
- sugar on top of the conventions, not a source of truth: state is always derivable from
125
- files-on-disk, and the ledger is rebuildable. It exists so a resuming agent reads the cycle's
126
- succession at a glance (last line = where we are).
127
-
128
- ### Auto-Mode Human Reporting (intent 92)
129
-
130
- In auto mode the orchestrator briefs the human at every lifecycle stage boundary in a fixed,
131
- impact-first shape (the EM-to-CTO report contract): State, then Risk, then Call. This is the
132
- depth at M and L; at S the briefing fires once, at How. It leads with
133
- what changed and why it matters, names one risk, and leaves the decision to the human. Wording
134
- rules for the briefing, and for authored prose such as specs, outcomes, READMEs, and release
135
- notes, are owned by the `writing-style` skill, not by this contract.
@@ -1,43 +0,0 @@
1
- # Gate Enforcement and Stuck Detection
2
-
3
- ## Bridge File Pattern
4
-
5
- `/tmp/plastic-{session}.json` is the hot cache; the filesystem is the authority.
6
- SessionStart rebuilds the bridge file from the filesystem — the bridge is always disposable.
7
-
8
- ## Gate Taxonomy
9
-
10
- | Gate type | Purpose |
11
- |---|---|
12
- | **Pre-flight** | Prerequisites exist? |
13
- | **Revision** | New info invalidated prior work? |
14
- | **Escalation** | Blocked items surface to user |
15
- | **Abort** | Inconsistent state detected |
16
-
17
- ## Full Gate Enforcement
18
-
19
- | Gate | Blocked action | Required prerequisite |
20
- |---|---|---|
21
- | Pre-flight | Cannot write `plan.md` | `spec.md` must exist |
22
- | Pre-flight | Cannot create `actions/` | `spec.md` must exist |
23
- | Pre-flight | Cannot write `outcome.md` | `checklist.md` must exist with all items checked |
24
- | Revision | Cannot proceed to Exec | Context changed after spec.md — re-derive spec |
25
- | Abort | Cannot complete intent | `outcome.md` exists but checklist has unchecked items |
26
-
27
- Hard blocking — hooks exit with code 2 when gates fail.
28
-
29
- ## Stuck Detection
30
-
31
- No automatic stuck detector ships today: no threshold fires, and nothing forces a savepoint
32
- or escalates on its own. What exists is recorded data, and reading it is the diagnosing
33
- agent's judgment:
34
-
35
- - `build.gate_failures` in the bridge file: `scripts/hook-gate-check` increments it on every
36
- blocked write and resets it to 0 on a passing one. Nothing reads the counter back; a high
37
- value is a signal for you, not a trigger for the system.
38
- - `build.last_activity` in the bridge file: updated on passing writes. There are no
39
- inactivity timers, and context pressure is not tracked anywhere.
40
-
41
- When diagnosing, treat repeated denies of the same gate with no station progress (compare
42
- the savepoint ledger) as stuck: stop, read the deny reason, and route through the resolving
43
- command it names.
@@ -1,118 +0,0 @@
1
- ---
2
- name: plastic-intent-brainstorming
3
- description: "Explore intent requirements and design before implementation, through conversational prose questions asked one at a time (no multiple-choice chips), persisting each owner ruling immediately as an insight. Produces the enriched Why (Context and Decisions) in the active intent directory; hands off to /plastic-intent-speccing for spec.md."
4
- user-invocable: true
5
- ---
6
-
7
- # Brainstorming Ideas Into Designs
8
-
9
- Help turn ideas into fully formed designs through natural collaborative dialogue.
10
-
11
- Start by understanding the current project context, then ask questions one at a time, in prose, to refine the idea. Once you understand what you're building, present the design and collect the owner's rulings on it. This skill's product is the enriched Why, not spec.md.
12
-
13
- <HARD-GATE>
14
- Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has ruled on it. This applies to EVERY project regardless of perceived simplicity.
15
- </HARD-GATE>
16
-
17
- ## Active Intent Gate
18
-
19
- Before proceeding, resolve the active intent:
20
-
21
- 1. **Detect store:** Read `~/.plastic/projects.yml`, match CWD against registered project paths. If match → project store at `~/.plastic/projects/{slug}/store/`. If no match → global store at `~/.plastic/store/`.
22
- 2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic-intent-creating"
23
- 3. **Resolve intent directory:** `{store}/store/{id}--{slug}/`
24
-
25
- All artifacts go to the intent directory. Never write to external paths.
26
-
27
- ## Anti-Pattern: "This Is Too Simple To Need A Design"
28
-
29
- Every project goes through this process. A todo list, a single-function utility, a config change: all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get a ruling.
30
-
31
- ## Checklist
32
-
33
- You MUST create a task for each of these items and complete them in order:
34
-
35
- 1. **Explore project context**: check files, docs, recent commits, read active intent
36
- 2. **Grill in prose**: ask conversational prose questions, one at a time, no multiple-choice chips; understand purpose/constraints/success criteria
37
- 3. **Propose 2-3 approaches**: with trade-offs and your recommendation
38
- 4. **Present design**: in sections scaled to their complexity, get a ruling after each section
39
- 5. **Collect rulings**: for each owner ruling, immediately persist it (see Collect rulings below); never batch
40
- 6. **Hand off to /plastic-intent-speccing**: the enriched Why is done; do not author spec.md here
41
-
42
- ## Process Flow
43
-
44
- The Checklist above states the ordered flow (steps 1-6). For the same flow as a
45
- diagram, read `references/design-principles.md`.
46
-
47
- **The terminal state is the handoff below.** Do NOT invoke any implementation skill and do NOT write spec.md. Brainstorming's product is the enriched Why.
48
-
49
- ## The Process
50
-
51
- **Understanding the idea:**
52
- - QMD-first (when available): before scanning the store with grep/Read for prior decisions, specs, or outcomes, run `ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to surface candidate, prior, or related intents, then open the authoritative intent file for any hit you act on. The command is a no-op when QMD is absent, so fall back to the existing INDEX.md / file scan.
53
- - Check out the current project state first (files, docs, recent commits)
54
- - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
55
- - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own Why → spec → plan → implementation cycle.
56
- - For appropriately-scoped projects, ask questions one at a time, in prose, to refine the idea
57
- - Ask conversational prose questions, not multiple-choice chips. A short menu of named options is fine when the choice is genuinely enumerable, but phrase it as a sentence, not a bulleted picker.
58
- - Only one question per message - if a topic needs more exploration, break it into multiple questions
59
- - Focus on understanding: purpose, constraints, success criteria
60
-
61
- **Exploring approaches:**
62
- - Propose 2-3 different approaches with trade-offs
63
- - Present options conversationally with your recommendation and reasoning
64
- - Lead with your recommended option and explain why
65
-
66
- **Presenting the design:**
67
- - Once you believe you understand what you're building, present the design
68
- - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
69
- - Ask after each section whether it looks right so far
70
- - Cover: architecture, components, data flow, error handling, testing
71
- - Be ready to go back and clarify if something doesn't make sense
72
-
73
- **Design for isolation and clarity, and working in existing codebases:** before
74
- proposing a design, read `references/design-principles.md` for unit-boundary
75
- guidance (what makes a good interface, when a file has grown too large) and
76
- existing-codebase guidance (follow established patterns, fold in targeted
77
- improvements without unrelated refactoring).
78
-
79
- ## Collect rulings
80
-
81
- Each owner ruling triggers one immediate persist call, never a batch. The moment the
82
- owner rules on a question or a design section, before moving to the next one, run:
83
-
84
- ```
85
- ruby ~/.plastic/scripts/insight-append {intent_dir} "<ruling text>" --stage Why --author human
86
- ```
87
-
88
- When a later ruling conflicts with an earlier one already on record, append a new
89
- insight that names the superseded ruling and states plainly that this one supersedes
90
- it. Both insights stay on record; the later one wins.
91
-
92
- When presenting a batch of design options or rulings for the owner to choose, read
93
- `~/.plastic/_decision-tables.md` and follow the numbered-table procedure.
94
-
95
- ## Handoff
96
-
97
- Why exploration complete. The enriched Why is captured (Context, Decisions, one
98
- insight per ruling). Invoke /plastic-intent-speccing to consolidate it into spec.md.
99
- Do not author spec.md here.
100
-
101
- ## Gate position
102
-
103
- - **Before:** an active intent exists with the lock armed.
104
- - **Produces:** the enriched Why (`## Context`, `### Decisions`, one `## Insights` entry per ruling).
105
- - **Next:** /plastic-intent-speccing consolidates the enriched Why into spec.md.
106
-
107
- Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
108
- report-home contract this handoff relies on. This path resolves relative to this skill's own
109
- installed directory.
110
-
111
- ## Key Principles
112
-
113
- - **One question at a time** - Don't overwhelm with multiple questions
114
- - **Prose, not chips** - Ask conversational prose questions; skip multiple-choice menus
115
- - **YAGNI ruthlessly** - Remove unnecessary features from all designs
116
- - **Explore alternatives** - Always propose 2-3 approaches before settling
117
- - **Incremental validation** - Present design, collect a ruling before moving on
118
- - **Be flexible** - Go back and clarify when something doesn't make sense
@@ -1,67 +0,0 @@
1
- {
2
- "skill_name": "plastic-intent-brainstorming",
3
- "notes": "Intent 66a. Spec for the QMD-first step in the Why/explore-context phase (surface prior decisions/specs/outcomes before grep/Read). Runner is intent 76; spec only. Intent 164 extended this file with the prose-grilling, conflict-supersession, and handoff-to-speccing scenarios; evals 2-4 are pending a real observed run per the plastic-evaluating-skills convention.",
4
- "evals": [
5
- {
6
- "id": 1,
7
- "scope": "behavior",
8
- "set": "validation",
9
- "prompt": "QMD is present. Brainstorming the active intent during the Why phase, the agent needs prior decisions and specs on caching.",
10
- "expected_output": "In the explore-project-context (Why) step, before scanning the store with grep/Read, runs `ruby ~/.plastic/scripts/qmd-sync search \"caching decisions\"` to surface prior decisions, specs, or outcomes, then opens the authoritative intent file for any hit it acts on. No-op fallback to INDEX.md / file scan when QMD is absent.",
11
- "files": [],
12
- "assertions": [
13
- {
14
- "type": "human",
15
- "check": "qmd-sync search is run during Why before grep/Read; authoritative file opened for any hit",
16
- "observed": "SKILL.md (or agent file) carries the QMD-first step: run qmd-sync search before grep/Read, then open the authoritative file; no-op fallback when QMD is absent",
17
- "result": "pass"
18
- }
19
- ]
20
- },
21
- {
22
- "id": 2,
23
- "scope": "behavior",
24
- "set": "validation",
25
- "prompt": "During Why exploration for intent X, the owner first rules that a setting ships as a CLI flag. Later in the same session, after more discussion, the owner rules that it should ship as a config-file setting instead, explicitly reversing the earlier call.",
26
- "expected_output": "The skill persists BOTH rulings as separate insight-append calls with --stage Why: one for the CLI-flag ruling when it was made, and a second for the config-file ruling that names the CLI-flag ruling as superseded and states that this ruling supersedes it. Neither call is skipped, merged, or batched.",
27
- "files": [],
28
- "assertions": [
29
- {
30
- "type": "human",
31
- "check": "two separate `ruby ~/.plastic/scripts/insight-append {intent_dir} \"<ruling text>\" --stage Why --author human` calls are made, one per ruling, immediately as each ruling lands; the second insight names the superseded CLI-flag ruling and states supersession",
32
- "result": "expect-pass"
33
- }
34
- ]
35
- },
36
- {
37
- "id": 3,
38
- "scope": "behavior",
39
- "set": "train",
40
- "prompt": "Brainstorming a new intent about notification delivery, the agent needs to learn the owner's preferred channel (email, push, or SMS).",
41
- "expected_output": "The agent asks a single conversational prose question about the preferred channel, one at a time, phrased as a sentence rather than a bulleted or lettered multiple-choice menu.",
42
- "files": [],
43
- "assertions": [
44
- {
45
- "type": "human",
46
- "check": "the question is prose, not a chip/lettered multiple-choice menu; only one question is asked per message",
47
- "result": "expect-pass"
48
- }
49
- ]
50
- },
51
- {
52
- "id": 4,
53
- "scope": "behavior",
54
- "set": "train",
55
- "prompt": "Design for intent Y is presented and the owner has ruled on every open section.",
56
- "expected_output": "The skill states the enriched Why is captured (Context, Decisions, one insight per ruling) and invokes /plastic-intent-speccing as the handoff. It does not write spec.md itself.",
57
- "files": [],
58
- "assertions": [
59
- {
60
- "type": "code",
61
- "check": "no spec.md write action is taken by this skill; the terminal message names /plastic-intent-speccing and states spec.md is not authored here",
62
- "result": "expect-pass"
63
- }
64
- ]
65
- }
66
- ]
67
- }
@@ -1,145 +0,0 @@
1
- {
2
- "skill_name": "plastic-intent-continuing",
3
- "notes": "Intent 158a1: slimmed to the specific-intent resume route of plastic-continuing (D8, extract not duplicate). Bare 'continue' now belongs to the router; triggering evals 1-4 were recast so this skill's positives always name a specific intent, and eval 4 asserts bare 'continue' does NOT settle here directly. Behavior eval 11 (dashboard selection) was removed, relocated to plastic-project-continuing's evals. Behavior eval 15 is new: the terminal handoff goes to plastic-intent-starting, not directly to plastic-auto. Scopes: description triggering (1-8) and behavior/convention compliance of the ledger-resume skill (9-15).",
4
- "results": {
5
- "triggering": { "cases": 8, "passed": 8, "run": "2026-07-10, one subagent per case" },
6
- "behavior": { "cases": 7, "passed": 7, "evidence": "convention checks against skills/intent-continuing/SKILL.md after the 158a1 extraction" }
7
- },
8
- "evals": [
9
- {
10
- "id": 1, "scope": "triggering", "set": "train",
11
- "prompt": "continue intent 4a",
12
- "expected_output": "Activates plastic-intent-continuing (a specific intent named by id).",
13
- "files": [],
14
- "assertions": [
15
- { "type": "code", "check": "router CHOICE == plastic-intent-continuing", "observed": "plastic-intent-continuing", "result": "pass" }
16
- ]
17
- },
18
- {
19
- "id": 2, "scope": "triggering", "set": "train",
20
- "prompt": "resume the statusline-coloring intent",
21
- "expected_output": "Activates plastic-intent-continuing (a specific intent named by description).",
22
- "files": [],
23
- "assertions": [
24
- { "type": "code", "check": "router CHOICE == plastic-intent-continuing", "observed": "plastic-intent-continuing", "result": "pass" }
25
- ]
26
- },
27
- {
28
- "id": 3, "scope": "triggering", "set": "validation",
29
- "prompt": "continuing --intent 96",
30
- "expected_output": "Activates plastic-intent-continuing (the --intent form).",
31
- "files": [],
32
- "assertions": [
33
- { "type": "code", "check": "router CHOICE == plastic-intent-continuing", "observed": "plastic-intent-continuing", "result": "pass" }
34
- ]
35
- },
36
- {
37
- "id": 4, "scope": "triggering", "set": "train",
38
- "prompt": "continue",
39
- "expected_output": "Does NOT settle on plastic-intent-continuing directly. Bare 'continue' with no specific intent named belongs to the plastic-continuing router, which defaults to plastic-project-continuing.",
40
- "files": [],
41
- "assertions": [
42
- { "type": "code", "check": "router CHOICE != plastic-intent-continuing", "observed": "plastic-continuing", "result": "pass" }
43
- ]
44
- },
45
- {
46
- "id": 5, "scope": "triggering", "set": "train",
47
- "prompt": "continue delivering this intent autonomously, don't ask me",
48
- "expected_output": "Does NOT settle on plastic-intent-continuing for execution. Shares 'continue' but the autonomous-delivery intent routes to plastic-auto.",
49
- "files": [],
50
- "assertions": [
51
- { "type": "code", "check": "router CHOICE == plastic-auto", "observed": "plastic-auto", "result": "pass" }
52
- ]
53
- },
54
- {
55
- "id": 6, "scope": "triggering", "set": "validation",
56
- "prompt": "continue the for-loop to the next iteration in this function",
57
- "expected_output": "Does NOT activate plastic-intent-continuing. Near-miss: shares 'continue' but is a code-editing task.",
58
- "files": [],
59
- "assertions": [
60
- { "type": "code", "check": "router CHOICE != plastic-intent-continuing", "observed": "none", "result": "pass" }
61
- ]
62
- },
63
- {
64
- "id": 7, "scope": "triggering", "set": "train",
65
- "prompt": "resume the paused background download",
66
- "expected_output": "Does NOT activate plastic-intent-continuing. Near-miss: shares 'resume' but is unrelated to Plastic sessions.",
67
- "files": [],
68
- "assertions": [
69
- { "type": "code", "check": "router CHOICE != plastic-intent-continuing", "observed": "none", "result": "pass" }
70
- ]
71
- },
72
- {
73
- "id": 8, "scope": "triggering", "set": "validation",
74
- "prompt": "what's the dashboard look like right now",
75
- "expected_output": "Does NOT activate plastic-intent-continuing directly; an overview request without a specific intent named is a dashboard/project-board task.",
76
- "files": [],
77
- "assertions": [
78
- { "type": "code", "check": "router CHOICE != plastic-intent-continuing", "observed": "plastic-dashboard", "result": "pass" }
79
- ]
80
- },
81
- {
82
- "id": 9, "scope": "behavior", "set": "train",
83
- "prompt": "Does the skill defer boot to the SessionStart hook rather than running it itself?",
84
- "expected_output": "SKILL.md states boot (health check, core context, version banner, statusline) is owned by hook-session-start / plastic-statusline, not this skill.",
85
- "files": ["skills/intent-continuing/SKILL.md"],
86
- "assertions": [
87
- { "type": "convention", "check": "SKILL.md says boot is owned by the SessionStart hook and the skill does not run it", "observed": "'Boot is not this skill's job.' paragraph naming hook-session-start and plastic-statusline", "result": "pass" }
88
- ]
89
- },
90
- {
91
- "id": 10, "scope": "behavior", "set": "train",
92
- "prompt": "Does the skill avoid running doctor / setting the statusline itself?",
93
- "expected_output": "SKILL.md does NOT instruct running doctor.rb --core or setting the statusline; it attributes those to the hooks.",
94
- "files": ["skills/intent-continuing/SKILL.md"],
95
- "assertions": [
96
- { "type": "convention", "check": "no in-skill boot step invokes doctor.rb --core or sets the statusline; both are attributed to hooks", "observed": "doctor --core and statusline mentioned only as hook-owned in the 'Boot is not this skill's job' note", "result": "pass" }
97
- ]
98
- },
99
- {
100
- "id": 11, "scope": "behavior", "set": "validation",
101
- "prompt": "Is ledger-resume conditional and ledger-driven?",
102
- "expected_output": "Resume fires only when a specific intent is named; reads savepoint.md last line as stage, verifies the stage file, rebuilds on drift, derives next step from first unchecked checklist item.",
103
- "files": ["skills/intent-continuing/SKILL.md"],
104
- "assertions": [
105
- { "type": "convention", "check": "Conditional Ledger-Resume section reads last ledger line, verifies stage file, calls rebuild_savepoint on drift, uses first unchecked checklist item", "observed": "all four present in 'Conditional Ledger-Resume'", "result": "pass" }
106
- ]
107
- },
108
- {
109
- "id": 12, "scope": "behavior", "set": "validation",
110
- "prompt": "Are the stale prose-savepoint fields gone?",
111
- "expected_output": "No 'In progress' / 'Blockers' fields read from a prose savepoint remain; the ledger model is used instead.",
112
- "files": ["skills/intent-continuing/SKILL.md"],
113
- "assertions": [
114
- { "type": "convention", "check": "no prose-savepoint announce template (In progress / Blockers from prose)", "observed": "absent; announce uses Stage/Next step/Context/Drift derived from ledger + checklist", "result": "pass" }
115
- ]
116
- },
117
- {
118
- "id": 13, "scope": "behavior", "set": "validation",
119
- "prompt": "Is the 'Determine Store' local-store gap filled?",
120
- "expected_output": "Step 2 of Determine Store describes local/project-store detection (no empty step).",
121
- "files": ["skills/intent-continuing/SKILL.md"],
122
- "assertions": [
123
- { "type": "convention", "check": "Determine Store step 2 documents local/project store detection via projects.yml + CWD match", "observed": "filled", "result": "pass" }
124
- ]
125
- },
126
- {
127
- "id": 14, "scope": "behavior", "set": "validation",
128
- "prompt": "QMD is present. The user says: continue the work on the statusline coloring (names the intent by description, not id).",
129
- "expected_output": "Before scanning the store with grep/Read to locate the named intent, runs `ruby ~/.plastic/scripts/qmd-sync search \"statusline coloring\"` to surface the candidate intent, then opens the authoritative intent file for the hit it resumes. No-op fallback to INDEX.md / file scan when QMD is absent.",
130
- "files": ["skills/intent-continuing/SKILL.md"],
131
- "assertions": [
132
- { "type": "human", "check": "qmd-sync search is run before grep/Read when the intent is named by description; authoritative file opened for the hit", "observed": "Conditional Ledger-Resume carries the QMD-first step: run qmd-sync search before grep/Read, then open the authoritative file; no-op fallback when QMD is absent", "result": "pass" }
133
- ]
134
- },
135
- {
136
- "id": 15, "scope": "behavior", "set": "train",
137
- "prompt": "Does the ledger-resume's terminal handoff go to plastic-intent-starting or directly to plastic-auto?",
138
- "expected_output": "Step 5 announces state then hands off to plastic-intent-starting, which takes the lock and asks 'auto or guided?' exactly once; plastic-intent-starting's own auto branch is the one that hands to plastic-auto. This skill never hands to plastic-auto directly.",
139
- "files": ["skills/intent-continuing/SKILL.md"],
140
- "assertions": [
141
- { "type": "convention", "check": "step 5 hands off to plastic-intent-starting, not plastic-auto; the single ask is attributed to plastic-intent-starting", "observed": "present in 'Conditional Ledger-Resume' step 5", "result": "pass" }
142
- ]
143
- }
144
- ]
145
- }
@@ -1,56 +0,0 @@
1
- ---
2
- name: plastic-intent-discovering
3
- description: >-
4
- What-stage context deposit at intent activation: run QMD discovery over the
5
- intent's chain/sources and related parked intents, and write findings to
6
- resources/discovery--<slug>.md for the Why stage to consume. Use when an intent
7
- is activated (moved from Future to Active), after the lock is armed, under it,
8
- and before Why begins. Never writes the intent file itself.
9
- user-invocable: false
10
- ---
11
-
12
- # Intent Discovery — What-stage context deposit
13
-
14
- Runs once, at intent activation, after the lock is armed and before Why. It gathers what is
15
- already known so Why does not start cold, and deposits it as a resource the
16
- Why-stage brainstorming agent reads.
17
-
18
- ## When it fires
19
- Inside `plastic-intent-starting`, right after the bridge is armed, under the
20
- lock. Dispatched as the `plastic-intent-discovery` background agent.
21
-
22
- **Precondition for skipping: a size of S already on record, and no graph edges.** Read the
23
- activating intent's `chain` and `sources` frontmatter fields first. When a `Tier: S` line is
24
- already stamped at the top of `spec.md` AND both fields are empty, the pass does not run:
25
- write the single line `no chain/sources, discovery skipped` to
26
- `resources/discovery--<slug>.md` and stop there. Sizing happens at Why, which is after this
27
- stage, so a first activation usually has no size yet and the full pass runs. Never guess a
28
- size to unlock the skip. At M or L, or when either field is filled, run the full pass below.
29
-
30
- ## What it does
31
- 1. **Read the intent's links.** Load the activating intent file's `chain` and
32
- `sources` frontmatter fields. If both are empty and a size of S is already on record, apply
33
- the skip above and stop.
34
- 2. **QMD-first discovery.** Search the Plastic stores with
35
- `scripts/qmd-sync search "<terms>"` (or the `qmd` skill), scoped to the
36
- relevant `plastic-*` collections, across completed predecessor work named in
37
- `chain`/`sources` and any related parked/future intents in INDEX.md. Fall back
38
- to ripgrep over the stores only when QMD is absent.
39
- 3. **Deposit, never author.** Write findings to
40
- `resources/discovery--<slug>.md` in the intent directory ONLY. Do not write
41
- the intent file, spec.md, or any lifecycle deliverable. The lock-owner-only
42
- write rule stays intact; the Why-stage `plastic-brainstorming` agent reads the
43
- deposit and enriches `## Context`.
44
- Shape the deposit tabular-first per `PLASTIC.md` (## Tabular-First Reporting, intent 160).
45
-
46
- ## Stage coverage
47
- This is the What-stage agent in the one-agent-per-stage table (What:
48
- intent-discovery, Why: brainstorming + spec-specialist, How: planner, Exec:
49
- executor, Done: intent-curator).
50
-
51
- ## Boundaries
52
- - Single output: `resources/discovery--<slug>.md`.
53
- - Does not ACQUIRE the delivery lock itself; it runs under the lock the
54
- orchestrator armed, as the owner session (inherited session id), and is not
55
- blocked by it.
56
- - Advisory input to Why, not a gate.