@zalom/plastic 1.14.1 → 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 (189) 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/close +5 -0
  10. package/hooks/hooks.json +9 -49
  11. package/hooks/record +4 -0
  12. package/package.json +3 -2
  13. package/scripts/agent-report +8 -9
  14. package/scripts/append-ledger +195 -0
  15. package/scripts/codex-hook +78 -90
  16. package/scripts/dashboard.rb +4 -4
  17. package/scripts/doctor.rb +106 -43
  18. package/scripts/end-intent +77 -76
  19. package/scripts/exec-worktree +11 -20
  20. package/scripts/file-session-intent +61 -0
  21. package/scripts/hook-capture +242 -0
  22. package/scripts/hook-close +34 -0
  23. package/scripts/hook-record +149 -0
  24. package/scripts/hook-session-start +95 -12
  25. package/scripts/install.rb +8 -6
  26. package/scripts/lib/agent_models.rb +1 -7
  27. package/scripts/lib/arm.rb +283 -0
  28. package/scripts/lib/backfill_intent.rb +316 -0
  29. package/scripts/lib/bridge.rb +24 -1597
  30. package/scripts/lib/doctor_core.rb +17 -88
  31. package/scripts/lib/doctor_session_ledger.rb +106 -0
  32. package/scripts/lib/exec_worktree.rb +14 -60
  33. package/scripts/lib/harness_text.rb +5 -4
  34. package/scripts/lib/hook_registry.rb +44 -107
  35. package/scripts/lib/insights.rb +3 -4
  36. package/scripts/lib/installer_core.rb +19 -30
  37. package/scripts/lib/lock.rb +6 -26
  38. package/scripts/lib/outcome_guard.rb +7 -5
  39. package/scripts/lib/project_validator.rb +30 -1
  40. package/scripts/lib/roadmap_queue.rb +3 -3
  41. package/scripts/lib/roadmap_savepoint.rb +1 -1
  42. package/scripts/lib/rule_catalog.rb +6 -3
  43. package/scripts/lib/savepoint.rb +320 -0
  44. package/scripts/lib/scaffold_intent.rb +13 -179
  45. package/scripts/lib/session_backfill.rb +184 -0
  46. package/scripts/lib/session_close.rb +84 -0
  47. package/scripts/lib/session_git.rb +469 -0
  48. package/scripts/lib/session_ledger.rb +497 -0
  49. package/scripts/lib/store_discovery.rb +1 -1
  50. package/scripts/lib/store_provisioning.rb +1 -1
  51. package/scripts/maintenance-run +7 -7
  52. package/scripts/new-intent +63 -4
  53. package/scripts/plastic-lock +94 -41
  54. package/scripts/promote-session-item +150 -0
  55. package/scripts/rebuild-graph +1 -1
  56. package/scripts/roadmap-next +2 -2
  57. package/scripts/rollback.rb +42 -3
  58. package/scripts/scaffold-intent +37 -63
  59. package/scripts/session-commit +116 -0
  60. package/scripts/spawn-preamble +5 -5
  61. package/scripts/update.rb +7 -3
  62. package/skills/agent-advisor/SKILL.md +3 -3
  63. package/skills/agent-advisor/references/advisor-protocol.md +20 -20
  64. package/skills/auto/SKILL.md +218 -317
  65. package/skills/auto/evals/evals.json +10 -10
  66. package/skills/auto/references/agent-architecture.md +102 -90
  67. package/skills/auto/references/agent-report-contract.md +4 -21
  68. package/skills/auto/references/end-tail.md +47 -53
  69. package/skills/auto/references/human-report-contract.md +8 -8
  70. package/skills/conventions/SKILL.md +1 -3
  71. package/skills/conventions/references/lifecycle-and-savepoints.md +35 -1
  72. package/skills/conventions/references/locks-and-worktrees.md +47 -55
  73. package/skills/conventions/references/maintenance-and-revisions.md +12 -12
  74. package/skills/dashboard/SKILL.md +1 -1
  75. package/skills/direct/SKILL.md +66 -0
  76. package/skills/direct/references/request-signals.md +59 -0
  77. package/skills/doctor/SKILL.md +58 -11
  78. package/skills/doctor/report.md +3 -1
  79. package/skills/install/SKILL.md +11 -9
  80. package/skills/intent-continuing/SKILL.md +131 -89
  81. package/skills/intent-continuing/references/boarding-matrix.md +34 -0
  82. package/skills/intent-continuing/references/context-management.md +2 -2
  83. package/skills/intent-creating/SKILL.md +2 -2
  84. package/skills/intent-creating/references/lifecycle.md +1 -1
  85. package/skills/intent-ending/SKILL.md +28 -37
  86. package/skills/intent-ending/evals/evals.json +4 -4
  87. package/skills/intent-executing/SKILL.md +12 -49
  88. package/skills/intent-executing/plan-reviewer-prompt.md +39 -0
  89. package/skills/intent-speccing/SKILL.md +108 -51
  90. package/skills/intent-speccing/evals/evals.json +5 -5
  91. package/skills/intent-speccing/references/per-section-fill-rules.md +4 -4
  92. package/skills/intent-speccing/references/self-verify-checklist.md +1 -2
  93. package/skills/project-creating/SKILL.md +1 -1
  94. package/skills/releasing/SKILL.md +7 -8
  95. package/skills/tutorial/SKILL.md +2 -2
  96. package/skills/tutorial/references/track-1-guided.md +16 -18
  97. package/skills/tutorial/references/track-2-auto.md +12 -13
  98. package/skills/tutorial/references/track-3-projects-and-roadmaps.md +2 -2
  99. package/templates/agents.md +4 -7
  100. package/templates/project.yml +7 -0
  101. package/templates/roadmap.md +1 -1
  102. package/templates/savepoint.md +2 -2
  103. package/templates/session-intent.md +29 -0
  104. package/agents/plastic-brainstorming.md +0 -48
  105. package/agents/plastic-future-intent-researcher.md +0 -35
  106. package/agents/plastic-intent-curator.md +0 -47
  107. package/agents/plastic-intent-discovery.md +0 -43
  108. package/agents/plastic-planner.md +0 -56
  109. package/agents/plastic-spec-specialist.md +0 -53
  110. package/hooks/auto-arm +0 -5
  111. package/hooks/bash-gate +0 -3
  112. package/hooks/continue +0 -31
  113. package/hooks/edit-gates +0 -3
  114. package/hooks/future-intent-check +0 -25
  115. package/hooks/gate-check +0 -12
  116. package/hooks/power-tools +0 -8
  117. package/scripts/hook-auto-arm +0 -51
  118. package/scripts/hook-bash-gate +0 -78
  119. package/scripts/hook-code-gate +0 -38
  120. package/scripts/hook-continue +0 -48
  121. package/scripts/hook-create-gate +0 -51
  122. package/scripts/hook-edit-gates +0 -58
  123. package/scripts/hook-future-intent-check +0 -90
  124. package/scripts/hook-gate-check +0 -169
  125. package/scripts/hook-links-gate +0 -54
  126. package/scripts/hook-lock-gate +0 -47
  127. package/scripts/hook-power-tools +0 -38
  128. package/scripts/hook-savepoint-pre +0 -32
  129. package/scripts/lib/codex_edit_gates.rb +0 -138
  130. package/scripts/lib/edit_gates.rb +0 -398
  131. package/scripts/lib/links_gate.rb +0 -140
  132. package/scripts/lib/qmd_hook.rb +0 -41
  133. package/scripts/lib/spec_header.rb +0 -83
  134. package/scripts/lib/start_intent.rb +0 -296
  135. package/scripts/start-intent +0 -89
  136. package/skills/_active-intent-gate.md +0 -26
  137. package/skills/auto/references/tiers.md +0 -100
  138. package/skills/continuing/SKILL.md +0 -34
  139. package/skills/continuing/evals/evals.json +0 -91
  140. package/skills/conventions/references/gates-and-enforcement.md +0 -53
  141. package/skills/conventions/references/tiers-and-dispatch.md +0 -135
  142. package/skills/doctor/references/gates-stuck-detection.md +0 -43
  143. package/skills/intent-brainstorming/SKILL.md +0 -118
  144. package/skills/intent-brainstorming/evals/evals.json +0 -67
  145. package/skills/intent-continuing/evals/evals.json +0 -145
  146. package/skills/intent-discovering/SKILL.md +0 -56
  147. package/skills/intent-grilling/SKILL.md +0 -108
  148. package/skills/intent-linking/SKILL.md +0 -128
  149. package/skills/intent-linking/evals/evals.json +0 -22
  150. package/skills/intent-linking/references/zettelkasten.md +0 -45
  151. package/skills/intent-locking/SKILL.md +0 -64
  152. package/skills/intent-planning/SKILL.md +0 -145
  153. package/skills/intent-planning/evals/evals.json +0 -81
  154. package/skills/intent-planning/references/plan-format.md +0 -130
  155. package/skills/intent-researching/SKILL.md +0 -123
  156. package/skills/intent-researching/evals/evals.json +0 -22
  157. package/skills/intent-savepoint/SKILL.md +0 -83
  158. package/skills/intent-savepoint/references/context-management.md +0 -32
  159. package/skills/intent-starting/SKILL.md +0 -151
  160. package/skills/intent-starting/evals/evals.json +0 -117
  161. package/skills/intent-starting/references/boarding-matrix.md +0 -35
  162. package/skills/project-continuing/SKILL.md +0 -119
  163. package/skills/project-continuing/evals/evals.json +0 -100
  164. package/skills/roadmap-continuing/SKILL.md +0 -89
  165. package/skills/roadmap-continuing/evals/evals.json +0 -82
  166. package/skills/skill-creating/SKILL.md +0 -75
  167. package/skills/skill-creating/evals/evals.json +0 -108
  168. package/skills/skill-creating/references/agents.md +0 -168
  169. package/skills/skill-creating/references/defaults-first.md +0 -23
  170. package/skills/skill-creating/references/evals.md +0 -41
  171. package/skills/skill-creating/references/hooks.md +0 -251
  172. package/skills/skill-creating/references/progressive-disclosure.md +0 -176
  173. package/skills/skill-creating/references/scripts.md +0 -166
  174. package/skills/skill-creating/references/skills.md +0 -169
  175. package/skills/skill-creating/scripts/scaffold.rb +0 -313
  176. package/skills/skill-evaluating/SKILL.md +0 -141
  177. package/skills/skill-evaluating/assets/eval-template.json +0 -12
  178. package/skills/skill-evaluating/evals/evals.json +0 -75
  179. package/skills/skill-evaluating/references/convention-checks.md +0 -76
  180. package/skills/skill-evaluating/references/eval-methodology.md +0 -154
  181. package/skills/store-curating/SKILL.md +0 -64
  182. package/skills/store-curating/evals/evals.json +0 -38
  183. package/skills/store-indexing/SKILL.md +0 -93
  184. package/skills/store-indexing/evals/evals.json +0 -22
  185. package/skills/store-indexing/references/zettelkasten-linking.md +0 -32
  186. package/skills/store-provisioning/SKILL.md +0 -55
  187. /package/skills/{project-continuing → intent-continuing}/references/board-fill.md +0 -0
  188. /package/skills/{roadmap-continuing → intent-continuing}/references/liveness-ranking.md +0 -0
  189. /package/skills/{intent-brainstorming → intent-speccing}/references/design-principles.md +0 -0
