@zalom/plastic 2.0.0-alpha.20 → 2.0.0-alpha.22
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 +20 -18
- package/bin/test +24 -4
- package/hooks/call-budget +4 -0
- package/hooks/hooks.json +12 -0
- package/package.json +1 -1
- package/scripts/doctor.rb +79 -4
- package/scripts/hook-call-budget +222 -0
- package/scripts/hook-session-start +307 -319
- package/scripts/insight-append +18 -4
- package/scripts/lib/compact_instructions.rb +5 -5
- package/scripts/lib/doctor_core.rb +2 -1
- package/scripts/lib/graph_edges.rb +16 -0
- package/scripts/lib/hook_registry.rb +14 -2
- package/scripts/lib/installer_core.rb +13 -5
- package/scripts/lib/meter_watch.rb +179 -0
- package/scripts/lib/node_packet.rb +27 -5
- package/scripts/lib/runner_dispatch.rb +29 -5
- package/scripts/lib/runner_policy.rb +31 -0
- package/scripts/lib/runner_proposals.rb +21 -0
- package/scripts/lib/session_usage.rb +190 -0
- package/scripts/meter-watch +57 -0
- package/scripts/read-config +3 -3
- package/scripts/runner +5 -0
- package/scripts/session-usage +56 -0
- package/scripts/skill-lint +115 -6
- package/skills/auto/SKILL.md +61 -63
- package/skills/auto/references/agent-architecture.md +10 -8
- package/skills/auto/references/human-report-contract.md +1 -1
- package/skills/conventions/references/completion-and-done.md +7 -7
- package/skills/conventions/references/locks-and-worktrees.md +3 -3
- package/skills/conventions/references/maintenance-and-revisions.md +1 -1
- package/skills/doctor/report.md +1 -1
- package/skills/intent-continuing/references/boarding-matrix.md +2 -2
- package/skills/intent-creating/SKILL.md +58 -133
- package/skills/intent-ending/SKILL.md +48 -56
- package/skills/intent-ending/evals/evals.json +1 -1
- package/skills/intent-executing/SKILL.md +39 -134
- package/skills/intent-speccing/SKILL.md +3 -0
- package/skills/releasing/SKILL.md +1 -1
- package/skills/releasing/references/release-lines.md +1 -1
- package/skills/tutorial/SKILL.md +2 -1
- package/skills/tutorial/references/track-1-guided.md +21 -40
- package/skills/tutorial/references/track-2-auto.md +2 -2
- package/templates/agents.md +2 -2
- package/templates/config.yml +3 -3
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plastic-intent-ending
|
|
3
3
|
description: >
|
|
4
|
-
Wrap, finish,
|
|
5
|
-
when completing or abandoning an intent, when a
|
|
6
|
-
|
|
4
|
+
Wrap, finish, or close an intent as delivered or abandoned. Use
|
|
5
|
+
when completing or abandoning an intent, when a graph's last node
|
|
6
|
+
reaches a terminal status (or, for a legacy intent, a checklist
|
|
7
|
+
reaches 100 percent) and Exec is finished, or when asked to "wrap
|
|
8
|
+
this up".
|
|
7
9
|
user-invocable: true
|
|
8
10
|
---
|
|
9
11
|
|
|
@@ -26,7 +28,7 @@ installed directory.
|
|
|
26
28
|
| 0 | Precondition check | You, before touching outcome.md |
|
|
27
29
|
| 1 | backfill spec/plan/action/outcome from the record, self-check, intent-file `## Outcome` summary | `scripts/end-intent` |
|
|
28
30
|
| 2 | INDEX.md terminal move (Active -> Completed/Abandoned) | `scripts/end-intent` |
|
|
29
|
-
| 3 | savepoint
|
|
31
|
+
| 3 | the terminal savepoint line | `scripts/end-intent` |
|
|
30
32
|
| 4 | store auto-commit | `scripts/end-intent` |
|
|
31
33
|
| 5 | disarm (worktree + lock) | `scripts/end-intent` (intent 188) |
|
|
32
34
|
| 6 | QMD reindex, async, LAST | You |
|
|
@@ -45,50 +47,47 @@ Nothing refuses the close any more (the 1.x write-time gate and `end-intent`'s
|
|
|
45
47
|
exit-6 structure gate were retired in 2.0, intents 302 and 308). What you leave
|
|
46
48
|
on disk is what the record becomes, so before the call:
|
|
47
49
|
|
|
48
|
-
1.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
50
|
+
1. For an intent with a `graph.md`: confirm every node's Status in `graph.md` is
|
|
51
|
+
terminal (`done` or `failed_verification`, nothing left `running`, `blocked`, or
|
|
52
|
+
waiting `needs_decision`), and that the last verify node's gates were
|
|
53
|
+
accepted. A node still open is not a refusal, it is a reported gap that lands
|
|
54
|
+
verbatim in the backfilled `## Follow-ups`.
|
|
55
|
+
For an intent with no `graph.md` (legacy): read checklist.md, tick every item as
|
|
56
|
+
it is actually performed, including an item that describes the close itself:
|
|
57
|
+
running this very procedure IS what that item describes; an unchecked box is not
|
|
58
|
+
a refusal, it is a reported gap. Also confirm every acceptance criterion in
|
|
59
|
+
spec.md is verifiable (tests pass, or the manual check described in its HOW line
|
|
60
|
+
was actually run).
|
|
61
|
+
2. Decide what you have to say. For an intent with a `graph.md`, never hand-write
|
|
62
|
+
`outcome.md`: `scripts/end-intent` GENERATES it, through
|
|
63
|
+
`scripts/lib/outcome_report.rb` (`scripts/outcome-report` is its standalone
|
|
64
|
+
CLI, useful for checking the generated text before the close). `## Delivered`,
|
|
65
|
+
`## Verification`, `## Graph diff`, and `## Findings` are read straight from
|
|
66
|
+
`graph.md`, `nodes/`, and the ledger every time, in plain wording a reader
|
|
67
|
+
recognizes, never hand-typed; when the generated wording is wrong, fix
|
|
68
|
+
`graph.md` or `nodes/`, the source it reads from, not the report. `## Summary`,
|
|
69
|
+
`## Needs you`, and `## Follow-ups`, and every frontmatter key but
|
|
70
|
+
`disposition`, are preserved byte for byte when you author them and
|
|
71
|
+
generated as plain facts otherwise. For an intent with no `graph.md`, a
|
|
72
|
+
spec.md, plan.md, action file, or outcome.md left as the scaffold placeholder
|
|
73
|
+
is written from the record by `scripts/end-intent` (the intent file's
|
|
74
|
+
`## Intent`, `### Decisions`, and `## Insights`, the checklist, the worktree
|
|
75
|
+
diff). A file you wrote, even under a still-present sentinel, is never touched.
|
|
69
76
|
|
|
70
77
|
### Step 1-5. Run `scripts/end-intent`
|
|
71
78
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
`##
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
abandonment reason and the trail (see Pivot below). An intent with a `graph.md` and no
|
|
85
|
-
hand-written outcome.md gets one generated instead (Step 0.3 above); a placeholder
|
|
86
|
-
outcome.md on an intent with no `graph.md` is backfilled from the record, with the
|
|
87
|
-
close's disposition and the `--outcome-summary` line as its summary. Also author
|
|
88
|
-
the rich INDEX entry note now (a short line in the store's existing
|
|
89
|
-
Completed/Abandoned convention: mode, what shipped or why it was
|
|
90
|
-
abandoned, suite result, merge/spawn notes); content authoring stays with
|
|
91
|
-
you, `--index-note` only appends what you write.
|
|
79
|
+
For an intent with a `graph.md`, do not author `outcome.md` by hand: run
|
|
80
|
+
`ruby ~/.plastic/scripts/outcome-report <intent_dir> --write --disposition delivered|abandoned`
|
|
81
|
+
if you want to see the generated text before the close, or let the single call below write it.
|
|
82
|
+
`## Summary`, `## Needs you`, and `## Follow-ups` are the sections worth your own words; edit
|
|
83
|
+
those into the file before the call when the generator's plain facts say too little (they are
|
|
84
|
+
preserved byte for byte). `## Needs you` is the literal None or a `| N | What | Why |` table.
|
|
85
|
+
On abandon, `## Summary` states the abandonment reason and the trail (see Pivot below). An
|
|
86
|
+
intent with no `graph.md` gets a placeholder outcome.md backfilled from the record instead,
|
|
87
|
+
with the close's disposition and the `--outcome-summary` line as its summary. Also author the
|
|
88
|
+
rich INDEX entry note now (a short line in the store's existing Completed/Abandoned
|
|
89
|
+
convention: mode, what shipped or why it was abandoned, suite result, merge/spawn notes);
|
|
90
|
+
content authoring stays with you, `--index-note` only appends what you write.
|
|
92
91
|
|
|
93
92
|
Then call the script once:
|
|
94
93
|
|
|
@@ -110,23 +109,16 @@ line from `## Active` to `## Completed` or `## Abandoned` (dated today,
|
|
|
110
109
|
idempotent, accepting either a real em dash or a plain hyphen as the id/
|
|
111
110
|
title separator on read while always emitting the real em dash on write)
|
|
112
111
|
with the `--index-note` text appended after the date so the entry stays
|
|
113
|
-
rich, appends the savepoint
|
|
112
|
+
rich, appends the terminal savepoint line, commits the store repo, and
|
|
114
113
|
disarms (releases the code worktree and clears `delivery.lock`, verified
|
|
115
114
|
against the durable lock file on disk, never merely trusted). Omit
|
|
116
115
|
`--index-note` for a thin id+date entry, add `--no-commit` when a separate
|
|
117
116
|
commit step already covers the store (this never skips disarm), and
|
|
118
117
|
`--dry-run` to preview steps 1-5 with no writes.
|
|
119
118
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
existing `delivery.lock`. A live foreign session refuses the whole run
|
|
124
|
-
(exit 4, nothing written); a stale foreign lock is reclaimed automatically
|
|
125
|
-
(audited to savepoint.md) and the run proceeds as the new owner. Before
|
|
126
|
-
removing the worktree, step 5 also refuses on an unexpectedly dirty code
|
|
127
|
-
worktree (exit 5, naming the worktree path) rather than force-discarding
|
|
128
|
-
uncommitted changes; pass `--discard-worktree-changes` only when you mean
|
|
129
|
-
to override that deliberately.
|
|
119
|
+
Read `../plastic-conventions/references/completion-and-done.md` for the pre-flight lock guard
|
|
120
|
+
and the dirty-worktree refusal this call runs before writing anything (exit 4 and exit 5
|
|
121
|
+
below); this procedure only calls `end-intent`, it never re-implements them.
|
|
130
122
|
|
|
131
123
|
On the auto mode / curator path (no release), this single call performs the
|
|
132
124
|
FULL disarm (plain worktree remove, since the branch survives for later
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"scope": "behavior",
|
|
20
20
|
"set": "train",
|
|
21
21
|
"prompt": "Run the mechanical close (scripts/end-intent) for a delivered intent with a real outcome.md.",
|
|
22
|
-
"expected_output": "The savepoint
|
|
22
|
+
"expected_output": "The terminal savepoint line lands exactly once in savepoint.md, and a second run of the same command does not duplicate it (this is the regression the intent fixes: releasing used to skip this line entirely).",
|
|
23
23
|
"files": [],
|
|
24
24
|
"assertions": [
|
|
25
25
|
{ "type": "human", "check": "SKILL.md Step 1-4 calls scripts/end-intent as one script instead of restating the outcome/INDEX/savepoint one-liners in prose", "result": "expect-pass" },
|
|
@@ -1,112 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plastic-intent-executing
|
|
3
|
-
description: Use when you have a
|
|
3
|
+
description: Use when you have a graph or a plan to execute. A graph delivery runs on
|
|
4
|
+
`scripts/runner`'s three verbs, `step`, `status`, and `answer`; older, non-graph work
|
|
5
|
+
dispatches the `plastic-executor` agent for one consolidated action.
|
|
4
6
|
user-invocable: true
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Executing a Plan
|
|
8
10
|
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
Load plan from the active intent's `plan.md`, execute all tasks, review as below, report when complete.
|
|
12
|
-
|
|
13
11
|
## Step 0: Sync Worktree First
|
|
14
12
|
|
|
15
|
-
Before
|
|
16
|
-
|
|
13
|
+
Before touching any file the graph or the plan names, sync the code worktree with main so no
|
|
14
|
+
edit lands on a path a merged rename or delete already removed:
|
|
17
15
|
|
|
18
16
|
```
|
|
19
17
|
git -C <worktree> fetch origin && git -C <worktree> merge --ff-only origin/main
|
|
20
18
|
```
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Read `../plastic-conventions/references/locks-and-worktrees.md` for delivery isolation: the
|
|
27
|
-
single-owner lock, claims, worktrees, solo mode, and the station ledger, before touching the
|
|
28
|
-
worktree above. This path resolves relative to this skill's own installed directory.
|
|
29
|
-
|
|
30
|
-
## Mode Selection
|
|
31
|
-
|
|
32
|
-
### Check for superpowers first
|
|
33
|
-
If `superpowers:subagent-driven-development` is available as a skill, delegate to it. If only `superpowers:executing-plans` is available, delegate to that. If neither is available, use Plastic's own execution engine below.
|
|
34
|
-
|
|
35
|
-
**CRITICAL: when delegating to superpowers:**
|
|
36
|
-
- Tell the skill that the plan is at `~/.plastic/store/ID--slug/plan.md` (not `docs/superpowers/plans/`)
|
|
37
|
-
- Tell the skill that specs live at `~/.plastic/store/ID--slug/spec.md` (not `docs/superpowers/specs/`)
|
|
38
|
-
- All meta-artifacts must stay inside `~/.plastic/store/ID--slug/`
|
|
39
|
-
- Code files go in the project tree as normal
|
|
40
|
-
- Superpowers skills respect "user preferences for plan/spec location"; Plastic IS that preference
|
|
41
|
-
|
|
42
|
-
### Subagent-Driven (Default)
|
|
43
|
-
Dispatches subagents to do the work. The controller never implements. It dispatches, reviews, and tracks progress. One executor dispatch implements the whole consolidated action from `plan.md`, the action file's failure-mode matrix, and `checklist.md` in one pass, tests first: the matrix's tests are committed red before the code. Several independent action files are handed to the same executor in order; they are not a reason for a per-task review loop (removed in 2.0, intent 307).
|
|
44
|
-
|
|
45
|
-
The post-execution review in Step 3 runs by risk (the rule lives in the auto skill). When it runs, the reviewer is a separate agent with fresh context, never the maker. The plan itself is reviewed before code by the adversarial plan reviewer (`plan-reviewer-prompt.md`), dispatched by the lead at How.
|
|
46
|
-
|
|
47
|
-
### Inline (Fallback)
|
|
48
|
-
Executes tasks sequentially in the current session. Use when subagents aren't available or user explicitly requests inline mode.
|
|
49
|
-
|
|
50
|
-
To select: user says "inline", "execute inline", or "no subagents".
|
|
51
|
-
|
|
52
|
-
## Subagent-Driven Workflow
|
|
53
|
-
|
|
54
|
-
### Step 1: Load Plan
|
|
55
|
-
Run Step 0 (Sync Worktree First) before this step.
|
|
56
|
-
1. Read the active intent's `plan.md`
|
|
57
|
-
2. Extract ALL tasks with their full text, store in memory. Never make subagents read the plan file.
|
|
58
|
-
3. Create a task list to track progress
|
|
59
|
-
|
|
60
|
-
### Step 2: Execute Each Task
|
|
61
|
-
|
|
62
|
-
Dispatch ONE executor subagent and give it the whole delivery: every task's full text from `plan.md` (pasted in, never a file reference), every action file with its failure-mode matrix, the checklist items it must tick, the project context from CLAUDE.md, the active intent context from `{ID}--{slug}.md`, and the worktree path. In auto mode this is the `plastic-executor` agent; elsewhere use the `implementer-prompt.md` template. The executor writes the matrix's tests and commits them red, implements the consolidated action in order, ticks each item as it lands (see `## Tick-as-you-land`), and drives the test suite green.
|
|
63
|
-
|
|
64
|
-
After each commit lands (the red commit and every commit after it), append a `Commit` line to the savepoint ledger: `ruby ~/.plastic/scripts/savepoint-note <intent_dir> --kind Commit --text "<sha> <what it proves>"` (intent 317, D17). This is what feeds `report-screen delay`; a commit with no line is a gap the delay report cannot explain.
|
|
65
|
-
|
|
66
|
-
Print `ruby ~/.plastic/scripts/report-screen state <intent_dir> --changed "<what just landed>"` as the first characters of the reply, nothing before it, no fence, right after the red commit and again once the suite goes green (intent 331f).
|
|
20
|
+
If a named file or directory is missing (renamed or removed upstream), stop and report it
|
|
21
|
+
rather than editing a stale path. Read
|
|
22
|
+
`../plastic-conventions/references/locks-and-worktrees.md` for delivery isolation before
|
|
23
|
+
touching the worktree above.
|
|
67
24
|
|
|
68
|
-
|
|
69
|
-
- DONE or DONE_WITH_CONCERNS → proceed to Step 3.
|
|
70
|
-
- NEEDS_CONTEXT → provide the missing context, re-dispatch the executor.
|
|
71
|
-
- BLOCKED → stop, report to the user, wait for resolution.
|
|
25
|
+
## step
|
|
72
26
|
|
|
73
|
-
|
|
74
|
-
|
|
27
|
+
`ruby scripts/runner step <intent_dir>` computes which nodes in `graph.md`/`nodes/*.md` are
|
|
28
|
+
ready, applies dispatch policy (model, call cap), and prints a spawn block per dispatched node
|
|
29
|
+
- agent, model, packet path, the one test command, the call cap - fenced in its own stdout.
|
|
30
|
+
The runner itself never spawns an agent (327 D42). Call `step` again after each dispatched
|
|
31
|
+
node returns.
|
|
75
32
|
|
|
76
|
-
|
|
33
|
+
### Graph dispatch: the paste
|
|
77
34
|
|
|
78
|
-
|
|
35
|
+
The dispatch step is the paste, not a lead's hand-typed brief: copy each spawn block into the
|
|
36
|
+
Agent tool as its own dispatch, verbatim.
|
|
79
37
|
|
|
80
|
-
|
|
81
|
-
Capture observations in `## Insights`. When ALL checklist items are checked:
|
|
38
|
+
## status
|
|
82
39
|
|
|
83
|
-
|
|
84
|
-
|
|
40
|
+
`ruby scripts/runner status <intent_dir>` renders the graph's ledger state: which nodes are
|
|
41
|
+
running, done, blocked, or waiting on a decision. Safe to poll constantly; read node status
|
|
42
|
+
through `NodeLedger.status` before dispatching anything, never re-derive it by eye.
|
|
85
43
|
|
|
86
|
-
|
|
44
|
+
## answer
|
|
87
45
|
|
|
88
|
-
|
|
46
|
+
`ruby scripts/runner answer <intent_dir> --node <id> --decision "<text>"` closes a
|
|
47
|
+
`needs_decision` node with the owner's ruling, recorded to the ledger, so `step` can resume
|
|
48
|
+
the graph past it.
|
|
89
49
|
|
|
90
|
-
|
|
91
|
-
Run Step 0 (Sync Worktree First) before this step.
|
|
92
|
-
1. Read plan file from active intent
|
|
93
|
-
2. Review critically, raise concerns before starting
|
|
94
|
-
3. Create task list to track progress
|
|
50
|
+
## Non-graph work
|
|
95
51
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
### Step 3: Update Intent and Complete
|
|
104
|
-
Capture observations in `## Insights`. When ALL checklist items are checked:
|
|
105
|
-
|
|
106
|
-
1. Update the intent's cluster entries in `INDEX.md` to show `_(completed)_`. Do this first, so the store auto-commit in the next step picks it up. `plastic-intent-ending` does not cover cluster maintenance (`store-indexing` and `store-curating` own it), so doing it here keeps the step from being lost.
|
|
107
|
-
2. Hand the mechanical close to `plastic-intent-ending`. It owns `outcome.md`, the intent file's `## Outcome` stamp, the INDEX terminal move, the savepoint `Done` line, the store auto-commit, disarm, the QMD reindex, and the EM-to-CTO owner report, as ONE delegation. Author the outcome.md content when that skill asks for it; do not restate the mechanical steps here.
|
|
108
|
-
|
|
109
|
-
**This is NOT optional.** Complete the intent immediately when work is done.
|
|
52
|
+
When the intent has no `graph.md`, dispatch ONE `plastic-executor` subagent with the whole
|
|
53
|
+
consolidated action pasted in (never a file reference): every task's full text, every action
|
|
54
|
+
file with its failure-mode matrix, the checklist items it must tick, the project context, and
|
|
55
|
+
the worktree path. It writes the matrix's tests and commits them red, implements the
|
|
56
|
+
consolidated action in order, ticks each item as it lands (see `## Tick-as-you-land`), and
|
|
57
|
+
drives the test suite green. Read its response by code: DONE or DONE_WITH_CONCERNS proceeds;
|
|
58
|
+
NEEDS_CONTEXT provides the missing context and re-dispatches; BLOCKED stops and reports.
|
|
110
59
|
|
|
111
60
|
## Tick-as-you-land
|
|
112
61
|
|
|
@@ -120,57 +69,13 @@ progress. Do not batch several tasks' worth of checklist updates into one
|
|
|
120
69
|
later edit; tick the moment the task is verified, before moving to the next
|
|
121
70
|
task.
|
|
122
71
|
|
|
123
|
-
## Verify before every owner review
|
|
124
|
-
|
|
125
|
-
Hard rule: before presenting any completed work to the owner, independently
|
|
126
|
-
verify it. Grep or run the artifact the work just produced (the test suite,
|
|
127
|
-
the changed file, the installed output) rather than restating the intended
|
|
128
|
-
change. Never present an unverified claim to the owner. If verification
|
|
129
|
-
fails, fix it before the review, not after.
|
|
130
|
-
|
|
131
|
-
## Methods report (audits and sweeps)
|
|
132
|
-
|
|
133
|
-
When the work is an audit or a sweep (checking many files or many instances of
|
|
134
|
-
something rather than building one artifact), deposit a methods report to
|
|
135
|
-
`{intent_dir}/resources/` before the review: what was checked, how it was
|
|
136
|
-
checked, and what was found. This lets the owner review the method, not just
|
|
137
|
-
the conclusion.
|
|
138
|
-
|
|
139
|
-
## Reroute vs dispatch
|
|
140
|
-
|
|
141
|
-
A human-facing instruction like "run /plastic-intent-speccing" means the user
|
|
142
|
-
types that slash command themselves; it is never handed to a
|
|
143
|
-
subagent. Agent-facing dispatch text is a prompt passed to the Agent tool for
|
|
144
|
-
a subagent to execute. Keep the two separate: do not address a slash command
|
|
145
|
-
to a subagent, and do not paste a dispatch prompt at the user.
|
|
146
|
-
|
|
147
|
-
## Owner decisions during Exec
|
|
148
|
-
|
|
149
|
-
When presenting a batch of Exec decisions for the owner to rule, read
|
|
150
|
-
`~/.plastic/_decision-tables.md` and follow the numbered-table procedure,
|
|
151
|
-
persisting each ruling with `--stage Exec`.
|
|
152
|
-
|
|
153
72
|
## Position in the cycle
|
|
154
73
|
|
|
155
|
-
- **Before:** `
|
|
156
|
-
|
|
157
|
-
- **
|
|
74
|
+
- **Before:** the graph (`graph.md`, `nodes/*.md`), or `plan.md`/`checklist.md`, exists; the
|
|
75
|
+
worktree is armed.
|
|
76
|
+
- **Produces:** code changes and a ticked checklist.
|
|
77
|
+
- **Next:** `plastic-intent-ending` owns `outcome.md`, generated through
|
|
78
|
+
`scripts/outcome-report`, and the rest of the mechanical close.
|
|
158
79
|
|
|
159
80
|
Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
|
|
160
81
|
report-home contract this handoff relies on.
|
|
161
|
-
|
|
162
|
-
## Model Selection for Subagents
|
|
163
|
-
|
|
164
|
-
Match model to task complexity:
|
|
165
|
-
- **Mechanical tasks** (config files, boilerplate): cheapest available
|
|
166
|
-
- **Standard implementation**: default model
|
|
167
|
-
- **Architecture, integration, review**: most capable model
|
|
168
|
-
|
|
169
|
-
## Prompt Templates
|
|
170
|
-
|
|
171
|
-
Subagent prompts are in this skill's directory:
|
|
172
|
-
- `implementer-prompt.md`: template for implementer subagents
|
|
173
|
-
- `spec-reviewer-prompt.md`: template for spec compliance reviewers
|
|
174
|
-
- `code-quality-reviewer-prompt.md`: template for code quality reviewers
|
|
175
|
-
|
|
176
|
-
Read the appropriate template when dispatching each subagent type.
|
|
@@ -14,6 +14,9 @@ user-invocable: true
|
|
|
14
14
|
|
|
15
15
|
# Intent Speccing: thinking mode
|
|
16
16
|
|
|
17
|
+
Speccing is optional: a ruled or small-enough intent skips straight to How/Exec, and this
|
|
18
|
+
skill runs only when the request genuinely needs a design conversation first.
|
|
19
|
+
|
|
17
20
|
One skill for the whole thinking conversation on an intent. It asks one question at a time,
|
|
18
21
|
records every owner ruling the moment it lands, grills when asked, deposits research in
|
|
19
22
|
`resources/`, and ends by writing the action files the work runs from and consolidating the
|
|
@@ -312,7 +312,7 @@ A release IS a delivery. The active intent that drove this work must be complete
|
|
|
312
312
|
2. For each active intent being delivered:
|
|
313
313
|
a. Write a real `outcome.md` (never leave the scaffold placeholder), `disposition: delivered`, referencing the release tag.
|
|
314
314
|
b. Update `## Insights` with final observations.
|
|
315
|
-
c. Run the mechanical close (`scripts/end-intent`'s steps 1-5): this stamps the intent file's `## Outcome` summary, moves the INDEX.md line to `## Completed` (dated today, with a rich entry description via `--index-note`), appends the savepoint
|
|
315
|
+
c. Run the mechanical close (`scripts/end-intent`'s steps 1-5): this stamps the intent file's `## Outcome` summary, moves the INDEX.md line to `## Completed` (dated today, with a rich entry description via `--index-note`), appends the terminal savepoint line, commits the store, and disarms (releases the worktree - already gone from step 8 above - and clears `delivery.lock`), all in one call:
|
|
316
316
|
```bash
|
|
317
317
|
ruby ~/.plastic/scripts/end-intent --store <store_path> --id <ID> --disposition delivered \
|
|
318
318
|
--session "$CLAUDE_CODE_SESSION_ID" \
|
|
@@ -81,7 +81,7 @@ this playbook describes what happens next, not a pending action.
|
|
|
81
81
|
**Preconditions**, both required before any publish of `1.2.0-beta.1`:
|
|
82
82
|
|
|
83
83
|
- (a) One documentation pass over beta-line skills and docs for the hybrid savepoint contract:
|
|
84
|
-
on beta, only the terminal
|
|
84
|
+
on beta, only the terminal savepoint line still writes a live `savepoint.md`; every other
|
|
85
85
|
milestone lives in `savepoint_events` plus a committed JSONL export. Beta-line prose that
|
|
86
86
|
still assumes an always-live ledger needs updating first, so a beta-line reader does not
|
|
87
87
|
mistake an empty ledger for a broken one.
|
package/skills/tutorial/SKILL.md
CHANGED
|
@@ -21,7 +21,8 @@ reference. Every checkpoint inside a track is prose, never another menu.
|
|
|
21
21
|
|
|
22
22
|
1. **Guided**: deliver a first intent, stage by stage, approving each step yourself. Routes to
|
|
23
23
|
`references/track-1-guided.md`.
|
|
24
|
-
2. **Auto**:
|
|
24
|
+
2. **Auto**: create the intent, write its `graph.md`, then hand it to `scripts/runner step` to
|
|
25
|
+
drive every node to the end, watching the record and reports as it works. Routes to
|
|
25
26
|
`references/track-2-auto.md`.
|
|
26
27
|
3. **Projects and roadmaps**: grow a founding intent into a small real project, add more
|
|
27
28
|
intents, and plan a delivery batch with a roadmap. Routes to
|
|
@@ -58,66 +58,47 @@ next, it does not write `spec.md` itself.
|
|
|
58
58
|
Checkpoint: after two or three answers, look at the intent file. Every ruling given out loud
|
|
59
59
|
is already sitting in `### Decisions` and in `## Insights`, in writing.
|
|
60
60
|
|
|
61
|
-
### 4.
|
|
61
|
+
### 4. How, write the graph
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Ask the same conversation (`/plastic-intent-speccing`) to turn the rulings into the graph.
|
|
64
64
|
|
|
65
|
-
Artifact: `
|
|
65
|
+
Artifact: `graph.md` (nodes, edges, dispatch policy) and one `nodes/N.md` file per node this
|
|
66
|
+
small delivery needs. A delivery this size is one node; many independent tasks instead get
|
|
67
|
+
one node each, dispatched in parallel by the runner.
|
|
66
68
|
|
|
67
|
-
Checkpoint:
|
|
68
|
-
station 3.
|
|
69
|
+
Checkpoint: open `graph.md` and point at the one node this worked example needs.
|
|
69
70
|
|
|
70
|
-
### 5.
|
|
71
|
-
|
|
72
|
-
Ask the same conversation to write the action files and the plan.
|
|
73
|
-
|
|
74
|
-
Artifact: `plan.md`, `checklist.md`, and at least one real `actions/ACTION_N.md`. A small
|
|
75
|
-
delivery like this one consolidates the whole delivery into a single `actions/ACTION_1.md`
|
|
76
|
-
(the ordered steps plus the exact changes); many independent tasks, dispatched in parallel,
|
|
77
|
-
instead get one `actions/ACTION_N.md` file per task. `checklist.md` follows a fixed form: tasks start under `## In Progress`, move to
|
|
78
|
-
`## Completed` as they land, and a `## Session Log` table records what happened each session.
|
|
79
|
-
A task that depends on an owner decision landing first (a destructive step, a structural
|
|
80
|
-
ruling) gets an `[ORCHESTRATOR]` prefix and blocks every other item until that decision is
|
|
81
|
-
made; this worked example has none.
|
|
82
|
-
|
|
83
|
-
Checkpoint: open `checklist.md`. Every task in `plan.md` has a matching checkbox under
|
|
84
|
-
`## In Progress`; that checklist, not `plan.md` itself, is what gets ticked off and moved to
|
|
85
|
-
`## Completed` during Exec.
|
|
86
|
-
|
|
87
|
-
### 6. Exec, verify before you report
|
|
71
|
+
### 5. Exec, drive the runner loop
|
|
88
72
|
|
|
89
73
|
Type `/plastic-intent-executing`.
|
|
90
74
|
|
|
91
|
-
Teach the
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
always comes before checking a box, never after, and each task is ticked the moment it lands,
|
|
97
|
-
never batched for later.
|
|
75
|
+
Teach the loop: `ruby scripts/runner step <intent_dir>` computes which nodes are ready and
|
|
76
|
+
prints a spawn block to dispatch, `ruby scripts/runner status <intent_dir>` reads the
|
|
77
|
+
ledger (running, done, blocked, or waiting on a decision), and `ruby scripts/runner answer`
|
|
78
|
+
closes a node that needs an owner's ruling. Call `step` again after each dispatched node
|
|
79
|
+
returns, until the graph is empty.
|
|
98
80
|
|
|
99
81
|
Artifact: the actual change on disk (the new README Usage section, or, in the global-store
|
|
100
|
-
fallback, a short written note saved as the intent's deliverable) and
|
|
101
|
-
`
|
|
82
|
+
fallback, a short written note saved as the intent's deliverable) and every node in
|
|
83
|
+
`graph.md` at a terminal status.
|
|
102
84
|
|
|
103
|
-
Checkpoint:
|
|
104
|
-
|
|
105
|
-
this session, before moving to station 7.
|
|
85
|
+
Checkpoint: run `runner status` and confirm no node is left running or blocked, before
|
|
86
|
+
moving to station 6.
|
|
106
87
|
|
|
107
|
-
###
|
|
88
|
+
### 6. End
|
|
108
89
|
|
|
109
90
|
Type `/plastic-intent-ending`.
|
|
110
91
|
|
|
111
|
-
Artifact: a real `outcome.md` (Summary, Delivered, Verification, Follow-ups)
|
|
112
|
-
|
|
113
|
-
`savepoint.
|
|
92
|
+
Artifact: a real `outcome.md` (Summary, Delivered, Verification, Follow-ups) generated by
|
|
93
|
+
`scripts/outcome-report` from `graph.md` and the ledger, the intent moved from `## Active`
|
|
94
|
+
to `## Completed` in `INDEX.md`, and the terminal savepoint line.
|
|
114
95
|
|
|
115
96
|
Checkpoint: open `outcome.md` and read its Summary. It should describe, in a sentence or
|
|
116
97
|
two, exactly the README section (or note) just delivered.
|
|
117
98
|
|
|
118
99
|
## Wrap and where to go next
|
|
119
100
|
|
|
120
|
-
That is the full cycle once: create,
|
|
101
|
+
That is the full cycle once: create, graph, runner step, end. Read
|
|
121
102
|
[`your-first-intent-in-10-minutes.md`](https://github.com/zalom/plastic/blob/main/docs/guides/your-first-intent-in-10-minutes.md) for the same path condensed to a single
|
|
122
103
|
read, and [`reading-the-ledgers.md`](https://github.com/zalom/plastic/blob/main/docs/guides/reading-the-ledgers.md) for where each station wrote its
|
|
123
104
|
work down.
|
|
@@ -33,7 +33,7 @@ queued intent from the dashboard's queue itself.)
|
|
|
33
33
|
|
|
34
34
|
No new command at this station. Watch how the work splits.
|
|
35
35
|
|
|
36
|
-
Auto owns How (
|
|
36
|
+
Auto owns How (`graph.md`, `nodes/`) and Exec (the code, the tests, the
|
|
37
37
|
mechanical close) from here on. Inside Exec it follows a few fixed habits: it syncs its
|
|
38
38
|
working copy with the main line before touching anything, ticks each task the moment it
|
|
39
39
|
lands rather than batching several into one later edit, and independently verifies its own
|
|
@@ -63,7 +63,7 @@ Checkpoint: open the intent's `savepoint.md` and name the stage its last line re
|
|
|
63
63
|
|
|
64
64
|
### 4. Reading the per-stage reports
|
|
65
65
|
|
|
66
|
-
No new command. At each stage boundary (What, Why, How, Exec
|
|
66
|
+
No new command. At each stage boundary (What, Why, How, Exec) the agent briefs in a
|
|
67
67
|
fixed three-line shape: State (what happened and why it matters), Risk (the one thing that
|
|
68
68
|
could bite, or "nothing flagged"), and Call (the decision left to the user, or the call the
|
|
69
69
|
agent is taking on its own). That is the depth for a medium or large intent. A small intent
|
package/templates/agents.md
CHANGED
|
@@ -58,10 +58,10 @@ Plastic has its own lifecycle skills. When a Plastic skill exists for the curren
|
|
|
58
58
|
| Why | `plastic-intent-speccing` | Rulings as insights, `resources/*.md`, `spec.md` |
|
|
59
59
|
| How | `plastic-intent-speccing` | `actions/`, `plan.md`, `checklist.md` |
|
|
60
60
|
| Exec | `plastic-intent-executing` | Code + `outcome.md` |
|
|
61
|
-
|
|
|
61
|
+
| End | `plastic-intent-ending` | Lifecycle transition |
|
|
62
62
|
|
|
63
63
|
**Artifact convention:** ALL lifecycle artifacts go to the active intent directory (`store/{id}--{slug}/`). Never write specs to `docs/superpowers/specs/` or plans to `docs/superpowers/plans/`.
|
|
64
64
|
|
|
65
|
-
## When
|
|
65
|
+
## When the Project Wraps
|
|
66
66
|
|
|
67
67
|
When this project satisfies the governing intent's goal, report back. The orchestrator will complete the strategic intent.
|
package/templates/config.yml
CHANGED
|
@@ -2,11 +2,11 @@ version: 3
|
|
|
2
2
|
project_roots:
|
|
3
3
|
- ~/.plastic/projects
|
|
4
4
|
stale_threshold_days: 3
|
|
5
|
-
# When to compact. Absolute token counts for a 1M window (
|
|
5
|
+
# When to compact. Absolute token counts for a 1M window (15 and 25 percent), not
|
|
6
6
|
# percentages: models are reliable only to roughly 50 to 65 percent of advertised
|
|
7
7
|
# context, so a percentage that is right at 200k floats to an untested size at 1M.
|
|
8
|
-
context_offer_tokens:
|
|
9
|
-
context_insist_tokens:
|
|
8
|
+
context_offer_tokens: 150000
|
|
9
|
+
context_insist_tokens: 250000
|
|
10
10
|
execution_mode: subagent-driven
|
|
11
11
|
hash_length: 6
|
|
12
12
|
hash_algorithm: sha256-base36
|