@zalom/plastic 1.0.0-beta.34 → 1.0.0-beta.36

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 (38) hide show
  1. package/PLASTIC-reference.md +133 -0
  2. package/PLASTIC.md +29 -151
  3. package/agents/plastic-brainstorming.md +2 -6
  4. package/agents/plastic-enforcer.md +11 -6
  5. package/agents/plastic-executor.md +2 -6
  6. package/agents/plastic-future-intent-researcher.md +2 -7
  7. package/agents/plastic-intent-curator.md +2 -10
  8. package/agents/plastic-intent-discovery.md +8 -10
  9. package/agents/plastic-planner.md +2 -6
  10. package/agents/plastic-spec-specialist.md +2 -6
  11. package/bin/plastic.js +7 -3
  12. package/package.json +2 -1
  13. package/scripts/install.rb +42 -6
  14. package/scripts/lib/bridge.rb +84 -5
  15. package/scripts/lib/installer_core.rb +40 -6
  16. package/scripts/lib/power_tools.rb +18 -16
  17. package/scripts/lib/preflight.rb +79 -0
  18. package/skills/auto/SKILL.md +40 -38
  19. package/skills/auto/references/end-tail.md +56 -0
  20. package/skills/auto/references/human-report-contract.md +55 -0
  21. package/skills/brainstorming/SKILL.md +7 -34
  22. package/skills/brainstorming/references/design-principles.md +49 -0
  23. package/skills/creating-intent/SKILL.md +5 -26
  24. package/skills/creating-project/SKILL.md +11 -74
  25. package/skills/creating-project/references/project-scaffolding.md +97 -0
  26. package/skills/dashboard/SKILL.md +2 -17
  27. package/skills/dashboard/references/classification.md +22 -0
  28. package/skills/doctor/SKILL.md +6 -6
  29. package/skills/install/SKILL.md +75 -84
  30. package/skills/intent-discovery/SKILL.md +8 -7
  31. package/skills/intent-starting/SKILL.md +11 -8
  32. package/skills/releasing/SKILL.md +14 -46
  33. package/skills/releasing/references/promotion-and-tagging.md +60 -0
  34. package/skills/uninstall/SKILL.md +29 -11
  35. package/skills/update/SKILL.md +34 -23
  36. package/skills/versions/SKILL.md +27 -12
  37. package/skills/writing-plans/SKILL.md +10 -88
  38. package/skills/writing-plans/references/plan-format.md +102 -0
