@zalom/plastic 2.0.2 → 2.0.3
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.
- package/PLASTIC.md +2 -1
- package/README.md +40 -33
- package/agents/plastic-enforcer.md +12 -10
- package/agents/plastic-executor.md +2 -1
- package/agents/plastic-primary-advisor.md +2 -2
- package/agents/plastic-secondary-advisor.md +2 -2
- package/docs/help/agent-architecture.md +9 -8
- package/docs/help/agent-report-contract.md +6 -4
- package/docs/help/completion-and-done.md +10 -5
- package/docs/help/human-report-contract.md +23 -20
- package/docs/help/knowledge-graph.md +2 -2
- package/docs/help/lifecycle-and-savepoints.md +9 -5
- package/docs/help/locks-and-worktrees.md +4 -3
- package/docs/help/maintenance-and-revisions.md +2 -2
- package/docs/help/roadmaps.md +13 -9
- package/docs/help/track-1-guided.md +48 -30
- package/docs/help/track-2-auto.md +35 -10
- package/docs/help/track-3-projects-and-roadmaps.md +10 -7
- package/docs/help/tutorial.md +421 -0
- package/package.json +1 -1
- package/scripts/end-intent +88 -44
- package/scripts/lib/cli/commands/intent_end.rb +1 -1
- package/scripts/lib/revisions_writer.rb +1 -2
- package/skills/_decision-tables.md +3 -3
package/PLASTIC.md
CHANGED
|
@@ -11,7 +11,8 @@ Every command ends with two lines. The `next:` line names the command to run
|
|
|
11
11
|
now, and you run it unless the person asks for something else. The `because:`
|
|
12
12
|
line gives the rule that chose it.
|
|
13
13
|
|
|
14
|
-
Add `--json` to any command
|
|
14
|
+
Add `--json` to any command except the installer commands (`install`, `update`,
|
|
15
|
+
`uninstall`, `rollback`) and `plastic hook` to get the same result as data.
|
|
15
16
|
|
|
16
17
|
Exit codes: 0 succeeded, 1 failed, 2 called wrongly, 3 refused. Exit code 3
|
|
17
18
|
means the step belongs to the owner. Report what was refused and stop. Never
|
package/README.md
CHANGED
|
@@ -40,18 +40,20 @@ Plastic keeps the shape of the work fixed and leaves the thinking to you and you
|
|
|
40
40
|
| You want to | What Plastic does |
|
|
41
41
|
|-------------|-------------------|
|
|
42
42
|
| Start from a rough idea | Creates one intent directory with an id, a slug and a born-complete intent file |
|
|
43
|
-
| Keep the reasons |
|
|
44
|
-
| Plan the work | Holds the plan as a graph of nodes, and names the next
|
|
43
|
+
| Keep the reasons | Appends each ruling to the Insights section of the intent file |
|
|
44
|
+
| Plan the work | Holds the plan as a checklist or as a graph of nodes, and names the next step |
|
|
45
45
|
| Resume tomorrow | Prints where a project stands and the next action in one line |
|
|
46
46
|
| Hand work to an agent team | Arms a delivery lock, briefs each role and reports the result |
|
|
47
|
-
| Close the work |
|
|
47
|
+
| Close the work | Checks the merge and the records, fills placeholder records, and moves the intent to Completed or Abandoned |
|
|
48
48
|
| Find an old decision | Searches every store, ranked, with one excerpt for each match |
|
|
49
49
|
| Run many projects | Keeps one store for each project, plus a global store, all in plain Markdown and Git |
|
|
50
50
|
| Steer a long delivery | Reads a roadmap as a graph and names the entry most worth continuing |
|
|
51
|
-
| Protect the record | Writes one archive of the three databases
|
|
51
|
+
| Protect the record | Writes one archive of the three databases, as of the last `plastic sync`, with `config.yml`, `projects.yml`, and `INDEX.md` |
|
|
52
52
|
|
|
53
53
|
Every result ends with a `next:` line and a `because:` line. The `--json` option prints the
|
|
54
|
-
same result as data with stable keys.
|
|
54
|
+
same result as data with stable keys. Every command takes it except the installer commands
|
|
55
|
+
(`install`, `update`, `uninstall`, `rollback`) and `plastic hook EVENT`, which runs a hook
|
|
56
|
+
script for the harness.
|
|
55
57
|
|
|
56
58
|
## How the record is built
|
|
57
59
|
|
|
@@ -88,9 +90,10 @@ mkdir -p ~/.local/bin
|
|
|
88
90
|
ln -sf ~/.plastic/bin/plastic ~/.local/bin/plastic
|
|
89
91
|
```
|
|
90
92
|
|
|
91
|
-
###
|
|
93
|
+
### Other channels
|
|
92
94
|
|
|
93
|
-
Plastic 2.0
|
|
95
|
+
The stable channel carries Plastic 2.0. To install the alpha or beta channel, name it as the
|
|
96
|
+
package version:
|
|
94
97
|
|
|
95
98
|
```bash
|
|
96
99
|
npx -y @zalom/plastic@alpha install --claude
|
|
@@ -110,9 +113,9 @@ channel is stable; `PLASTIC_CHANNEL` picks another:
|
|
|
110
113
|
curl -fsSL https://raw.githubusercontent.com/zalom/plastic/main/install.sh | PLASTIC_CHANNEL=alpha sh
|
|
111
114
|
```
|
|
112
115
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
Every release that the publish workflow creates carries the archive, stable ones included. To
|
|
117
|
+
move an installed Plastic to another channel later, run `plastic update --beta` or
|
|
118
|
+
`plastic update --alpha`.
|
|
116
119
|
|
|
117
120
|
### A clean Mac
|
|
118
121
|
|
|
@@ -134,9 +137,9 @@ plastic doctor # Checks the install and the stores
|
|
|
134
137
|
|
|
135
138
|
```bash
|
|
136
139
|
# 1. Install for your agent
|
|
137
|
-
npx -y @zalom/plastic
|
|
138
|
-
npx -y @zalom/plastic
|
|
139
|
-
npx -y @zalom/plastic
|
|
140
|
+
npx -y @zalom/plastic install --claude # Claude Code
|
|
141
|
+
npx -y @zalom/plastic install --codex # Codex CLI
|
|
142
|
+
npx -y @zalom/plastic install --all # Every supported agent
|
|
140
143
|
|
|
141
144
|
# 2. See what is open
|
|
142
145
|
plastic status
|
|
@@ -154,12 +157,12 @@ Restart your agent after the install. For the full path, read
|
|
|
154
157
|
## How it works
|
|
155
158
|
|
|
156
159
|
```
|
|
157
|
-
You or your agent
|
|
158
|
-
-----------------
|
|
159
|
-
plastic intent new "..."
|
|
160
|
-
plastic intent rule 12
|
|
161
|
-
plastic intent step 12
|
|
162
|
-
plastic intent end 12
|
|
160
|
+
You or your agent plastic ~/.plastic/stores/SLUG/store
|
|
161
|
+
----------------- ------- ----------------------------
|
|
162
|
+
plastic intent new "..." --> creates the intent --> 12--slug/12--slug.md
|
|
163
|
+
plastic intent rule 12 --> records a ruling --> Insights in 12--slug/12--slug.md
|
|
164
|
+
plastic intent step 12 --> names the next step --> checklist.md, or graph.md and nodes/
|
|
165
|
+
plastic intent end 12 --> closes the intent --> outcome.md, INDEX.md
|
|
163
166
|
|
|
164
167
|
^ |
|
|
165
168
|
| next: one command because: one reason |
|
|
@@ -193,7 +196,7 @@ plastic intent show 12 # Print the state screen
|
|
|
193
196
|
plastic intent spec 12 # State screen, then the speccing rules
|
|
194
197
|
plastic intent rule 12 "TEXT" # Record a ruling in Insights
|
|
195
198
|
plastic intent note 12 "TEXT" # Append a savepoint note
|
|
196
|
-
plastic intent step 12 #
|
|
199
|
+
plastic intent step 12 # Name the next checklist item, or run the next graph step
|
|
197
200
|
plastic intent answer 12 --node n3 --decision "TEXT" # Answer a node that needs a decision
|
|
198
201
|
plastic intent verify 12 # Run the merge-gate checks
|
|
199
202
|
plastic intent end 12 --delivered --summary "TEXT" # Close as delivered
|
|
@@ -257,7 +260,7 @@ plastic render FILE # Print one Markdown file as an HTML page
|
|
|
257
260
|
### Product
|
|
258
261
|
```bash
|
|
259
262
|
plastic install --claude # Install into Claude Code
|
|
260
|
-
plastic install --reinstall --claude # Repair an install
|
|
263
|
+
npx -y @zalom/plastic install --reinstall --claude # Repair an install
|
|
261
264
|
plastic update # Next version on the current channel
|
|
262
265
|
plastic update --alpha # Move to the alpha channel
|
|
263
266
|
plastic rollback # List the versions this machine has run
|
|
@@ -282,10 +285,10 @@ plastic feedback "TITLE" < report.md # Save a problem report and print a link t
|
|
|
282
285
|
```bash
|
|
283
286
|
--json # Print the result as data with stable keys
|
|
284
287
|
-h, --help # Print the usage line of the command
|
|
285
|
-
--project SLUG #
|
|
288
|
+
--project SLUG # Name a project other than the one the working directory is in
|
|
286
289
|
```
|
|
287
290
|
|
|
288
|
-
The installer commands do not take `--json`. `plastic doctor` does, and prints its full
|
|
291
|
+
The installer commands and `plastic hook EVENT` do not take `--json`. `plastic doctor` does, and prints its full
|
|
289
292
|
report as the document.
|
|
290
293
|
|
|
291
294
|
## Examples
|
|
@@ -306,15 +309,15 @@ because: the working directory is inside shop
|
|
|
306
309
|
$ plastic next
|
|
307
310
|
next work 9 in Batch 2: checkout flow
|
|
308
311
|
|
|
309
|
-
next:
|
|
310
|
-
because: 9 is first
|
|
312
|
+
next: plastic intent show 9 --project shop
|
|
313
|
+
because: 9 is the first active intent in shop
|
|
311
314
|
```
|
|
312
315
|
|
|
313
316
|
**The installed version:**
|
|
314
317
|
```
|
|
315
318
|
$ plastic version
|
|
316
|
-
version 2.0.
|
|
317
|
-
source ~/.
|
|
319
|
+
version 2.0.2
|
|
320
|
+
source ~/.plastic/VERSION
|
|
318
321
|
|
|
319
322
|
next: plastic status
|
|
320
323
|
because: the command line works, so read the work next
|
|
@@ -331,7 +334,7 @@ loads the conventions and prints the open items of the day. Each hook calls one
|
|
|
331
334
|
plastic hook EVENT # The agent calls this, not you
|
|
332
335
|
```
|
|
333
336
|
|
|
334
|
-
Run `plastic install --reinstall --claude` when hooks do not fire.
|
|
337
|
+
Run `npx -y @zalom/plastic install --reinstall --claude` when hooks do not fire.
|
|
335
338
|
|
|
336
339
|
## Supported AI tools
|
|
337
340
|
|
|
@@ -352,7 +355,6 @@ agents for work, verification and research, and two advisors for hard decisions.
|
|
|
352
355
|
`~/.plastic/config.yml`:
|
|
353
356
|
|
|
354
357
|
```yaml
|
|
355
|
-
project_roots: ~/.plastic/projects # Where Plastic looks for projects
|
|
356
358
|
stale_threshold_days: 3 # Age at which a future intent is shown for triage
|
|
357
359
|
context_offer_tokens: 150000 # Context size at which the agent offers to compact
|
|
358
360
|
context_insist_tokens: 250000 # Context size at which the agent insists
|
|
@@ -361,6 +363,10 @@ agent:
|
|
|
361
363
|
parallel_mode: agent-teams # agent-teams or linear
|
|
362
364
|
```
|
|
363
365
|
|
|
366
|
+
The installer writes these keys and a few more. It does not write `project_roots`, the list of
|
|
367
|
+
parent folders searched for this session's delivery locks. Without it, Plastic searches
|
|
368
|
+
`~/.plastic/projects` and `~/.plastic/stores`.
|
|
369
|
+
|
|
364
370
|
Install-time choices:
|
|
365
371
|
|
|
366
372
|
```bash
|
|
@@ -383,14 +389,15 @@ Your stores under `~/.plastic` stay.
|
|
|
383
389
|
|
|
384
390
|
Plastic 2.0 moves from prose skills to one command with direct results.
|
|
385
391
|
|
|
386
|
-
- **One `plastic` command.** More than 40 commands replace the
|
|
387
|
-
- **Direct results.** Every command ends with `next:` and `because
|
|
392
|
+
- **One `plastic` command.** More than 40 commands replace the former workflow skills, which no longer ship.
|
|
393
|
+
- **Direct results.** Every command ends with `next:` and `because:`. Every command except the
|
|
394
|
+
installer commands and `plastic hook` takes `--json`.
|
|
388
395
|
- **Plans are graphs.** An intent holds nodes and edges, and a ready set names what runs next.
|
|
389
396
|
- **A ledger with refusals.** Node transitions are appended to `savepoint.md`, and an invalid transition is refused.
|
|
390
|
-
- **Generated outcomes.** `outcome.md`
|
|
397
|
+
- **Generated outcomes.** When a graph intent closes with `outcome.md` still a placeholder, the close builds it from the graph, the nodes and the ledger. An `outcome.md` you wrote is kept.
|
|
391
398
|
- **Roadmaps are graphs too.** `plastic roadmap check` finds cycles and dangling ids.
|
|
392
399
|
- **Search without a service.** One SQLite file holds a full-text index of every store.
|
|
393
|
-
- **Three databases.** `
|
|
400
|
+
- **Three databases.** The Markdown files stay the record that commands write and read. `plastic sync` reads changed files into `knowledge_graph.db`, writes changed rows back out, refuses when both changed, and rebuilds `work_graph.db` and `references.db`. `plastic checkout` restores missing files from the databases and never overwrites a changed file.
|
|
394
401
|
- **Backup and migrate.** One archive command, and a store move that runs behind a full copy of the home.
|
|
395
402
|
- **Two advisors, medium effort by default.** Summon the Primary Advisor or the Secondary Advisor on purpose.
|
|
396
403
|
- **Codex CLI as a second agent.** The same install, with OpenAI model ids for each role.
|
|
@@ -38,10 +38,11 @@ deliberately; the auto pipeline never dispatches them.
|
|
|
38
38
|
builds, then drives the full suite green; you verify tick-versus-diff at the
|
|
39
39
|
post-execution review and again before the merge. A mismatch is a review finding, not a
|
|
40
40
|
cleanup you perform silently.
|
|
41
|
-
5. **Review by risk** - dispatch the post-execution reviewer only when
|
|
42
|
-
|
|
43
|
-
6. **Close** -
|
|
44
|
-
|
|
41
|
+
5. **Review by risk** - dispatch the post-execution reviewer only when a review rule that
|
|
42
|
+
`plastic auto report ID` prints fires; otherwise the green suite is the review.
|
|
43
|
+
6. **Close** - merge the code branch first (Plastic never merges; a delivered close refuses
|
|
44
|
+
unmerged code), then `outcome.md`, then `plastic intent end ID --delivered --summary
|
|
45
|
+
"TEXT"`, which releases the worktree and clears the lock. It does not reindex QMD.
|
|
45
46
|
|
|
46
47
|
**Dispatch-time model contract.** Each pinned agent carries its `model:` in frontmatter, and
|
|
47
48
|
Claude Code reads it at dispatch. Because read-at-dispatch is a harness implementation detail
|
|
@@ -55,8 +56,9 @@ dispatch call's model parameter, alongside the spawn-preamble live-state injecti
|
|
|
55
56
|
1. Take the intent; record the rulings in `## Context` + `### Decisions`; write `spec.md`.
|
|
56
57
|
2. Write `plan.md`, the action files with their matrix, and `checklist.md`; dispatch the plan
|
|
57
58
|
reviewer; merge the review findings.
|
|
58
|
-
3. Dispatch the executor through
|
|
59
|
-
pasted in
|
|
59
|
+
3. Dispatch the executor through your harness's agent dispatch with the whole consolidated
|
|
60
|
+
action pasted in (on a graph intent, `plastic intent step ID` prints the spawn block; on a
|
|
61
|
+
checklist intent it prints the next item and dispatches nothing); require the red commit before the code and a green suite after it. Sequential,
|
|
60
62
|
one team per intent, on one branch when files are shared.
|
|
61
63
|
4. Apply the risk rule; when it fires, dispatch the reviewer and re-dispatch the executor for
|
|
62
64
|
the fixes.
|
|
@@ -73,10 +75,10 @@ you consume that report to write the human briefing, and the two never merge.
|
|
|
73
75
|
|
|
74
76
|
## Constraints
|
|
75
77
|
|
|
76
|
-
-
|
|
77
|
-
one delivery in one place, not fences. Verify state from the files (`plastic
|
|
78
|
+
- No hook blocks a write based on lock ownership or stage in 2.0: the lock, the worktree, and the record are how the team keeps
|
|
79
|
+
one delivery in one place, not fences. Verify state from the files (`plastic auto lock status ID`,
|
|
78
80
|
`savepoint.md`, the diff), never from a hook you assume fired.
|
|
79
81
|
- The plan reviewer and the post-execution reviewer are fresh agents, never you and never the
|
|
80
82
|
executor.
|
|
81
|
-
-
|
|
82
|
-
dispatch, walk the five steps yourself and say so in `## Insights`.
|
|
83
|
+
- On a graph intent, dispatch through `plastic intent step`, Plastic's own engine. On a harness
|
|
84
|
+
with no agent dispatch, walk the five steps yourself and say so in `## Insights`.
|
|
@@ -24,7 +24,8 @@ valid lifecycle artifacts. Honor it as your live state; do not re-derive or cont
|
|
|
24
24
|
3. **Tick with the commit** - commit after each logical unit of work, and in the same step
|
|
25
25
|
tick the checklist item that unit lands: mark its box `[x]` and move the line to
|
|
26
26
|
`## Completed`, then append the savepoint `Commit` line
|
|
27
|
-
(`scripts/savepoint-note <intent_dir> --kind Commit --text "<sha> <what it proves>"
|
|
27
|
+
(`scripts/savepoint-note <intent_dir> --kind Commit --text "<sha> <what it proves>"`, or its
|
|
28
|
+
public wrapper `plastic intent note ID "<sha> <what it proves>" --kind Commit`). A
|
|
28
29
|
commit without its tick is incomplete.
|
|
29
30
|
4. **Record insights** - capture durable discoveries and report them in the `insights:` field;
|
|
30
31
|
persist each to `## Insights` via the `insight-append` helper
|
|
@@ -51,5 +51,5 @@ winner before answering; spend care where reversal is expensive; always end with
|
|
|
51
51
|
kill criteria, the observation that means the caller should abandon this plan and
|
|
52
52
|
return. No shape stated: answer as one bounded decision and say so.
|
|
53
53
|
|
|
54
|
-
Plain language, no em-dashes. The full protocol you serve
|
|
55
|
-
|
|
54
|
+
Plain language, no em-dashes. The full protocol you serve is the help chapter
|
|
55
|
+
that `plastic help advisor-protocol` prints.
|
|
@@ -53,8 +53,8 @@ winner before answering; spend care where reversal is expensive; always end with
|
|
|
53
53
|
kill criteria, the observation that means the caller should abandon this plan and
|
|
54
54
|
return. No shape stated: answer as one bounded decision and say so.
|
|
55
55
|
|
|
56
|
-
Plain language, no em-dashes. The full protocol you serve
|
|
57
|
-
|
|
56
|
+
Plain language, no em-dashes. The full protocol you serve is the help chapter
|
|
57
|
+
that `plastic help advisor-protocol` prints.
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
@@ -28,10 +28,11 @@ in 2.0, intent 304; the lead writes the Why and How record itself):
|
|
|
28
28
|
reviewed before code; dispatches the executor; applies the risk rule; closes.
|
|
29
29
|
- **plastic-executor** (Exec): commits the matrix's tests red, writes the code, checks off
|
|
30
30
|
`checklist.md`, appends `## Insights`, and drives the suite green.
|
|
31
|
-
- **the plan reviewer**: a fresh agent on the
|
|
32
|
-
|
|
33
|
-
- **the post-execution reviewer**: a fresh agent on
|
|
34
|
-
dispatched only when
|
|
31
|
+
- **the plan reviewer**: a fresh agent on the prompt that `plastic help plan-reviewer-prompt`
|
|
32
|
+
prints, an optional dispatch before any code exists.
|
|
33
|
+
- **the post-execution reviewer**: a fresh agent on the prompt that
|
|
34
|
+
`plastic help code-quality-reviewer-prompt` prints, dispatched only when a review rule from
|
|
35
|
+
`plastic auto report ID` fires; never the maker.
|
|
35
36
|
|
|
36
37
|
One agent boot (the executor) is the minimum delivery; the plan reviewer is a second,
|
|
37
38
|
optional boot when the lead calls for review before code, and the post-execution reviewer is
|
|
@@ -99,21 +100,21 @@ worktree, and the record are how the team keeps one delivery in one place.
|
|
|
99
100
|
### The risk list
|
|
100
101
|
|
|
101
102
|
The post-execution reviewer runs when the executor's diff touches any of these paths, or when
|
|
102
|
-
|
|
103
|
+
one of the other two review rules that `plastic auto report ID` prints fires:
|
|
103
104
|
|
|
104
105
|
- `hooks/`, `scripts/hook-*`, `scripts/lib/hook_registry.rb`
|
|
105
106
|
- `scripts/lib/lock.rb`, `scripts/lib/arm.rb`, `scripts/plastic-lock`, `scripts/end-intent`
|
|
106
107
|
- `scripts/lib/installer_core.rb`, `scripts/install*`, `scripts/update.rb`
|
|
107
108
|
- `package.json`, `.claude-plugin/*.json`, `CHANGELOG.md`
|
|
108
109
|
|
|
109
|
-
Grow this list here
|
|
110
|
+
Grow this list here and in the `REVIEW_RULES` text of `plastic auto report`.
|
|
110
111
|
|
|
111
112
|
### Headless Note
|
|
112
113
|
|
|
113
114
|
In a headless or background run the session id may be unset. `plastic-lock arm` then keys the
|
|
114
115
|
lock by a derived session key, the record hook still writes the savepoint ledger from the
|
|
115
|
-
written path, and the lead verifies state from the files (`plastic
|
|
116
|
-
`savepoint.md`, the diff) rather than from a hook it assumes fired.
|
|
116
|
+
written path, and the lead verifies state from the files (`plastic auto lock status ID`,
|
|
117
|
+
which wraps `plastic-lock status`, `savepoint.md`, the diff) rather than from a hook it assumes fired.
|
|
117
118
|
|
|
118
119
|
### Delegation
|
|
119
120
|
|
|
@@ -47,15 +47,17 @@ Every role report, whatever the stage, carries these fields:
|
|
|
47
47
|
|
|
48
48
|
## Per-role payload
|
|
49
49
|
|
|
50
|
-
Multi-item payload fields (ordered actions, insights, checklist deltas) default to tables
|
|
51
|
-
|
|
50
|
+
Multi-item payload fields (ordered actions, insights, checklist deltas) default to tables;
|
|
51
|
+
single fields stay prose.
|
|
52
52
|
|
|
53
53
|
Each role appends a payload that fulfils its place in the What, Why, How, Exec cycle (decision
|
|
54
54
|
D2). The payload is what makes the report useful to the orchestrator beyond the envelope.
|
|
55
55
|
|
|
56
56
|
The stage-agent role sections (brainstorming, spec-specialist, planner) were removed in 2.0
|
|
57
57
|
(intent 304): the orchestrator writes the Why and How artifacts itself and reports nothing to
|
|
58
|
-
itself.
|
|
58
|
+
itself. The lead dispatches three roles: the plan reviewer, the executor, and the
|
|
59
|
+
post-execution reviewer. The plan reviewer returns the shape in `plastic help
|
|
60
|
+
plan-reviewer-prompt`; the other two carry the payloads below.
|
|
59
61
|
|
|
60
62
|
### executor (Exec)
|
|
61
63
|
- Actions implemented this turn, mapped to checklist items checked off (checked / total).
|
|
@@ -64,7 +66,7 @@ itself. Two dispatched roles remain.
|
|
|
64
66
|
- Insights reported in the `insights:` field (each with the `(autonomous)` marker); the
|
|
65
67
|
executor or the orchestrator persists them to `## Insights` via the `insight-append` helper.
|
|
66
68
|
|
|
67
|
-
###
|
|
69
|
+
### post-execution reviewer
|
|
68
70
|
- Verdict: `pass` or `blockers found`.
|
|
69
71
|
- Each acceptance criterion checked, with the evidence that confirms or refutes it.
|
|
70
72
|
- Gaps or risks found, ranked, with a recommended disposition.
|
|
@@ -18,21 +18,26 @@ header. The delivered path authors it with the result; the abandoned path author
|
|
|
18
18
|
the abandonment reason and no longer leaves the scaffolded placeholder sentinel in place.
|
|
19
19
|
|
|
20
20
|
The canonical End tail runs in this order: `outcome.md -> INDEX terminal -> the terminal
|
|
21
|
-
savepoint line -> commit -> disarm (Worktree.release -> Lock.release)
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
savepoint line -> commit -> disarm (Worktree.release -> Lock.release)`. `plastic intent end`
|
|
22
|
+
runs all of it through `scripts/end-intent`. The close does not reindex QMD: no public close
|
|
23
|
+
path calls `qmd-sync`, so the QMD index catches up only when you run `qmd-sync` yourself.
|
|
24
24
|
|
|
25
25
|
`scripts/end-intent` never merges code. Before a delivered close writes anything, it checks
|
|
26
26
|
that the intent's code is already merged into the current branch of the repo checkout. It
|
|
27
27
|
checks the commit the code worktree is on, even when that worktree is on a renamed branch or
|
|
28
28
|
a detached HEAD, and it checks the code branch after the worktree is gone. The repo checkout
|
|
29
29
|
must be on the branch you release from, not detached and not on the code branch. If the code
|
|
30
|
-
isn't merged, or Git can't tell, the
|
|
31
|
-
lock, and the worktree all stay as they were.
|
|
30
|
+
isn't merged, or Git can't tell, the script exits 9 and changes nothing: INDEX, the savepoint, the
|
|
31
|
+
lock, and the worktree all stay as they were. `plastic intent end` reports that refusal as exit 1
|
|
32
|
+
with a named message. `--dry-run` refuses the same way. The refusal
|
|
32
33
|
names the merge to run, for example `git -C <repo> merge plastic/<id>--<slug>`. Run that
|
|
33
34
|
ordinary merge, or release the work through your usual process, and then run the close
|
|
34
35
|
again. An abandoned close and an intent with no code repository skip this check.
|
|
35
36
|
|
|
37
|
+
A delivered close also refuses, as exit 1, an untouched scaffold (script exit 8) and a hollow
|
|
38
|
+
report whose `## Delivered` rows do not match the action files (script exit 7). A live foreign
|
|
39
|
+
lock is script exit 4, which `plastic intent end` reports as exit 3.
|
|
40
|
+
|
|
36
41
|
`scripts/end-intent` performs this order's disarm step (verify the code worktree is clean,
|
|
37
42
|
then remove the worktree, then clear the lock) as its own step 5, mechanically, since
|
|
38
43
|
intent 188: a session no longer needs a separate one-liner for it, and the script's own
|
|
@@ -25,29 +25,31 @@ written by eye:
|
|
|
25
25
|
Active, In delivery, Delivered, Roadmap, Sessions, Changed, then the Where-we-are and
|
|
26
26
|
Where-we-go-next tables. A separate script from the other four (`dashboard.rb`, not
|
|
27
27
|
`report-screen`), since it aggregates across a whole store or project rather than one
|
|
28
|
-
intent
|
|
28
|
+
intent. It is not a delivery trigger. When a prompt is the single word `continue`, the
|
|
29
|
+
capture hook runs `dashboard.rb continue` and adds its board to the agent's context; the
|
|
30
|
+
`plastic continue` command prints its own rows and no screen.
|
|
29
31
|
|
|
30
32
|
## Binding table (intent 331f)
|
|
31
33
|
|
|
32
34
|
Every command or lead role that shows state names its own report verb, one row per binding
|
|
33
|
-
and trigger.
|
|
34
|
-
|
|
35
|
+
and trigger. The commands run their verb themselves; the lead and the agent run theirs. Each
|
|
36
|
+
one carries the SAME rule next to its verb: print the screen as the first characters of the
|
|
37
|
+
reply, nothing before it, no fence, or the hook cannot paint it.
|
|
35
38
|
|
|
36
39
|
| Command or lead | Trigger | Verb |
|
|
37
40
|
|---|---|---|
|
|
38
|
-
| `plastic
|
|
39
|
-
| `plastic
|
|
40
|
-
| `plastic
|
|
41
|
-
| `plastic
|
|
42
|
-
| `plastic continue` |
|
|
41
|
+
| `plastic intent show` | any invocation | `report-screen state` |
|
|
42
|
+
| `plastic intent spec` | any invocation | `report-screen state`, then the speccing rules |
|
|
43
|
+
| `plastic roadmap show` | any invocation | `report-screen roadmap ... state` |
|
|
44
|
+
| `plastic status` | any invocation | in-process (`Scope#stores`) |
|
|
45
|
+
| `plastic continue` | any invocation | in-process rows: project, root, active, roadmap |
|
|
43
46
|
| the auto team's lead | the How boundary, before the executor | `report-screen plan` |
|
|
44
47
|
| the auto team's lead | each of the five triggers | `report-screen state` |
|
|
45
48
|
| the auto team's lead | close | `report-screen delivered` |
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
| `plastic intent step` | after the red commit, and after the suite | `report-screen state` |
|
|
49
|
+
| the agent | "where are we" (an unnamed status ask) | `report-screen session` |
|
|
50
|
+
| the agent | "why so long" | `report-screen delay` |
|
|
51
|
+
|
|
52
|
+
`plastic intent end` and `plastic intent step` print no screen of their own.
|
|
51
53
|
|
|
52
54
|
## A roadmap's own three reports (intent 331c)
|
|
53
55
|
|
|
@@ -87,8 +89,8 @@ delivery took long.
|
|
|
87
89
|
|
|
88
90
|
Every verb prints the same plain Markdown on every harness (owner ruling 2026-08-31); where a
|
|
89
91
|
harness can paint it (Claude Code, through 316a's message-display hook), it substitutes a
|
|
90
|
-
painted rendering of that same output, never a different one, and no
|
|
91
|
-
|
|
92
|
+
painted rendering of that same output, never a different one, and no script branches on
|
|
93
|
+
harness name to decide.
|
|
92
94
|
|
|
93
95
|
## Depth for small work
|
|
94
96
|
|
|
@@ -101,15 +103,16 @@ A delivery still ends with `outcome.md` plus one `delivered` screen.
|
|
|
101
103
|
## One report per audience
|
|
102
104
|
|
|
103
105
|
A delivery produces exactly two artifacts: `outcome.md` (generated by `scripts/end-intent`
|
|
104
|
-
from `graph.md`, `nodes/`, and the ledger when the intent has one, intent 339;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
from `graph.md`, `nodes/`, and the ledger when the intent has one, intent 339; written by the
|
|
107
|
+
agent before the close otherwise, and backfilled from the record by `plastic intent end` when
|
|
108
|
+
it is still missing or a placeholder) and one `delivered` screen at the End stage. No stage
|
|
109
|
+
restates a delivery already written to `outcome.md`; point at it instead. A reply does not
|
|
110
|
+
open with a banner that restates the intent id and name the owner just typed. Announce only what the reader
|
|
108
111
|
cannot already know: an error, a result, a choice with its reason, or a handoff.
|
|
109
112
|
|
|
110
113
|
## Boundary vs intent 74
|
|
111
114
|
|
|
112
|
-
Intent 74's report contract (`
|
|
115
|
+
Intent 74's report contract (`plastic help agent-report-contract`) is the INTERNAL,
|
|
113
116
|
machine-checked handoff from a dispatched specialist back to the orchestrator: a structured
|
|
114
117
|
envelope plus a per-role payload. This contract is the OUTWARD screen shown to the owner.
|
|
115
118
|
Different direction, different audience, different form. The orchestrator reads the intent 74
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Knowledge Graph
|
|
2
2
|
|
|
3
|
-
This chapter holds the linking
|
|
3
|
+
This chapter holds the linking rules for an intent's frontmatter and the branch-versus-root rule for intent ids.
|
|
4
4
|
|
|
5
5
|
- `sources` (formative, must-load, acyclic) and `chain` (forward + relational, lighter,
|
|
6
6
|
may cycle) form the directed knowledge graph. Reciprocity is one-directional: every
|
|
@@ -18,7 +18,7 @@ This chapter holds the linking doctrine from Frontmatter and the branch-vs-root
|
|
|
18
18
|
It equals the projection of `sources` (first) then `chain`. Never hand-write or hand-edit a
|
|
19
19
|
`## Links` line, and never auto-delete one. The edge lives in the frontmatter graph; the
|
|
20
20
|
section is regenerated from it (doctor `graph_links_projection` enforces this identity). To
|
|
21
|
-
add a link, add the frontmatter edge, then reproject.
|
|
21
|
+
add a link, add the frontmatter edge, then run `plastic project links` to reproject.
|
|
22
22
|
|
|
23
23
|
- Links are decided by CONTEXT INFLUENCE, not by shared files, shared symbols, or a topic
|
|
24
24
|
similarity score. The question is whether one intent's context actually informed another.
|
|
@@ -16,8 +16,10 @@ happened:
|
|
|
16
16
|
- the commits on the intent's branch.
|
|
17
17
|
|
|
18
18
|
The four judgment documents (spec.md, plan.md, actions/, outcome.md) are written when
|
|
19
|
-
there is something to say. In thinking mode an agent writes them during Why and How
|
|
20
|
-
|
|
19
|
+
there is something to say. In thinking mode an agent writes them during Why and How; the
|
|
20
|
+
`plastic intent` Next row asks for `spec.md`, then `plan.md` and `checklist.md`, before it
|
|
21
|
+
points at execution. In direct mode they usually stay as the scaffold placeholder until the
|
|
22
|
+
close, and
|
|
21
23
|
`scripts/end-intent` then backfills each one still missing or still a placeholder from
|
|
22
24
|
the live record (intent 308): `## Problem` from `## Intent`, `## Decisions` from
|
|
23
25
|
`### Decisions`, `## Acceptance Criteria`, `## Steps`, `## Items`, `## Delivered`, and
|
|
@@ -32,7 +34,7 @@ for the doctor fix hint `backfilled_complete`.
|
|
|
32
34
|
The close never refuses for a document it can write itself. Doctor's per-intent structure
|
|
33
35
|
check runs after the backfill as a report: an unchecked box, a malformed intent file, or
|
|
34
36
|
a wrong-disposition outcome.md is named on stderr, the close proceeds, and
|
|
35
|
-
|
|
37
|
+
`plastic intent verify <id>` keeps reporting it until fixed.
|
|
36
38
|
|
|
37
39
|
## Insights from a writer that cannot write the file
|
|
38
40
|
|
|
@@ -41,5 +43,7 @@ each nugget home in the completion report's `insights:` field, and the orchestra
|
|
|
41
43
|
agent that can write the file) persists it via the helper. A session that cannot write the
|
|
42
44
|
intent file still returns its report, so the insight survives.
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
The stages map to commands: What is `plastic intent new`, Why is `plastic intent spec` and
|
|
47
|
+
`plastic intent rule`, How is the spec, plan and checklist (or `graph.md`) the agent writes,
|
|
48
|
+
and Exec is `plastic intent step`, `plastic intent verify` and `plastic intent end`.
|
|
49
|
+
`plastic help tutorial` walks all of them once.
|
|
@@ -31,7 +31,8 @@ delivery, delegate registration authorizes a child session, and a claim selects
|
|
|
31
31
|
writer for one artifact. Disarm clears the lock; the End tail is ordered: verify, merge and
|
|
32
32
|
remove worktrees, then clear the lock. Repair
|
|
33
33
|
is one idempotent function with two entry points: the `plastic-lock` command (`who`, status,
|
|
34
|
-
fix, release, reclaim, delegate) and the `plastic
|
|
34
|
+
fix, release, reclaim, delegate) and the public `plastic auto lock status|fix|release ID`
|
|
35
|
+
commands that wrap it, so repair
|
|
35
36
|
self-heals. `who` is read-only and reports the controller, mtime heartbeat, delegates, and
|
|
36
37
|
claims from durable files. This is mandatory for auto teams, not a convention.
|
|
37
38
|
|
|
@@ -94,12 +95,12 @@ what gets written down.
|
|
|
94
95
|
|
|
95
96
|
| Station | Delivered artifact | Lock steps | Record |
|
|
96
97
|
|---|---|---|---|
|
|
97
|
-
| Start (board) | none (a procedure, not a stage) | `plastic-lock fix` self-heals stale, corrupt, or legacy state; arm acquires `delivery.lock` (O_EXCL, session-keyed), provisions the code worktree | savepoint confirms the boarding station |
|
|
98
|
+
| Start (board) | none (a procedure, not a stage) | `plastic-lock fix` self-heals stale, corrupt, or legacy state; arm (`plastic auto take ID`, the only public entry) acquires `delivery.lock` (O_EXCL, session-keyed), provisions the code worktree | savepoint confirms the boarding station |
|
|
98
99
|
| What (create) | `<id>--<slug>.md`, born complete | no lock yet; `new-intent` validates the file it writes (`scripts/validate-intent`) | savepoint `What` line; intent listed in INDEX `## Active` |
|
|
99
100
|
| Why | `spec.md` | owner writes refresh the lease (lock file mtime heartbeat) | savepoint `Why started`, `Why spec.md created` |
|
|
100
101
|
| How | `plan.md`, `actions/ACTION_N.md` (at least one), `checklist.md` | heartbeat on writes | savepoint `How started`, `How plan.md created`, `How checklist.md created`, `Exec started` |
|
|
101
102
|
| Exec | code on the intent branch, checklist checked off | heartbeat; code edits confined to the provisioned worktree; delegates write under the owner's lock | checklist boxes; savepoint milestones; the day-ledger line promotes when a project file lands |
|
|
102
|
-
| End (done) | mandatory `outcome.md` (`disposition: delivered\|abandoned`), INDEX moves to Completed or Abandoned | ordered End tail: verify
|
|
103
|
+
| End (done) | mandatory `outcome.md` (`disposition: delivered\|abandoned`), INDEX moves to Completed or Abandoned | ordered End tail: verify the code is merged (Plastic never merges it), remove the worktree, disarm clears `delivery.lock`; no QMD reindex runs; `end-intent` backfills a placeholder `outcome.md` from the record and its structure check reports (never refuses) | the savepoint's terminal `delivered` (or `abandoned`) line; takeover audits, if any, remain in savepoint.md |
|
|
103
104
|
| Maintenance (Future, Terminal, or Active-with-a-stale-or-no-lock) | `revisions.md` move-and-record entries | detects (never acquires) `delivery.lock`; defers and reports while the target's lock is FRESH (`Lock.fresh?`); a stale or absent lock is not-active, maintenance proceeds | append-only, rule-tagged `revisions.md` entry written in the same operation as the change, or the change is refused; lands via a fresh branch off store main merged back as one closed op, never `git add -A` |
|
|
104
105
|
|
|
105
106
|
## The write guard is not residue
|
|
@@ -87,7 +87,7 @@ relocation holds itself to the identical rule.
|
|
|
87
87
|
|
|
88
88
|
Doctor stays a detector: core and full checks, every installed agent, both global and project
|
|
89
89
|
stores. It gains no write path of its own. The "Fix all" prompt
|
|
90
|
-
(`skills/doctor/SKILL.md`) is a ROUTER: for each fixable finding it dispatches to the tool
|
|
90
|
+
(the retired `skills/doctor/SKILL.md`; in 2.0 each `plastic doctor` finding names its own repair) is a ROUTER: for each fixable finding it dispatches to the tool
|
|
91
91
|
that already owns that class of repair (`project-links`, `rebuild-graph`,
|
|
92
92
|
`restore-intent-v1`, or the curator, via `scripts/maintenance-run` where applicable), and
|
|
93
93
|
those tools perform the mutation and write the `revisions.md` receipt - never doctor itself.
|
|
@@ -176,7 +176,7 @@ meant to catch).
|
|
|
176
176
|
(intent 274) is the one narrow exception to the "every maintenance action is recorded in
|
|
177
177
|
`revisions.md`" rule above. It populates each store's `doctor-exclusions` file (the per-store
|
|
178
178
|
record of knowingly-exempt `(intent_id, rule)` pairs `doctor`'s `savepoint_operational` check
|
|
179
|
-
honors
|
|
179
|
+
honors) by computing violations through
|
|
180
180
|
`Doctor#done_signal_findings_for_dir` directly, the same function `check_done_signals` itself
|
|
181
181
|
calls, so the registry can never disagree with the checker about what counts as a violation.
|
|
182
182
|
|
package/docs/help/roadmaps.md
CHANGED
|
@@ -7,20 +7,24 @@ This chapter holds the full roadmap file format and its relationship to INDEX.md
|
|
|
7
7
|
Roadmaps exist for planned parallel delivery of intents in a coherent and organized way. A roadmap
|
|
8
8
|
is a named, ordered, delivery-side collection of intents: the delivery-side counterpart to a
|
|
9
9
|
release (completion-side, tracked in `CHANGELOG.md`). Create one by hand from the template, then
|
|
10
|
-
use `plastic roadmap show`, `next`, `log`, and `
|
|
10
|
+
use `plastic roadmap show`, `next`, `log`, `check`, and `migrate` to read, drive, audit, and
|
|
11
|
+
upgrade it.
|
|
11
12
|
|
|
12
13
|
File location: `roadmaps/{slug}.md`, a sibling of `INDEX.md`, wherever `INDEX.md` lives, never
|
|
13
14
|
inside `store/` (store holds intent directories, not project artifacts). For a project that is its
|
|
14
15
|
root, `~/.plastic/stores/{slug}/roadmaps/`, beside `project.yml`; for the global store it is
|
|
15
16
|
`~/.plastic/stores/global/roadmaps/`, beside its `INDEX.md`. Legacy homes keep their
|
|
16
17
|
previous paths until `plastic migrate stores` moves them. `roadmaps/` lists only live (open or
|
|
17
|
-
in-flight) roadmaps: once a roadmap's goal is reached, it
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
A roadmap file has
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
in-flight) roadmaps: once a roadmap's goal is reached, move it by hand to
|
|
19
|
+
`roadmaps/archived/{slug}.md`. Its ledger and its screens still resolve it there.
|
|
20
|
+
|
|
21
|
+
A roadmap file from the template has five sections, in order: a title/meta header, `## Goal`,
|
|
22
|
+
`## Graph`, `## Batches`, and an append-only dated `## Log`.
|
|
23
|
+
`## Goal` is a checkable prose condition read by a human or agent, not an executable checker.
|
|
24
|
+
`## Graph` holds the `needs` edges between entries, and the batches are computed from them;
|
|
25
|
+
`plastic roadmap migrate` writes a Graph section for a roadmap that has none, from its current
|
|
26
|
+
batch order. `## Batches` holds ordered batches; entries inside a batch are parallel-safe,
|
|
27
|
+
batches run sequentially, top to bottom. A roadmap written before owner ruling 145
|
|
24
28
|
may instead use the legacy `## Waves` heading; the tooling accepts both, but never renames an
|
|
25
29
|
existing roadmap file to migrate it.
|
|
26
30
|
|
|
@@ -39,7 +43,7 @@ next in under a minute.
|
|
|
39
43
|
|
|
40
44
|
**Relationship to loop engineering (intent 69).** A roadmap is the planning half of the work; the
|
|
41
45
|
loop is its runtime. Batches lay out the parallelism plan: what can run together, and in what order.
|
|
42
|
-
Loop engineering (intent 69
|
|
46
|
+
Loop engineering (intent 69) is expected to consume that plan and supply the
|
|
43
47
|
running parts, the heartbeat, how many dispatches run at once, checking the goal, and resuming
|
|
44
48
|
after a stop. This section only states the relationship and points to intent 69 as the future
|
|
45
49
|
consumer; it does not change intent 69's own design.
|