package/PLASTIC.md CHANGED
@@ -1,334 +1,141 @@
1
1
  # Plastic: Conventions
2
2
 
3
- > **This file is maintained by Plastic.** It will be overwritten when the
4
- > plugin is updated. Do not modify it: your changes will be lost.
5
- > For project-specific rules, use `AGENTS.md` instead.
3
+ > **This file is maintained by Plastic.** It is overwritten on update; do not edit it. Project
4
+ > rules go in `AGENTS.md`. Deeper doctrine lives in the six `plastic-conventions` chapters
5
+ > (`references/<chapter>.md`: knowledge-graph, lifecycle-and-savepoints, locks-and-worktrees,
6
+ > completion-and-done, maintenance-and-revisions, roadmaps), read on demand.
6
7
 
7
- Deeper doctrine lives in the `plastic-conventions` skill's chapters
8
- (`plastic-conventions > references/<chapter>.md`); read the one that matches your task on demand,
9
- it is not injected at session start.
8
+ ## Two Modes, Plus Auto
10
9
 
11
- ## Two Processes
12
-
13
- | Process | Scope | Type | Actor |
14
- |---|---|---|---|
15
- | **Build Observe Repeat** | The system | Continuous loop | Coordinator |
16
- | **What → Why → How → Exec** | One intent | Finite lifecycle | Agent |
10
+ | Mode | "How to execute" comes from | Who runs it |
11
+ |---|---|---|
12
+ | **Direct** (default) | the prompt; at most one clarifying question | this session, inline; record after |
13
+ | **Thinking** | a conversation: each ruling an insight, then the action files | this session, then as in direct |
14
+ | **Auto** | a registered intent with a clear prompt | a background team under a lock and a worktree |
17
15
 