@@ -0,0 +1,56 @@
1
+ # End-Tail Mechanics: resolve_session and Disarm Ordering
2
+
3
+ Deep WHY/mechanics detail behind two spots in `SKILL.md`: how `arm_auto` resolves a
4
+ session id when arming the gate, and why the End-tail steps in Completion (release
5
+ worktrees, clear the lock, purge the bridge, reindex) run in that exact order.
6
+
7
+ ## Table of Contents
8
+
9
+ - [resolve_session fallback internals](#resolve_session-fallback-internals)
10
+ - [Disarm ordering and worktree cleanup rationale](#disarm-ordering-and-worktree-cleanup-rationale)
11
+ - [QMD reindex ordering rationale](#qmd-reindex-ordering-rationale)
12
+
13
+ ## resolve_session fallback internals
14
+
15
+ `arm_auto` calls `resolve_session`, which picks the first non-empty of: the explicit
16
+ id you pass -> `CLAUDE_CODE_SESSION_ID` -> a deterministic derived key (a hash of the
17
+ store and intent id). It never returns nil, so the gate engages even when every
18
+ session env var is empty; the call never needs a non-empty session env var to
19
+ function. Arming prints a one-line notice to stderr when it falls through to the
20
+ derived key.
21
+
22
+ Arming acquires the durable `delivery.lock` in the intent dir, keyed by that resolved
23
+ session. Ownership is session-keyed, not process-keyed, so the arm one-liner exiting
24
+ immediately is fine by construction: the lock stays yours for every later tool call in
25
+ this session. A failed arm raises with a message naming the resolving `plastic-lock`
26
+ verb.
27
+
28
+ ## Disarm ordering and worktree cleanup rationale
29
+
30
+ Disarm runs the ordered End tail: it releases the worktrees first, then clears the
31
+ intent's `delivery.lock` (and the bridge's lock cache), and only then is the bridge
32
+ purge-eligible. Disarming also purges stale bridge files from the temp directory
33
+ automatically (it keeps the current bridge, any live run, and any bridge whose intent
34
+ still holds a delivery lock), so no manual `/tmp` cleanup is needed.
35
+
36
+ **Worktree cleanup (mandatory, intent 73c3).** Disarming performs the worktree release:
37
+ `disarm_auto` calls `Worktree.release`, which removes both per-intent worktrees (the code
38
+ worktree under `<repo>/.claude/worktrees/{id}--{slug}` and the paired store worktree under
39
+ `<plastic_home>/.worktrees/{id}--{slug}`), prunes both repos, and clears the worktree block
40
+ from the bridge. This is the plain remove path: the disarm route does NOT merge, so use it
41
+ only when no release merges the branch (the branch survives and can be reclaimed).
42
+
43
+ When the work is being shipped through a release, do NOT rely on this plain remove. The
44
+ release path (Completion step 4, via `plastic-releasing`) is responsible for merging the
45
+ intent's code branch (`plastic/{id}--{slug}`) back to the repo's default branch BEFORE the
46
+ worktree is removed, so the integrated work is not lost. It does this with
47
+ `Worktree.finish(bridge_data, merge: true)` (merge-then-remove). Never leave an orphaned
48
+ worktree, and run `git worktree prune` if you hit a stale reference.
49
+
50
+ ## QMD reindex ordering rationale
51
+
52
+ Completion is the lifecycle event that keeps the search index fresh. `<store-root>` is
53
+ the store that holds this intent (the global store or the project store). The reindex is
54
+ the LAST End-tail step, run after purge, so the index never references a bridge or lock
55
+ that is about to disappear (see PLASTIC.md `## Delivery Isolation and the Single-Owner
56
+ Lock`).
@@ -0,0 +1,55 @@
1
+ # Human Report Contract (per-stage EM-to-CTO briefing)
2
+
3
+ This doc defines how the orchestrator briefs the human at each of the five stage boundaries
4
+ (What, Why, How, Exec, Done) in auto mode. It is the outward, human-facing counterpart to the
5
+ internal report contract in `references/agent-report-contract.md`. Voice: an engineering
6
+ manager briefing a CTO. Lead with impact, name the risk, leave the decision.
7
+
8
+ ## The skeleton
9
+
10
+ One fixed 3-line shape, reused at every stage:
11
+
12
+ 1. **State**: what happened and what it means, impact first, one line.
13
+ 2. **Risk**: the one thing that could bite, or "nothing flagged."
14
+ 3. **Call**: the decision left to you, or the go-ahead I am taking.
15
+
16
+ This is a shape, not a rigid template. Keep the order (State, then Risk, then Call) and keep it
17
+ short. The words can flex to fit the stage.
18
+
19
+ ## Per-stage content
20
+
21
+ - **What**: State = the work I picked up and why it matters now. Risk = scope uncertainty.
22
+ Call = confirm this is worth doing, or I proceed.
23
+ - **Why**: State = the approach I chose, one line. Risk = the main trade-off. Call = the one
24
+ decision I need (approve, or pick an option).
25
+ - **How**: State = the plan shape (task count and what it builds). Risk = the riskiest task or
26
+ dependency. Call = approve the plan to build.
27
+ - **Exec**: State = what got built and the test result. Risk = residual failures or deviations.
28
+ Call = go to review, or done.
29
+ - **Done**: State = the delivered impact. Risk = residual risk. Call = the decision left to you
30
+ (merge, release, accept).
31
+
32
+ ## Boundary vs intent 74
33
+
34
+ Intent 74's report contract (`references/agent-report-contract.md`) is the INTERNAL,
35
+ machine-checked handoff from a dispatched specialist back to the orchestrator: a structured
36
+ envelope plus a per-role payload. This contract is the OUTWARD human briefing, orchestrator to
37
+ user, in prose. Different direction, different audience, different form. The orchestrator
38
+ CONSUMES the intent 74 report to WRITE the human briefing defined here. The two never merge.
39
+
40
+ ## Brevity: point, don't repeat
41
+
42
+ Surface rules (no em-dashes, plain words, no filler openers, and so on) are owned by the
43
+ shipped `plastic-humanizer` skill and the always-on plain-language layer. This contract does not
44
+ re-list that catalog. It restates only the hard bans as one line: no em-dashes, no "not X but Y",
45
+ no rule of three, no hype words, no sycophancy, no over-bolding. Apply `plastic-humanizer` and the
46
+ always-on layer for everything else.
47
+
48
+ ## Emission: guided vs auto
49
+
50
+ In guided mode, the briefing lands at each stage boundary and the human acts on the Call line
51
+ before the next stage starts.
52
+
53
+ In auto mode, the orchestrator still emits the briefing at each boundary, as a running EM-to-CTO
54
+ account. The Call line becomes the go-ahead the orchestrator takes itself and moves on, except at
55
+ the existing hard stops (destructive action without a safe alternative, project-path confirm).
@@ -44,30 +44,8 @@ You MUST create a task for each of these items and complete them in order:
44
44
 
45
45
  ## Process Flow
46
46
 
47
- ```dot
48
- digraph brainstorming {
49
- "Explore project context" [shape=box];
50
- "Ask clarifying questions" [shape=box];
51
- "Propose 2-3 approaches" [shape=box];
52
- "Present design sections" [shape=box];
53
- "User approves design?" [shape=diamond];
54
- "Write spec" [shape=box];
55
- "Spec self-review\n(fix inline)" [shape=box];
56
- "User reviews spec?" [shape=diamond];
57
- "Invoke plastic-writing-plans" [shape=doublecircle];
58
-
59
- "Explore project context" -> "Ask clarifying questions";
60
- "Ask clarifying questions" -> "Propose 2-3 approaches";
61
- "Propose 2-3 approaches" -> "Present design sections";
62
- "Present design sections" -> "User approves design?";
63
- "User approves design?" -> "Present design sections" [label="no, revise"];
64
- "User approves design?" -> "Write spec" [label="yes"];
65
- "Write spec" -> "Spec self-review\n(fix inline)";
66
- "Spec self-review\n(fix inline)" -> "User reviews spec?";
67
- "User reviews spec?" -> "Write spec" [label="changes requested"];
68
- "User reviews spec?" -> "Invoke plastic-writing-plans" [label="approved"];
69
- }
70
- ```
47
+ The Checklist above states the ordered flow (steps 1-8). For the same flow as a
48
+ diagram, read `references/design-principles.md`.
71
49
 
72
50
  **The terminal state is invoking `plastic-writing-plans`.** Do NOT invoke any other implementation skill. The ONLY skill you invoke after brainstorming is `plastic-writing-plans`.
73
51
 
@@ -95,16 +73,11 @@ digraph brainstorming {
95
73
  - Cover: architecture, components, data flow, error handling, testing
96
74
  - Be ready to go back and clarify if something doesn't make sense
97
75
 
98
- **Design for isolation and clarity:**
99
- - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
100
- - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
101
- - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
102
- - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
103
-
104
- **Working in existing codebases:**
105
- - Explore the current structure before proposing changes. Follow existing patterns.
106
- - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
107
- - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
76
+ **Design for isolation and clarity, and working in existing codebases:** before
77
+ proposing a design, read `references/design-principles.md` for unit-boundary
78
+ guidance (what makes a good interface, when a file has grown too large) and
79
+ existing-codebase guidance (follow established patterns, fold in targeted
80
+ improvements without unrelated refactoring).
108
81
 
109
82
  ## After the Design
110
83
  **Documentation:**
@@ -0,0 +1,49 @@
1
+ # Design Principles: Unit Boundaries and Existing Codebases
2
+
3
+ General good-developer guidance behind two parts of the Process: how to design for
4
+ isolation and clarity, and how to behave in an existing codebase. Also holds the
5
+ Process Flow diagram (the same ordered flow the Checklist already states as numbered
6
+ steps).
7
+
8
+ ## Design for isolation and clarity
9
+
10
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
11
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
12
+ - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
13
+ - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
14
+
15
+ ## Working in existing codebases
16
+
17
+ - Explore the current structure before proposing changes. Follow existing patterns.
18
+ - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
19
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
20
+
21
+ ## Process Flow (diagram)
22
+
23
+ The Checklist above already states this ordered flow as numbered steps 1-8; this
24
+ diagram is the same flow in a visual form.
25
+
26
+ ```dot
27
+ digraph brainstorming {
28
+ "Explore project context" [shape=box];
29
+ "Ask clarifying questions" [shape=box];
30
+ "Propose 2-3 approaches" [shape=box];
31
+ "Present design sections" [shape=box];
32
+ "User approves design?" [shape=diamond];
33
+ "Write spec" [shape=box];
34
+ "Spec self-review\n(fix inline)" [shape=box];
35
+ "User reviews spec?" [shape=diamond];
36
+ "Invoke plastic-writing-plans" [shape=doublecircle];
37
+
38
+ "Explore project context" -> "Ask clarifying questions";
39
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
40
+ "Propose 2-3 approaches" -> "Present design sections";
41
+ "Present design sections" -> "User approves design?";
42
+ "User approves design?" -> "Present design sections" [label="no, revise"];
43
+ "User approves design?" -> "Write spec" [label="yes"];
44
+ "Write spec" -> "Spec self-review\n(fix inline)";
45
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
46
+ "User reviews spec?" -> "Write spec" [label="changes requested"];
47
+ "User reviews spec?" -> "Invoke plastic-writing-plans" [label="approved"];
48
+ }
49
+ ```
@@ -124,32 +124,11 @@ cleanly, and do not work around the failure by hand-writing the files.
124
124
 
125
125
  ### 6. If Implementation Intent Spawns a Project
126
126
 
127
- When the user says "start building" or the plan calls for a new project:
128
-
129
- 1. Determine project slug from intent name
130
- 2. Create project directory in first `project_roots` path (from `~/.plastic/config.yml`):
131
- ```bash
132
- mkdir -p <project_root>/<slug>
133
- cd <project_root>/<slug>
134
- git init
135
- ```
136
- 3. Copy `AGENTS.md` template from `${CLAUDE_PLUGIN_ROOT}/templates/agents.md`
137
- 4. Register in `~/.plastic/projects.yml`:
138
- ```yaml
139
- <slug>:
140
- path: <full-path>
141
- parent: "ID"
142
- registered: <today>
143
- status: active
144
- ```
145
- 5. Provision the project store (the single source of truth for store creation;
146
- runs after step 4 because the provisioner requires the project to be
147
- registered):
148
- ```bash
149
- ruby ~/.plastic/scripts/provision-project-store <slug>
150
- ```
151
- 6. Add `project-<slug>` to the intent's `tags` array
152
- 7. Auto-commit in both `~/.plastic/` and the new project
127
+ When the user says "start building" or the plan calls for a new project, invoke the
128
+ `plastic-creating-project` skill; it owns project directory creation, AGENTS.md
129
+ population, projects.yml registration, store provisioning, and the auto-commit of
130
+ both stores. Add `project-<slug>` to this intent's `tags` array either before
131
+ invoking it or as part of that skill's handoff.
153
132
 
154
133
  ### 7. Update INDEX.md
155
134
 
@@ -43,89 +43,25 @@ Invoke `plastic-install --local` in the project directory. This creates:
43
43
 
44
44
  ### 4. Populate AGENTS.md
45
45
 
46
- Create `AGENTS.md` in the project root with:
47
-
48
- ```markdown
49
- # <Project Name> — Agent Instructions
50
-
51
- Read `PLASTIC.md` in `~/.plastic/`. It contains all Plastic conventions.
52
- Follow it exactly.
53
-
54
- This file is the operating contract for this project. Any agent entering
55
- this project reads this file first.
56
-
57
- ## Global Store
58
-
59
- Location: `~/.plastic/`
60
- Governing intent(s): <list of founding intent IDs with descriptions>
61
-
62
- ## Decisions
63
-
64
- <Copy ALL decisions from founding intent(s)' `## Context > ### Decisions`>
65
-
66
- Each decision should include:
67
- - The decision itself
68
- - The rationale (why this choice)
69
- - Date decided
70
-
71
- ## Project-Specific Rules
72
-
73
- <Any rules derived from the decisions — e.g., "Use Minitest, not RSpec",
74
- "37signals methodology", "sqlite-vec for vector storage">
75
- ```
46
+ Create `AGENTS.md` in the project root from the skeleton in
47
+ `references/project-scaffolding.md` ("AGENTS.md skeleton"): read it now and fill in
48
+ the project name, governing intent IDs, decisions, and project-specific rules.
76
49
 
77
50
  ### 5. Create Tactical Mirror
78
51
 
79
- Create the first intent in the project's store at `~/.plastic/projects/{slug}/store/`:
52
+ Create the first intent in the project's store at `~/.plastic/projects/{slug}/store/`
53
+ using the frontmatter, sections, and INDEX.md line in `references/project-scaffolding.md`
54
+ ("Tactical mirror intent"), including the Hub multi-intent variant if there is more
55
+ than one founding intent.
80
56
 
81
57
  **Directory:** `~/.plastic/projects/{slug}/store/1--{slug}/`
82
58
  **File:** `~/.plastic/projects/{slug}/store/1--{slug}/1--{slug}.md`
83
59
 
84
- ```yaml
85
- ---
86
- id: '1'
87
- intent: "<same description as founding intent>"
88
- sources: ["global:<founding_intent_ID>"]
89
- chain: []
90
- created: <today>
91
- author: <same as founding intent author>
92
- tags: [<relevant tags>]
93
- ---
94
- ```
95
-
96
- Sections:
97
- - `## Intent` — same as founding intent
98
- - `## Context` — carry forward relevant Context and Decisions
99
- - `## Outcome` — (pending)
100
- - `## Insights` — empty
101
- - `## Links` — `[[global:<founding_intent_ID>|<founding intent name>]]`
102
-
103
- Update the project's `~/.plastic/projects/{slug}/INDEX.md`:
104
- ```markdown
105
- # Index
106
-
107
- ## Active
108
- - [1 — <intent name>](store/1--<slug>/1.md) — implementation, from: global:<ID>
109
- ```
110
-
111
- **For multi-intent spawning (Hub):**
112
- - `sources`: `["global:<id1>", "global:<id2>", ...]` — all founding intents
113
- - All founding intents' decisions merge into AGENTS.md
114
- - Context carries forward from all founding intents
115
-
116
60
  ### 6. Register in projects.yml
117
61
 
118
- Read `~/.plastic/projects.yml` and add:
119
-
120
- ```yaml
121
- <slug>:
122
- path: <full-path>
123
- parent: "<founding_intent_ID>"
124
- registered: <today>
125
- status: active
126
- ```
127
-
128
- For Hub-spawned projects, `parent` references the primary founding intent.
62
+ Read `~/.plastic/projects.yml` and add the entry shown in
63
+ `references/project-scaffolding.md` ("projects.yml registration block"). For
64
+ Hub-spawned projects, `parent` references the primary founding intent.
129
65
 
130
66
  ### 7. Provision the Project Store
131
67
 
@@ -195,4 +131,5 @@ Announce to user:
195
131
 
196
132
  ## References
197
133
 
134
+ - Read `references/project-scaffolding.md` before steps 4-6, for the AGENTS.md skeleton, the tactical mirror intent format, and the projects.yml registration block
198
135
  - Read `references/hubs-projects.md` for the full hub/project relationship model, project creation flow, and cross-linking conventions
@@ -0,0 +1,97 @@
1
+ # Project Scaffolding Templates
2
+
3
+ Full templates for the artifacts created while spawning a project: the AGENTS.md
4
+ skeleton (Workflow step 4), the tactical mirror intent (step 5), and the
5
+ projects.yml registration block (step 6).
6
+
7
+ ## Table of Contents
8
+
9
+ - [AGENTS.md skeleton (step 4)](#agentsmd-skeleton-step-4)
10
+ - [Tactical mirror intent (step 5)](#tactical-mirror-intent-step-5)
11
+ - [projects.yml registration block (step 6)](#projectsyml-registration-block-step-6)
12
+
13
+ ## AGENTS.md skeleton (step 4)
14
+
15
+ Create `AGENTS.md` in the project root with:
16
+
17
+ ```markdown
18
+ # <Project Name> — Agent Instructions
19
+
20
+ Read `PLASTIC.md` in `~/.plastic/`. It contains all Plastic conventions.
21
+ Follow it exactly.
22
+
23
+ This file is the operating contract for this project. Any agent entering
24
+ this project reads this file first.
25
+
26
+ ## Global Store
27
+
28
+ Location: `~/.plastic/`
29
+ Governing intent(s): <list of founding intent IDs with descriptions>
30
+
31
+ ## Decisions
32
+
33
+ <Copy ALL decisions from founding intent(s)' `## Context > ### Decisions`>
34
+
35
+ Each decision should include:
36
+ - The decision itself
37
+ - The rationale (why this choice)
38
+ - Date decided
39
+
40
+ ## Project-Specific Rules
41
+
42
+ <Any rules derived from the decisions — e.g., "Use Minitest, not RSpec",
43
+ "37signals methodology", "sqlite-vec for vector storage">
44
+ ```
45
+
46
+ ## Tactical mirror intent (step 5)
47
+
48
+ Create the first intent in the project's store at `~/.plastic/projects/{slug}/store/`:
49
+
50
+ **Directory:** `~/.plastic/projects/{slug}/store/1--{slug}/`
51
+ **File:** `~/.plastic/projects/{slug}/store/1--{slug}/1--{slug}.md`
52
+
53
+ ```yaml
54
+ ---
55
+ id: '1'
56
+ intent: "<same description as founding intent>"
57
+ sources: ["global:<founding_intent_ID>"]
58
+ chain: []
59
+ created: <today>
60
+ author: <same as founding intent author>
61
+ tags: [<relevant tags>]
62
+ ---
63
+ ```
64
+
65
+ Sections:
66
+ - `## Intent` — same as founding intent
67
+ - `## Context` — carry forward relevant Context and Decisions
68
+ - `## Outcome` — (pending)
69
+ - `## Insights` — empty
70
+ - `## Links` — `[[global:<founding_intent_ID>|<founding intent name>]]`
71
+
72
+ Update the project's `~/.plastic/projects/{slug}/INDEX.md`:
73
+ ```markdown
74
+ # Index
75
+
76
+ ## Active
77
+ - [1 — <intent name>](store/1--<slug>/1.md) — implementation, from: global:<ID>
78
+ ```
79
+
80
+ **For multi-intent spawning (Hub):**
81
+ - `sources`: `["global:<id1>", "global:<id2>", ...]` — all founding intents
82
+ - All founding intents' decisions merge into AGENTS.md
83
+ - Context carries forward from all founding intents
84
+
85
+ ## projects.yml registration block (step 6)
86
+
87
+ Read `~/.plastic/projects.yml` and add:
88
+
89
+ ```yaml
90
+ <slug>:
91
+ path: <full-path>
92
+ parent: "<founding_intent_ID>"
93
+ registered: <today>
94
+ status: active
95
+ ```
96
+
97
+ For Hub-spawned projects, `parent` references the primary founding intent.
@@ -110,23 +110,8 @@ a raw terminal. The Markdown board (`--data` + template) is the surface for the
110
110
 
111
111
  ## How classification works (deterministic)
112
112
 
113
- - **Effort** — small for `research`/`exploration`/`bugfix`, for already-scoped intents
114
- (plan/checklist exists), or a **branch id** (folgezettel depth ≥ 2, e.g. `4a`, `12b3`); big
115
- otherwise. A root id (a bare number) is always depth 1, so it is never demoted by this rule.
116
- - **Value → high** when any of: explicit `value: high`; a human-authored **root** intent; or
117
- an intent that is a `source` of ≥1 other intent (it has spawned follow-on work). A purely
118
- relational `chain` entry alone is **not** a value signal (intent 68) — else low.
119
- - **Flags** — `unblocked` only when a **future** intent has **all** its `sources` done AND at
120
- least one source's completion date is strictly later than the intent's own `created` date (a
121
- genuine wait, not a birth-time default); `in-progress` only when the savepoint ledger shows
122
- real post-birth activity, not just the creation stamp; `stale` only on future intents past
123
- the staleness threshold. All three kept low-noise by design.
124
- - **Override** — a `value: high|low` frontmatter field always wins (pre-stamped data, never
125
- model judgment at render time).
126
- - **Caps** — quadrant lists and the project board's `active`/`future` lists are capped at 8
127
- entries plus a trailing "+N more" line; each entry's text is truncated to 120 characters
128
- with a trailing ellipsis. Applies to the Markdown board only (the ASCII renderer has its own
129
- separate `CELL_CAP`).
113
+ The script computes Effort/Value/Flags/Override/Caps; the agent never re-derives them.
114
+ To explain or debug a quadrant assignment, read `references/classification.md`.
130
115
 
131
116
  ## Eval
132
117
 
@@ -0,0 +1,22 @@
1
+ # How Classification Works (Deterministic)
2
+
3
+ The script (`dashboard.rb`) computes Effort/Value/Flags/Override/Caps deterministically;
4
+ the agent never re-derives them. Read this to explain or debug a quadrant assignment.
5
+
6
+ - **Effort** — small for `research`/`exploration`/`bugfix`, for already-scoped intents
7
+ (plan/checklist exists), or a **branch id** (folgezettel depth ≥ 2, e.g. `4a`, `12b3`); big
8
+ otherwise. A root id (a bare number) is always depth 1, so it is never demoted by this rule.
9
+ - **Value → high** when any of: explicit `value: high`; a human-authored **root** intent; or
10
+ an intent that is a `source` of ≥1 other intent (it has spawned follow-on work). A purely
11
+ relational `chain` entry alone is **not** a value signal (intent 68) — else low.
12
+ - **Flags** — `unblocked` only when a **future** intent has **all** its `sources` done AND at
13
+ least one source's completion date is strictly later than the intent's own `created` date (a
14
+ genuine wait, not a birth-time default); `in-progress` only when the savepoint ledger shows
15
+ real post-birth activity, not just the creation stamp; `stale` only on future intents past
16
+ the staleness threshold. All three kept low-noise by design.
17
+ - **Override** — a `value: high|low` frontmatter field always wins (pre-stamped data, never
18
+ model judgment at render time).
19
+ - **Caps** — quadrant lists and the project board's `active`/`future` lists are capped at 8
20
+ entries plus a trailing "+N more" line; each entry's text is truncated to 120 characters
21
+ with a trailing ellipsis. Applies to the Markdown board only (the ASCII renderer has its own
22
+ separate `CELL_CAP`).
@@ -3,7 +3,7 @@ name: plastic-doctor
3
3
  description: Use when diagnosing Plastic installation health, after updates, or when something seems broken. Runs checks and reports findings with fix options.
4
4
  ---
5
5
 
6
- # Doctor — Plastic Health Check
6
+ # Doctor: Plastic Health Check
7
7
 
8
8
  ## Scopes
9
9
 
@@ -67,9 +67,9 @@ Parse the JSON output from stdout. The script is read-only and never modifies
67
67
  files. Errors go to stderr.
68
68
 
69
69
  Exit codes indicate check results, not script failure:
70
- - `0` — all checks passed
71
- - `1` — warnings found
72
- - `2` — failures found
70
+ - `0`: all checks passed
71
+ - `1`: warnings found
72
+ - `2`: failures found
73
73
 
74
74
  All three exit codes mean the script ran successfully. Do not treat non-zero
75
75
  as an error.
@@ -118,7 +118,7 @@ Use the `fix_hint` value to determine the correct action:
118
118
  | "Remove stale references from INDEX.md" | Edit INDEX.md to remove ghost references |
119
119
  | "Inject the missing required frontmatter field(s)" | Edit the intent's `{ID}--{slug}.md` frontmatter to add the missing key (e.g. `chain: []`) without touching other keys |
120
120
  | "Run: provision-project-store {slug}" | Run `provision-project-store <slug>` (or invoke the `plastic-add-project-store` skill) to create the missing store |
121
- | "Re-run installer" | Run `npx @zalom/plastic@latest --agent` |
121
+ | "Re-run installer" | Run `npx -y @zalom/plastic@<channel> install --agent <agent>` (channel: -alpha->@alpha, -beta->@beta, else @latest) |
122
122
  | "Dispatch plastic-intent-curator ... revisions.md ..." | Invoke the `plastic-intent-curator` (or the agent) to relocate the flagged section or ref into the intent's `revisions.md` via move-and-record (one dated, `[rule: <tag>]`-tagged entry per item), per PLASTIC.md > Structural maintenance and revisions.md. For a missing required section, restore or reproject it instead. |
123
123
 
124
124
  For fixes the agent cannot handle automatically, explain what the user needs
@@ -144,7 +144,7 @@ Show the updated results.
144
144
  When invoked from `plastic-update` (not directly by the user):
145
145
 
146
146
  1. Run the diagnostic script as in Step 1.
147
- 2. If all checks pass: show a single line — **"Health check: all clear."**
147
+ 2. If all checks pass, show a single line: **"Health check: all clear."**
148
148
  3. If issues are found: show the full report (Steps 3-6).
149
149
 
150
150
  This keeps the update flow clean when nothing is wrong.