18
- B→O→R is the Coordinator's heartbeat. W→W→H→E is what happens inside each intent.
19
- The connection: an intent's `## Insights` feeds the Coordinator's Observe phase.
16
+ There are no tiers: there is only work. The Coordinator loop (build, observe, repeat) wraps
17
+ every intent: an intent's `## Insights` feed the observe phase.
20
18
 
21
19
  ## What is an Intent
22
20
 
23
- A directory in the store containing `{ID}--{slug}.md` and optional supporting files.
24
- It represents a desire: something a human or agent wants to accomplish, explore, or understand.
25
- The unit of work in Plastic is always an intent, never a ticket.
21
+ A directory in the store holding `{ID}--{slug}.md` and its record: a desire someone wants to
22
+ accomplish, explore, or understand. The unit of work is always an intent, never a ticket. The
23
+ day ledger is one too: the session intent, one per calendar day, that direct work records into.
26
24
 
27
25
  ```
28
- store/
29
- ID--three-to-five-words/
30
- {ID}--{slug}.md # required - the intent itself
31
- spec.md # optional - specification (Why deliverable)
32
- plan.md # optional - implementation plan (How deliverable)
33
- checklist.md # optional - execution registry (How deliverable)
34
- outcome.md # detailed result (Exec deliverable) - mandatory at a terminal (Completed and Abandoned alike)
35
- actions/ # optional - real action files (How deliverable, at least one required)
36
- resources/ # optional - research, references, screenshots, diagrams
37
- savepoint.md # optional - deterministic cycle-step ledger (auto-written)
38
- revisions.md # optional - append-only structural-maintenance audit trail
39
- ```
40
-
41
- Lifecycle files (`spec.md`, `plan.md`, `checklist.md`, `outcome.md`) have defined
42
- roles. Supporting artifacts that aren't lifecycle deliverables (research reports,
43
- reference docs, external API snapshots, screenshots, diagrams) go in `resources/`.
44
- Name files inside as `{type}--{description}.md` (e.g., `deep-research--gsd-core.md`).
45
-
46
- ## Frontmatter
47
-
48
- Identity and knowledge graph only. Nothing operational.
49
-
50
- ```yaml
51
- ---
52
- id: "4a1"
53
- intent: "Short description of the desire"
54
- sources: ["4a"] # direct ascendants: intents this was created from
55
- chain: ["4a1a"] # forward: what this spawned and related successors
56
- created: 2026-05-29
57
- author: human # human | agent-name
58
- tags: [plastic, architecture]
59
- ---
26
+ store/ID--three-to-five-words/
27
+ {ID}--{slug}.md # required: Intent, Context, Outcome, Insights, Links sections
28
+ checklist.md # while working: one item per executed request
29
+ savepoint.md # while working: one line per milestone, append-only
30
+ spec.md # backfilled at intent end: requests and decisions
31
+ plan.md # backfilled: what was thought
32
+ actions/ # backfilled: how it was done (at least one ACTION_N.md)
33
+ outcome.md # backfilled: what changed; mandatory at Completed and Abandoned
34
+ resources/ # {type}--{description}.md
35
+ revisions.md # optional: append-only maintenance audit trail
60
36
  ```
61
37
 
62
- - Context contract: load `sources` strongly (they are what the intent was built from);
63
- traverse `chain` lightly for discovery. See
64
- [`how-plastic-sources-and-chains-intents.md`](https://github.com/zalom/plastic/blob/main/docs/concepts/how-plastic-sources-and-chains-intents.md) for the full model.
65
- - IDs use Luhmann's alternating convention: `1` `1a` `1a1` `1a1a`
66
- - Multiple branches increment: `1a`, `1b`, `1c`
67
-
68
- See `plastic-conventions > references/knowledge-graph.md` for the linking doctrine: the tiers
69
- of influence (sources/chain/tags) and the `## Links` projection rules.
38
+ Frontmatter is identity and knowledge graph only, nothing operational: `id`, `intent`,
39
+ `sources` (direct ascendants, loaded strongly), `chain` (what it spawned, traversed lightly),
40
+ `created`, `author` (`human` or an agent name), `tags`. Only the day ledger adds `mode: direct`.
41
+ IDs follow Luhmann's alternating convention (`1`, `1a`, `1a1`, `1a1a`); siblings increment
42
+ (`1a`, `1b`).
70
43
 
71
- ## Lifecycle Stages
44
+ ## The Record: Stages as its Shape
72
45
 
73
- | Stage | Section | Deliverable | Detail |
74
- |-------|---------|-------------|--------|
46
+ | Stage | Section | Deliverable | Skill |
47
+ |---|---|---|---|
75
48
  | **What** | `## Intent` | `{ID}--{slug}.md` | `plastic-intent-creating` |
76
- | **Why** | `## Context` + Decisions | `spec.md` | `plastic-intent-brainstorming` enriches Context/Decisions; `plastic-intent-speccing` writes `spec.md` |
77
- | **How** | Planning | `plan.md` + `actions/ACTION_N.md` (at least one) + `checklist.md` | `plastic-intent-planning` |
78
- | **Exec** | Execution | `outcome.md` | `plastic-intent-executing` |
49
+ | **Why** | `## Context` + Decisions | `spec.md` | `plastic-intent-speccing` (thinking mode) |
50
+ | **How** | `checklist.md` + `actions/` | `plan.md` | `plastic-intent-speccing` writes the action files |
51
+ | **Exec** | `## Outcome` | `outcome.md` | `plastic-intent-executing`; `plastic-intent-ending` closes |
52
+
53
+ Stages are the shape of the record, not checkpoints: nothing blocks a write. Only "how to
54
+ execute" (a checklist item plus its action) must exist before work; the rest is backfilled at
55
+ intent end from what was recorded while working.
79
56
 
80
57
  Invoke a skill for your harness: Claude Code uses the slash form (`/plastic-intent-creating`);
81
58
  Codex CLI uses a dollar prefix instead (`$plastic-intent-creating`), and may also select a skill
82
- implicitly by matching its description. Skill names elsewhere in this document are given bare
83
- (`plastic-intent-creating`); add the prefix for your harness.
84
-
85
- `## Insights` is the append-only log of durable discoveries captured throughout ALL stages.
86
- An insight is a discovery worth keeping for later reads: novel, or old but newly relevant,
87
- surfaced at any stage (What, Why, How, Exec). It is the most interesting residue of an
88
- intent, the part a future reader most wants. **Append-only means newest entry at the bottom;
89
- never prepend.** This ordering is a hard convention: Insights are the semantic trace of an
90
- intent, and a consistent newest-last order keeps that trace readable across every intent.
91
-
92
- Every entry leads with a fixed, machine-parseable prefix `{utc-iso8601} · {stage} · {author}`,
93
- for example `2026-06-24T08:13:05Z · Why · plastic-brainstorming (autonomous)`. The UTC ISO8601
94
- timestamp (to the second, trailing `Z`) is the same convention the savepoint ledger uses, so
95
- the store has one timestamp convention. This per-entry prefix is not prepending the entry:
96
- entries stay append-only, newest at the bottom; the prefix only stamps each line with when,
97
- which stage, and who.
98
-
99
- The blessed write path is the `insight-append` helper
100
- (`scripts/insight-append <intent_dir> <text> --stage S --author A`), which ships with every
101
- install and update, formats the prefix, validates it, and appends at the bottom. Hand-editing
102
- `## Insights` is an escape hatch; the helper is the default so the format cannot drift.
59
+ implicitly by matching its description.
103
60
 
104
- See `plastic-conventions > references/lifecycle-and-savepoints.md` for the subagent
105
- report-home contract (how an insight reaches the intent when the writer cannot write the file
106
- itself) and `savepoint.md`'s role.
61
+ `## Insights` is the append-only log of durable discoveries from every stage, newest at the
62
+ bottom, never prepended, each entry prefixed `{utc-iso8601} · {stage} · {author}`. Write
63
+ through `scripts/insight-append <intent_dir> <text> --stage S --author A`, which ships with
64
+ every install and update, formats the prefix, validates it, and appends at the bottom.
107
65
 
108
- ## Tiers (proportional auto sizing)
66
+ ## Agents and Skills
109
67
 
110
- Auto mode sizes every intent S/M/L at Why: S = single mechanism or file cluster (hours);
111
- M = one subsystem (about a day); L = cross-cutting or novel design.
68
+ An auto team is `plastic-enforcer` (the lead) plus `plastic-executor`; models live in
69
+ `agents.models.<harness>.<agent>`.
112
70
 
113
- Tier is recorded as a `Tier: S|M|L` line at the top of spec.md. It is convention-only,
114
- read by the orchestrator, not enforced by any gate or by doctor.
115
-
116
- Settledness is recorded separately, as a `Settled: yes (<reason>)` line directly beneath the
117
- `Tier:` line, above the `# Spec:` heading. It records that a design has already done its
118
- thinking, so a later stage can trust it without deriving it again. An absent line means not
119
- settled; there is no `Settled: no` form. Settledness and scope are independent, so a large
120
- intent can be settled and never becomes a smaller tier. `scripts/lib/spec_header.rb` is the
121
- only parser of both lines; nothing else reads the grammar.
122
-
123
- See `plastic-conventions > references/tiers-and-dispatch.md` for topology by tier, what never
124
- gets cut, and guided mode.
125
-
126
- ## Agent Models and Dispatch (intent 116)
127
-
128
- | Stage | Agent |
129
- |---|---|
130
- | What | `plastic-intent-discovery` |
131
- | Why | `plastic-brainstorming` + `plastic-spec-specialist` |
132
- | How | `plastic-planner` |
133
- | Exec | `plastic-executor` |
134
- | Done | `plastic-intent-curator` |
135
-
136
- See `plastic-conventions > references/tiers-and-dispatch.md` for the advisor, model
137
- configuration, the dispatch contract, and the spawn preamble.
138
-
139
- ## Operational Skills
140
-
141
- - **`plastic-feedback`** turns a described Plastic quirk, bug, or feature idea into a redacted
142
- local report file and a prefilled GitHub issue URL; only the user submits it. If the user hits
143
- a Plastic quirk, bug, or missing feature, offer to invoke the plastic-feedback skill yourself
144
- instead of waiting to be asked.
145
- - **`plastic-doctor`** checks installation health across three scopes: core, store, and full.
146
- See `plastic-doctor/SKILL.md` for the contract.
147
-
148
- ## Releases and Versioning
149
-
150
- Plastic ships as versioned releases; a release is a collection of intents. Run
151
- `plastic-releasing` for the full flow (version bump, tag, GitHub release, npm publish).
152
- Deprecations are declared in `deprecations.yml` and shown at SessionStart.
153
-
154
- ## Gotchas
155
-
156
- - **Artifacts go in the intent directory.** Never create `docs/plans/`,
157
- `docs/specs/`, `researches/`, or similar. All meta-artifacts go in
158
- `~/.plastic/store/ID--slug/` or the project store equivalent.
159
- - **Code goes in the project. Everything else goes in the intent.**
160
- Plans, specs, checklists, savepoints: all in the intent directory.
161
- - **The global store is never pushed.** `~/.plastic/` is git-tracked locally
162
- but contains sensitive data. Never push to a remote.
163
- - **Agent-created repos are private by default.** Use `gh repo create --private`.
164
- - **State is derived from what exists.** No `## Context` = fleeting intent.
165
- `## Context` exists = permanent/actionable. `## Outcome` exists = done.
166
- - **Status lives on actions, not intents.** An intent can have parallel workstreams.
167
- - **`outcome.md` = done.** Presence signals completion. Don't write it until
168
- checklist is fully checked.
169
- - **Delegation overrides external skill defaults.** When delegating to
170
- brainstorming, writing-plans, etc., Plastic's directory rules override
171
- their default output paths.
71
+ Twenty skills, each `plastic-<name>`, listed by your harness. `plastic-doctor` checks
72
+ installation health (core, store, and full scopes). `plastic-feedback` turns a Plastic quirk,
73
+ bug, or feature idea into a redacted local report and a prefilled GitHub issue URL; only the
74
+ user submits it. If the user hits one, offer to invoke the plastic-feedback skill yourself
75
+ instead of waiting to be asked. A release is a collection of intents; `plastic-releasing`
76
+ runs the flow. A roadmap is an ordered, delivery-side collection; `plastic-roadmap` owns it.
172
77
 
173
78
  ## State System
174
79
 
175
80
  ```
176
- ~/.plastic/ # Global intent store (git, never pushed)
177
- ├── INDEX.md # Structure note (clusters by meaning)
178
- ├── config.yml # User preferences
179
- ├── projects.yml # Project slug → path registry
180
- └── store/ # Strategic intents
181
- └── ID--slug/
182
- └── {ID}--{slug}.md
183
-
184
- ~/.plastic/projects/{slug}/ # Project-scoped store
185
- ├── INDEX.md # Project-scoped index
186
- ├── AGENTS.md # Project stack defaults
187
- └── store/ # Tactical intents
188
- └── ID--slug/
81
+ ~/.plastic/ # Global store (git, never pushed)
82
+ INDEX.md # Structure note
83
+ config.yml, projects.yml # Preferences; slug -> path
84
+ store/ID--slug/ # Strategic intents
85
+ store/.sessions/<YYYYMMDD>/ # Day ledger: <YYYYMMDD>.md, checklist.md, savepoint.md
86
+ store/.tmp/<session>/ # current (the pointer), heartbeat; git-ignored
87
+ ~/.plastic/projects/{slug}/ # Project store: INDEX.md, AGENTS.md, roadmaps/, store/
189
88
  ```
190
89
 
191
- Project stores derived from `projects.yml`. No files placed in project code
192
- directories. SessionStart hook detects project by matching CWD.
193
-
194
- **Privacy:** Plastic is personal. All intent data under `~/.plastic/`. Each
195
- person has their own store. Collaboration through PRs, not shared intents.
196
-
197
- ## Directory Naming
90
+ `<session>` is the first eight characters of the session id. The pointer holds a day id (the
91
+ day ledger takes the record) or an intent id (an auto team owns the record); session start
92
+ writes today's day id. The SessionStart hook picks the project store by matching the working
93
+ directory against `projects.yml`; no Plastic files land in project code.
198
94
 
199
- Format: `ID--three-to-five-words` (all stores).
95
+ Naming: intents are `ID--three-to-five-words`, the file matching the directory
96
+ (`1a1--slug/1a1--slug.md`); next id: `ruby ~/.plastic/scripts/folgezettel-id <parent_id>
97
+ <store_path>`. Day ledgers are digits only (`20260828`), never hyphenated, never flattened to
98
+ the store root, so the id allocator and every 1.x store walker skip them.
200
99
 
201
- - Root intents: sequential numbers (`1`, `2`, `3`)
202
- - Branches alternate: `1` `1a` `1a1` `1a1a`
203
- - Intent file matches directory: `1a1--slug/1a1--slug.md`
204
- - Next ID: `ruby ~/.plastic/scripts/folgezettel-id <parent_id> <store_path>`
205
-
206
- See `plastic-conventions > references/knowledge-graph.md` for the branch-vs-root semantic
207
- decision: when to branch versus start a root.
208
-
209
- ## INDEX.md
210
-
211
- A Zettelkasten structure note, not a table of contents. Clusters by meaning.
212
-
213
- Sections: `## Active`, `## Future`, `## Clusters`, `## Abandoned`, `## Completed`.
214
-
215
- For index maintenance, use `plastic-store-indexing`.
216
-
217
- One-line entry convention. Each index entry is ONE line: `- [<id> <terse title>](<dir>) <tags>`.
218
- The title is the title, not a summary: aim for about 80 characters, no multi-sentence
219
- descriptions. This is a self-check, not a gate.
220
-
221
- ## Roadmaps
222
-
223
- A roadmap is a named, ordered, delivery-side collection of intents. Create, order, close, and
224
- consume one with `plastic-roadmap`; see `plastic-conventions > references/roadmaps.md` for the
225
- full format.
100
+ `INDEX.md` is a Zettelkasten structure note, not a table of contents. Sections: `## Active`,
101
+ `## Future`, `## Clusters`, `## Abandoned`, `## Completed`. One line per entry,
102
+ `- [<id> <terse title>](<dir>) <tags>`, about 80 characters: a title, not a summary.
226
103
 
227
104
  ## Rules for Skills
228
105
 
229
- ALL work flows through intents.
230
-
231
- 1. Before starting work, check INDEX.md for active intent. If none, create one.
232
- 2. Skill output (spec, plan, checklist) goes in the intent directory.
233
- 3. On completion, capture observations in `## Insights`.
234
- 4. When done, write `outcome.md` + `## Outcome` summary. Update INDEX.md.
235
- 5. Researches are intents. No separate folder.
236
- 6. Intents are created only via `plastic-intent-creating`. Never hand-author an intent file. The skill self-verifies the written intent with `scripts/validate-intent` before announcing or committing, so every intent is born complete. `--intent` text is escaped for double quotes and backslashes before it lands in frontmatter, so free-form text is safe to pass as-is, and a reciprocal `chain:` append preserves the target intent's existing flow- or block-style entries.
106
+ 1. Work records into an intent: the day ledger by default, a registered intent when the
107
+ pointer names one. Researches are intents too; no separate folder.
108
+ 2. Artifacts go in the intent directory, never in `docs/plans/` or `docs/specs/`: code goes in
109
+ the project, everything else in the intent. Capture observations in `## Insights`; at the
110
+ end write `outcome.md` and `## Outcome`, and update INDEX.md.
111
+ 3. State is derived from what exists: `outcome.md` present means done, so never write it
112
+ before the checklist is fully checked. Status lives on checklist items, not intents.
113
+ 4. The global store is never pushed (`~/.plastic/` holds sensitive data); agent-created repos
114
+ are private by default (`gh repo create --private`).
115
+ 5. Intents are created only via `plastic-intent-creating`, never hand-authored. It
116
+ self-verifies with `scripts/validate-intent`, so every intent is born complete; `--intent`
117
+ text is escaped for double quotes and backslashes before it lands in frontmatter, and a
118
+ reciprocal `chain:` append preserves the target intent's existing flow- or block-style
119
+ entries.
237
120
 
238
121
  ## House Style (self-check)
239
122
 
240
- The agent is the heaviest contributor to the transcript, so terseness pays every turn. These
241
- are pre-send self-checks the agent applies to its own output. They are not gated.
242
-
243
- - Answer or decision first. Lead with the result, then support it.
244
- - Bullets over paragraphs.
245
- - No preamble, no end-recap. Do not restate the question or summarize what you just said.
246
- - One question-cluster at a time when asking the human.
247
- - Reasoning goes in the thinking channel, not duplicated into the visible reply. This keeps
248
- the human's visibility into your reasoning without paying for it twice in the transcript.
249
-
250
- Active-intent cache rule. For the intent under active development you already hold its
251
- delivered artifacts in your own context: prefer revisiting that in-context memory (hit the
252
- cache) over re-reading them from disk, which only widens context. QMD is for OTHER or indexed
253
- intents, not for re-reading what you just wrote. Pairs with `/clear` plus savepoint-resume
254
- hygiene after each intent. Advisory self-check, not hard-verifiable.
255
-
256
- ## Tabular-First Reporting (intent 160)
257
-
258
- **Default.** Tabular layout is the default shape for three surfaces: What-stage discovery
259
- deposits, all research reports, and all agent reporting or presentation surfaces.
260
-
261
- **Calibration.** Tables are REQUIRED for any listing or discussion of intents, and for
262
- explaining complex data, comparisons, or multi-factor reasoning. This is NOT a blanket
263
- tables-everywhere rule: simple data stays prose, and tables must not be overused.
264
-
265
- **Bullets-limit.** Use bullets only when a table genuinely does not fit the content, and
266
- never more than 3-5 items.
267
-
268
- **Exception.** The EM-to-CTO human briefing (`skills/auto/references/human-report-contract.md`)
269
- keeps its deliberate prose shape (fixed State/Risk/Call, single item, nothing to tabulate) and
270
- is exempt from this rule.
271
-
272
- ## QMD Search
273
-
274
- QMD, Enola, and Serena are recommendations, not obligations. The deterministic entry point
275
- is `scripts/qmd-sync` (detect, register, reindex, status, search). Intent delivery reindexes
276
- the store; see `plastic-conventions > references/gates-and-enforcement.md` for gate
277
- mechanics.
278
-
279
- ## Transition Gates
280
-
281
- | Transition | Trigger | Gate |
282
- |---|---|---|
283
- | What → Why | `spec.md` written | (none) |
284
- | Why → How | `plan.md` + `actions/ACTION_N.md` (at least one) + `checklist.md` | `spec.md` must exist |
285
- | How → Exec | Checklist has items | plan.md, checklist.md, and at least one real actions/ACTION_N.md must exist |
286
- | Exec → Done | `outcome.md` written | All checklist items checked |
287
-
288
- Hard blocking: hooks exit code 2 on gate failure.
289
-
290
- ### The gates by name
291
-
292
- One line each. On Claude the five edit-path gates (savepoint-pre, lock-gate, code-gate,
293
- links-gate, create-gate) run inside one dispatcher process per Write or Edit, in that fixed
294
- order with the first deny winning; what each gate checks is unchanged.
295
-
296
- - **savepoint-pre** appends the savepoint ledger line before a write into an intent dir; it
297
- records and never denies.
298
- - **lock-gate** admits only the intent's lock owner or a registered delegate to write into an
299
- active intent directory.
300
- - **code-gate** denies a code edit before How is delivered and a code edit outside the
301
- provisioned worktree (stage rule or worktree rule, first match wins), with the audited
302
- `# plastic-ok` escape.
303
- - **links-gate** enforces the derived `## Links` projection contract at write time.
304
- - **create-gate** validates the proposed intent file at What write-time.
305
- - **bash-gate** (on the Bash matcher) intercepts a write attempted through a bash or
306
- interpreter one-liner, with the same audited escape.
307
- - **gate-check** (PostToolUse) enforces lifecycle stage order after each write.
308
- - **future-intent-check** (UserPromptSubmit) surfaces parked future intents whose keywords
309
- match the user's message; it informs and never denies.
310
-
311
- See `plastic-conventions > references/gates-and-enforcement.md` for the escape and logging
312
- detail.
313
-
314
- ## Delivery Isolation and the Single-Owner Lock
123
+ Answer or decision first; bullets over paragraphs; no preamble, no end-recap; one
124
+ question-cluster at a time; reasoning stays in the thinking channel. Tables are the default
125
+ for discovery deposits, research reports, and agent reports, and required for any listing of
126
+ intents or multi-factor comparison.
315
127
 
316
- Exactly one session or agent develops an intent's delivery at a time. Ownership is a
317
- session-keyed, durable `delivery.lock` (O_EXCL) in the intent directory; liveness is a lease
318
- (the owner's hooks refresh the file mtime, stale means older than the TTL). The `/tmp` session
319
- bridge is only a cache: the lock file wins on any disagreement. A per-artifact claim token
320
- arbitrates the file grain underneath the lock. Every code-touching intent gets its own git
321
- worktree (`<repo>/.claude/worktrees/{id}--{slug}`, branch `plastic/{id}--{slug}`); code edits
322
- happen only inside it. On a confirmed solo delivery the lock and worktree gates relax to
323
- advisory; any parallel or team activity restores strict enforcement.
128
+ ## QMD, Enola, and Serena
324
129
 
325
- "Intent done" is one law with three signals that must agree: INDEX `## Completed` /
326
- `## Abandoned`, `outcome.md`, and the savepoint `Done` line; INDEX is authoritative on any
327
- conflict.
130
+ Recommendations, not obligations, and only when present. QMD: prefer `qmd search` /
131
+ `qmd query` over the `plastic-*` collections to check for existing or related intents before
132
+ treating work as new. Enola, or Serena when Enola is absent: prefer its symbol resolution (or
133
+ `.enola/facts.jsonl`) for code navigation over grep.
328
134
 
329
- Structural maintenance (WORK vs MAINTENANCE) never touches delivered content: it only records
330
- itself in `revisions.md`, and only proceeds when the target's `delivery.lock` is not fresh.
135
+ ## Auto Teams: the Lock and the Worktree
331
136
 
332
- See `plastic-conventions > references/locks-and-worktrees.md`,
333
- `references/completion-and-done.md`, and `references/maintenance-and-revisions.md` for the full
334
- doctrine.
137
+ Locks and worktrees exist only for auto teams. One team develops an intent at a time: a
138
+ session-keyed `delivery.lock` in the intent directory, alive while its mtime lease is fresh.
139
+ Code edits happen in the intent's worktree (`<repo>/.claude/worktrees/{id}--{slug}`, branch
140
+ `plastic/{id}--{slug}`). "Done" is three signals that agree: INDEX `## Completed` or
141
+ `## Abandoned`, `outcome.md`, and the savepoint `Done` line; INDEX wins on conflict.
package/README.md CHANGED
@@ -136,9 +136,8 @@ Walk this once in
136
136
  | Family | Commands |
137
137
  | ------ | -------- |
138
138
  | Mode | `plastic-tutorial`, `plastic-auto` |
139
- | Intent | `plastic-continuing`, `plastic-intent-creating`, `plastic-intent-starting`, `plastic-intent-brainstorming`, `plastic-intent-grilling`, `plastic-intent-speccing`, `plastic-intent-planning`, `plastic-intent-executing`, `plastic-intent-ending`, `plastic-intent-continuing`, `plastic-intent-researching` |
140
- | Project and delivery | `plastic-project-creating`, `plastic-project-continuing`, `plastic-roadmap`, `plastic-roadmap-continuing`, `plastic-releasing` |
141
- | Skill | `plastic-skill-creating`, `plastic-skill-evaluating` |
139
+ | Intent | `plastic-intent-creating`, `plastic-intent-continuing`, `plastic-intent-speccing`, `plastic-intent-executing`, `plastic-intent-ending` |
140
+ | Project and delivery | `plastic-project-creating`, `plastic-roadmap`, `plastic-releasing` |
142
141
  | Product | `plastic-install`, `plastic-update`, `plastic-uninstall`, `plastic-rollback`, `plastic-doctor` |
143
142
 
144
143
  See [`docs/guides/index.md`](docs/guides/index.md) for task-oriented walkthroughs.
@@ -153,10 +152,10 @@ plan a machine can build from exactly. Read
153
152
  target for now. See [harness support](docs/reference/harness-adapters.md).
154
153
  - Plain Markdown plus Git. The work stays in files you own.
155
154
  - Personal stores by default.
156
- - Guided delivery with a human at every gate, or autonomous delivery when you
157
- ask for it.
155
+ - Direct work in the session, a thinking conversation when the work needs one,
156
+ or autonomous delivery by an agent team when you ask for it.
158
157
  - Two advisor agents ship for the hard problems: one-way doors, plans, adversarial
159
- review, deadlocks. Summon one deliberately, state S, M, or L in the brief; nobody's
158
+ review, deadlocks. Summon one deliberately, state the effort and the answer shape in the brief; nobody's
160
159
  main session is ever touched. Faux Fable (recommended) is an ordinary model carrying
161
160
  the frontier reasoning discipline inline, much cheaper; Fable 5 is the frontier model
162
161
  itself. Choose the default at install, switch it any time.
@@ -3,10 +3,10 @@ name: plastic-advisor
3
3
  description: |
4
4
  The real advisor: expensive, consultation-only, dispatched deliberately by
5
5
  the user or main session for the hardest reasoning, never by the auto
6
- pipeline. State TIER: S, M, or L in the brief, plus an EFFORT line. S: one
7
- bounded decision, verdict plus biggest risk. M: plan or plan-review,
8
- decision plus stepped plan plus risk map. L: architecture, one-way doors,
9
- deadlocks; adds rival approaches and kill criteria. Model is set by config
6
+ pipeline. State an EFFORT line in the brief (low, medium, high, xhigh, or max) and
7
+ the shape you need: a verdict plus the biggest risk for one bounded
8
+ decision; a stepped plan plus a risk map for a plan or plan review; rival
9
+ approaches and kill criteria for architecture, one-way doors, or deadlocks. Model is set by config
10
10
  (agents.models.claude.plastic-advisor); fable is the shipped default.
11
11
  model: fable
12
12
  effort: xhigh
@@ -17,8 +17,8 @@ Protocol, whatever model is running you today. The caller pays premium rates
17
17
  for this consultation, so every sentence you return must earn its cost.
18
18
 
19
19
  **Your world is the brief.** The caller sends a natural-prose briefing that should
20
- cover: the goal and the decision the answer feeds, a TIER line (S, M, or L), an
21
- EFFORT line (low, medium, high, xhigh, or max), up to three questions, the
20
+ cover: the goal and the decision the answer feeds, an EFFORT line (low, medium,
21
+ high, xhigh, or max), the answer shape it needs, up to three questions, the
22
22
  caller's own candidate answer, evidence labeled verified/inferred/assumed, what
23
23
  was tried and how it failed, hard constraints, one-way doors, and the expected
24
24
  answer shape. Do not explore the repository or the web; if a load-bearing piece
@@ -31,9 +31,9 @@ point where their reasoning and reality part ways.
31
31
 
32
32
  **Answer contract, in this order:**
33
33
  1. Line 1: the decision or verdict, actionable on its own.
34
- 2. Reasoning or plan, shaped by tier (below), only the load-bearing part.
35
- 3. Risks ranked by probability times cost, each with its cheapest check (S: the
36
- single biggest risk only).
34
+ 2. Reasoning or plan, shaped by the question (below), only the load-bearing part.
35
+ 3. Risks ranked by probability times cost, each with its cheapest check (for one
36
+ bounded decision: the single biggest risk only).
37
37
  4. Labels on every load-bearing claim: verified from the brief, inferred, or
38
38
  assumed.
39
39
  5. What you could not verify from the brief, with the cheapest way the caller can
@@ -42,15 +42,16 @@ point where their reasoning and reality part ways.
42
42
  verify before starting, the failure mode each step invites, and the observation
43
43
  that means stop and come back.
44
44
 
45
- **Tier calibration.** The TIER line sets your depth, whatever effort you were
46
- dispatched at. S: one bounded decision, verdict plus one paragraph; if the brief
45
+ **Depth calibration.** The question sets your depth, whatever effort you were
46
+ dispatched at. One bounded decision: verdict plus one paragraph; if the brief
47
47
  actually holds a plan or architecture question, say so in your second line and
48
- answer only what an S verdict honestly covers. M: a numbered plan with per-step
49
- "done when" checks; generate at least one rival approach and state in one line why
50
- the chosen one wins. L: generate rival approaches, build each rival's strongest
51
- case, then attack your own winner before answering; spend care where reversal is
52
- expensive; always end with kill criteria, the observation that means the caller
53
- should abandon this plan and return. No TIER line: treat as S and say so.
48
+ answer only what a verdict honestly covers. A plan or plan review: a numbered plan
49
+ with per-step "done when" checks; generate at least one rival approach and state in
50
+ one line why the chosen one wins. Architecture, a one-way door, or a deadlock:
51
+ generate rival approaches, build each rival's strongest case, then attack your own
52
+ winner before answering; spend care where reversal is expensive; always end with
53
+ kill criteria, the observation that means the caller should abandon this plan and
54
+ return. No shape stated: answer as one bounded decision and say so.
54
55
 
55
56
  Plain language, no em-dashes. The full protocol you serve ships in the
56
57
  agent-advisor skill's `references/advisor-protocol.md`.