@iceinvein/agent-skills 0.4.0 → 0.5.0
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/package.json +1 -1
- package/skills/index.json +1 -1
- package/skills/sluice/SKILL.md +24 -7
- package/skills/sluice/references/deep-channel.md +197 -43
- package/skills/sluice/references/meter.md +7 -0
- package/skills/sluice/references/review.md +15 -7
- package/skills/sluice/scripts/run-stats.sh +22 -3
- package/skills/sluice/skill.json +1 -1
package/package.json
CHANGED
package/skills/index.json
CHANGED
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"name": "sluice",
|
|
284
284
|
"description": "Routes work by change shape into four channels (bypass, fast, main, deep) and applies only the rules each channel needs, so a one-line fix does not pay the cost of a multi-subsystem build. Carries seven rules as one-liners in the router and the full treatment in references read only on friction, and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what every dispatched agent cost. Claude Code only; conflicts with the superpowers plugin.",
|
|
285
285
|
"type": "prompt",
|
|
286
|
-
"version": "0.
|
|
286
|
+
"version": "0.2.0"
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
289
|
"name": "temporal-coupling-detector",
|
package/skills/sluice/SKILL.md
CHANGED
|
@@ -21,8 +21,9 @@ announcement is how your partner redirects you without being asked.
|
|
|
21
21
|
| `deep` | Several subsystems, or a plan was asked for | + written design and plan | "Deep channel, several subsystems. Design before code." |
|
|
22
22
|
|
|
23
23
|
`bypass`, `fast`, and `main` proceed without stopping for approval; only
|
|
24
|
-
`deep` stops
|
|
25
|
-
agents rather than you will carry it out
|
|
24
|
+
`deep` stops. It stops for design sign-off before code, again for the plan
|
|
25
|
+
when agents rather than you will carry it out, and once more at pre-flight
|
|
26
|
+
before Task 1, to settle review and workspace.
|
|
26
27
|
|
|
27
28
|
Name the channel and the signal that actually routed you there. The strings above
|
|
28
29
|
are examples, not fixed copy, and a channel with a two-part signal should say
|
|
@@ -81,11 +82,27 @@ The plan needs sign-off as well whenever agents will execute it, because each
|
|
|
81
82
|
one sees only its own task and so nobody ever reads the plan whole. Executing
|
|
82
83
|
it yourself makes it a worklist instead: write it and carry on.
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
Order the plan so the tasks that change nothing come first, and mark the one
|
|
86
|
+
task that turns the new behaviour on. Then a late re-baseline, re-blessed
|
|
87
|
+
snapshots, regenerated fixtures, attributes to that one point instead of to
|
|
88
|
+
the branch at large.
|
|
89
|
+
|
|
90
|
+
Before Task 1, stop once and ask which flagged tasks get a reviewer and
|
|
91
|
+
whether the work runs in a worktree. Ask it as a choice with the counts in
|
|
92
|
+
it, never as a paragraph. Review that turns out to be missing is only
|
|
93
|
+
actionable while the plan can still change.
|
|
94
|
+
|
|
95
|
+
Read the plan as a graph rather than a list. `Needs` and `Offers` are
|
|
96
|
+
dependency edges and `Touches` says what cannot overlap, so which tasks may
|
|
97
|
+
run at once is derivable rather than guessed. Fan out wherever that graph
|
|
98
|
+
allows; serial is the fallback for where it doesn't, not the default.
|
|
99
|
+
|
|
100
|
+
Then read `references/deep-channel.md` for the plan format, that checkpoint,
|
|
101
|
+
the dispatch rules, and when a task actually needs a reviewer. Three that
|
|
102
|
+
catch people out: concurrent implementers need a worktree each and the flip
|
|
103
|
+
runs alone, review is tiered rather than automatic, and a `deep` run that
|
|
104
|
+
cannot dispatch has to replace the review tier with something, not quietly
|
|
105
|
+
ship without one.
|
|
89
106
|
|
|
90
107
|
## Conflicts
|
|
91
108
|
|
|
@@ -4,15 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
- A plan opens with **Goal**, **Architecture** and **Ground Rules**. The ground
|
|
6
6
|
rules are the limits the whole plan answers to, each recorded at its literal
|
|
7
|
-
value, and each one binds every task without being repeated in it.
|
|
7
|
+
value, and each one binds every task without being repeated in it. The commit
|
|
8
|
+
message convention is one of them, written out at literal value along with
|
|
9
|
+
anything the repo forbids a message from carrying. An implementer arrives
|
|
10
|
+
with its own defaults and will use them on anything you left unsaid.
|
|
8
11
|
- No implementer sees a neighbouring task, so each task carries a
|
|
9
12
|
**Contract**, not optional: a symbol absent from it does not exist for
|
|
10
13
|
whoever builds the task. `Needs` names what this task calls but another
|
|
11
14
|
task defines; `Offers` names what later tasks will call. Both sides are
|
|
12
|
-
spelled out whole, argument lists and return shapes.
|
|
15
|
+
spelled out whole, argument lists and return shapes. They are also the
|
|
16
|
+
plan's dependency edges, which is what dispatch order gets derived from.
|
|
13
17
|
- A **Touches** line lists the exact paths the task creates, edits and tests.
|
|
18
|
+
Complete, not indicative: it decides which tasks may run at the same time,
|
|
19
|
+
so a path left off it has stopped being an untidy diff stat and become a
|
|
20
|
+
corrupted concurrent run.
|
|
14
21
|
- A **Review** field may name why the task needs the stronger tier (auth,
|
|
15
22
|
data, money, concurrency); the table below decides otherwise.
|
|
23
|
+
- **Order the plan so the inert tasks come first.** A task is inert when it
|
|
24
|
+
adds capability, config, a schema or a code path that nothing reads yet:
|
|
25
|
+
landing it changes no observable behaviour, so it is safe to land alone and
|
|
26
|
+
safe to leave landed. Exactly one task turns the new behaviour on, and it
|
|
27
|
+
carries a **Flips** line saying what changes and what it changes from.
|
|
28
|
+
Tasks after it build on the new behaviour and are no longer inert.
|
|
16
29
|
- Steps are checkboxes: an action, and the proof it worked. Skip the
|
|
17
30
|
test-first ritual per step; `references/test-first.md` owns it.
|
|
18
31
|
- Code goes in only where exact characters matter and paraphrase breaks
|
|
@@ -30,32 +43,121 @@
|
|
|
30
43
|
### Task N: <name>
|
|
31
44
|
**Contract:** Needs: <sig> | Offers: <sig>
|
|
32
45
|
**Touches:** <path> (new) | <path> (edit) | <path> (test)
|
|
46
|
+
**Flips:** <what changes, from what, or omit>
|
|
33
47
|
**Review:** <reason, or omit>
|
|
34
48
|
- [ ] <action> -> <proof>
|
|
35
49
|
```
|
|
36
50
|
|
|
51
|
+
One `Flips` line pays for itself at the far end of the plan. When a late task
|
|
52
|
+
re-baselines something, regenerated fixtures, re-blessed snapshots, a golden
|
|
53
|
+
file that now reads differently, the flip is what the new baseline is
|
|
54
|
+
attributable to, a single point rather than a diffuse property of the branch.
|
|
55
|
+
Without it, whoever reads the branch later has to derive that ordering from
|
|
56
|
+
the diff, and they will derive it wrong.
|
|
57
|
+
|
|
58
|
+
Two tasks carrying `Flips` means the plan holds two branches' worth of work.
|
|
59
|
+
Split it. A plan with none is not a `deep` plan: nothing in it does anything.
|
|
60
|
+
|
|
61
|
+
## Pre-flight
|
|
62
|
+
|
|
63
|
+
Design signed off, plan written, nothing built yet. Before Task 1, stop once
|
|
64
|
+
and settle two things with your partner. Ask them as questions with options,
|
|
65
|
+
not as a paragraph they have to reply to in prose: what you are after is a
|
|
66
|
+
decision, and a wall of considerations asks them to extract the decision from
|
|
67
|
+
it first.
|
|
68
|
+
|
|
69
|
+
**Review.** Name the tasks the table below sends to a reviewer, each with the
|
|
70
|
+
trigger that qualified it, and say how many of the rest skip with a ledger
|
|
71
|
+
line. Then offer the choice: dispatch a reviewer at each of them, dispatch
|
|
72
|
+
only at the stronger-model tier, or hand back with those tasks listed as
|
|
73
|
+
review outstanding. The options are what makes the cost legible.
|
|
74
|
+
"Four of nine need a reviewer" is a decision your partner can price; "I will
|
|
75
|
+
review where appropriate" is not.
|
|
76
|
+
|
|
77
|
+
**Workspace, commits and concurrency.** One worktree for the plan, one per
|
|
78
|
+
concurrent implementer, or straight onto the current branch; and with it who
|
|
79
|
+
commits, each agent committing its own task as it finishes or agents leaving
|
|
80
|
+
the tree dirty for you to read and commit yourself. One question rather than
|
|
81
|
+
three, because isolation is what gates the other two: a shared tree means
|
|
82
|
+
serial implementers, and the current branch means serial and your commits.
|
|
83
|
+
Say how many tasks the graph says could actually overlap, because a worktree
|
|
84
|
+
per implementer is only worth buying if the plan has parallelism to spend it
|
|
85
|
+
on. Agents committing into a worktree is cheap and easy to
|
|
86
|
+
discard; the same on master is a different proposition, and that is the pairing
|
|
87
|
+
your partner needs in front of them. Implementing onto main or master needs
|
|
88
|
+
their say-so and this is where you get it. Known friction in a worktree for this
|
|
89
|
+
repo, a lint target that resolves through a symlink, a build that needs its own
|
|
90
|
+
install, belongs in the option text where it can affect the answer, not in a
|
|
91
|
+
footnote after they have chosen.
|
|
92
|
+
|
|
93
|
+
If one of the two has only one live answer, say which and ask the other. A
|
|
94
|
+
checkpoint down to a single question is still a checkpoint.
|
|
95
|
+
|
|
96
|
+
A session that forbids subagents does not skip this; it changes what the
|
|
97
|
+
review options are. Skipping it is how "review outstanding" first appears in
|
|
98
|
+
the closing summary, at the one moment your partner can no longer do anything
|
|
99
|
+
about it.
|
|
100
|
+
|
|
37
101
|
## Dispatch rules
|
|
38
102
|
|
|
103
|
+
Read the plan as a graph before you read it as a list. `Needs` and `Offers`
|
|
104
|
+
are dependency edges, not only blindness insurance: a task is ready when every
|
|
105
|
+
`Needs` it names is offered by a task already done, and any two ready tasks
|
|
106
|
+
with disjoint `Touches` can go at the same time. Do that read once, before
|
|
107
|
+
Task 1. A plan run in the order it happened to be written is a plan whose
|
|
108
|
+
graph nobody looked at, and inert-first ordering tends to put the independent
|
|
109
|
+
tasks at the front, so the opportunity is usually real.
|
|
110
|
+
|
|
111
|
+
Derive the sets at dispatch rather than writing wave numbers into the plan. A
|
|
112
|
+
declared schedule is wrong the moment one task lands late or comes back with a
|
|
113
|
+
blocking finding. A derived one just recomputes.
|
|
114
|
+
|
|
39
115
|
- One `TaskCreate` per task, marked in progress then complete. That state
|
|
40
116
|
outlives compaction; your memory doesn't.
|
|
41
117
|
- Each task goes to a fresh agent with that task's text and nothing else.
|
|
42
118
|
What this session accumulated is yours to hold, not theirs.
|
|
43
|
-
- **
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
119
|
+
- **Fan out wherever the graph allows.** Work that does not write is always
|
|
120
|
+
safe and always parallel: investigations, searches and reviewers, one agent
|
|
121
|
+
per question, all in one message so they run at once.
|
|
122
|
+
- **Concurrent implementers need a worktree each.** Disjoint `Touches` is
|
|
123
|
+
necessary and no longer sufficient: agents commit their own tasks, so two
|
|
124
|
+
in one tree contend on the git index and on `HEAD` even when their files
|
|
125
|
+
never meet. One worktree per concurrent implementer, or run them serially.
|
|
126
|
+
Those worktrees cost something, which is why pre-flight asks rather than
|
|
127
|
+
assumes.
|
|
128
|
+
- **The flip runs alone.** Nothing goes concurrent with the task carrying
|
|
129
|
+
`Flips`. The invariant it establishes is what later tasks are checked
|
|
130
|
+
against, and whatever landed beside it was checked against nothing.
|
|
47
131
|
- Isolate the workspace before a multi-task plan: the harness's worktree
|
|
48
132
|
tool, not `git worktree` yourself. Implementing straight onto main or
|
|
49
|
-
master needs your partner's say-so
|
|
133
|
+
master needs your partner's say-so, which pre-flight is where you got, and
|
|
134
|
+
it forecloses concurrent implementers for the whole run.
|
|
135
|
+
- **The agent that built the task commits it**, once its own tests pass, and
|
|
136
|
+
only the paths in its `Touches`. Never `git add -A`: the tree is shared, and
|
|
137
|
+
on a branch you did not isolate it holds work that is not this task's. The
|
|
138
|
+
agent committing is the default rather than you committing, because
|
|
139
|
+
authoring a message for a diff you did not write means reading that diff,
|
|
140
|
+
which is the context dispatch exists to keep out of this session. Pre-flight
|
|
141
|
+
can overturn it for a given run.
|
|
50
142
|
- Match model to task: cheap for mechanical work, stronger for judgment
|
|
51
143
|
and final review.
|
|
52
144
|
|
|
145
|
+
A per-task commit is not an integration event. `references/finish.md` owns
|
|
146
|
+
push, PR and merge, none of which happen here, and a standing instruction to
|
|
147
|
+
commit only when asked is about that outward-facing act. The plan's sign-off
|
|
148
|
+
is the asking. Nothing a task commits reaches anywhere your partner has not
|
|
149
|
+
already agreed to, so the instruction is satisfied rather than excepted.
|
|
150
|
+
|
|
53
151
|
## When dispatch is unavailable
|
|
54
152
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
153
|
+
Separate two cases first. A session where dispatch is off unless your partner
|
|
154
|
+
asks for it is not this section: it is the pre-flight review question, and
|
|
155
|
+
answering it is theirs to do. This section is dispatch being genuinely
|
|
156
|
+
unavailable, where there is nothing to ask.
|
|
157
|
+
|
|
158
|
+
`deep` then loses most of the machinery this file describes, and the place to
|
|
159
|
+
say so is the routing announcement, where your partner can still act on it,
|
|
160
|
+
not the summary at the end where it reads as an excuse.
|
|
59
161
|
|
|
60
162
|
Three things change. The plan becomes your own worklist and needs no sign-off,
|
|
61
163
|
since you are the only one who will ever read it. Task isolation is gone, so
|
|
@@ -65,35 +167,57 @@ review was buying.
|
|
|
65
167
|
|
|
66
168
|
One thing does not change: the work still owes a review. Reading your own diff
|
|
67
169
|
is not one, and the table below still names which tasks needed the stronger
|
|
68
|
-
tier.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
170
|
+
tier. Name those tasks at pre-flight, not at handback, so the choice of what
|
|
171
|
+
to do about them is still open: shrink the plan, take the flip on its own, or
|
|
172
|
+
accept the gap knowingly. Whatever is left then gets listed as review
|
|
173
|
+
outstanding rather than review passed. A `deep` run that ships with nobody
|
|
174
|
+
having read it has become a `fast` run with a design document attached, and
|
|
175
|
+
your partner is entitled to know that while it can still change the plan.
|
|
72
176
|
|
|
73
177
|
## Review policy
|
|
74
178
|
|
|
179
|
+
`references/review.md` owns the mechanics every review shares: what to send,
|
|
180
|
+
the two destinations and the grade that sorts them, findings going back to
|
|
181
|
+
whoever wrote the code, and the three-round cap. This section is only what
|
|
182
|
+
`deep` adds on top, which is the tiering. It does not restate the rest, and
|
|
183
|
+
where it once did, the two copies had already drifted apart.
|
|
184
|
+
|
|
75
185
|
A review costs about what the implementation cost, so reviewing every task
|
|
76
|
-
doubles the plan. Confirming Offers landed and nothing outside Touches
|
|
77
|
-
is free, one `git
|
|
186
|
+
doubles the plan. Confirming `Offers` landed and nothing outside `Touches`
|
|
187
|
+
moved is free, one `git show --stat` over the task's commits; only quality
|
|
188
|
+
judgment needs a dispatch. `git diff --stat` is the wrong reach now that the
|
|
189
|
+
agent commits its own task: it reports a clean tree and confirms nothing,
|
|
190
|
+
and it fails by printing success rather than by erroring.
|
|
191
|
+
|
|
192
|
+
| Tier | Task shape | Review |
|
|
193
|
+
|------|------------|--------|
|
|
194
|
+
| 0 | Created files only, executable tests exist and pass, Contract matches | No dispatch. Read the commit stat yourself. |
|
|
195
|
+
| 1 | Modified existing code, or later tasks build on it | One reviewer dispatch |
|
|
196
|
+
| 2 | No executable test covers it: prose, config, docs | One reviewer dispatch; a stat cannot confirm the words are right |
|
|
197
|
+
| 3 | Auth, data, money, concurrency, or the plan flags it | One reviewer dispatch, stronger model |
|
|
198
|
+
| 3 | Carries the `Flips` line | One reviewer dispatch, stronger model |
|
|
78
199
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
| Auth, data, money, concurrency, or the plan flags it | One reviewer dispatch, stronger model |
|
|
84
|
-
| No executable test covers it: prose, config, docs | One reviewer dispatch; a diff stat can't confirm the words are right |
|
|
200
|
+
A task matching more than one row takes the highest tier of them. Tier is the
|
|
201
|
+
number, not the row order and not which shape sounds more serious. A task that
|
|
202
|
+
only creates files but ships prose is tier 2, and a suite re-bless paired with
|
|
203
|
+
an ADR is tier 2 rather than the free row it resembles.
|
|
85
204
|
|
|
86
|
-
|
|
205
|
+
Ordering inert tasks first is what keeps this affordable. An inert task that
|
|
206
|
+
only creates files takes tier 0, so a nine-task plan usually buys three
|
|
207
|
+
or four dispatches rather than nine. If most of your plan qualifies for a
|
|
208
|
+
dispatch, the tasks are interleaved rather than ordered, and reordering them
|
|
209
|
+
is cheaper than reviewing them.
|
|
87
210
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
211
|
+
Reviews are reads, so they are always parallel. Every review a wave earned
|
|
212
|
+
goes out in one message, and they run while the next wave's implementers work:
|
|
213
|
+
a reviewer writes nothing, so it collides with nothing. The final review is
|
|
214
|
+
the only one that waits, because it is the only one that needs everything to
|
|
215
|
+
have landed.
|
|
92
216
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
217
|
+
Record the base in the task's `TaskCreate` entry when you dispatch, before the
|
|
218
|
+
agent's first commit lands. Recovering it afterwards is archaeology, and the
|
|
219
|
+
answer you will guess at is `HEAD~1`, which `references/review.md` already
|
|
220
|
+
names as the standing mistake.
|
|
97
221
|
|
|
98
222
|
**A finding surviving two rounds may be a defect in the criterion, not the
|
|
99
223
|
work.** Before a third round, ask whether any output could satisfy it. A
|
|
@@ -101,14 +225,44 @@ criterion that rejects every attempt the same way never converges, and the
|
|
|
101
225
|
work degrades each round as it contorts toward an unpassable test. Fixing
|
|
102
226
|
the criterion is your partner's call.
|
|
103
227
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
228
|
+
## What the reviewer is asked
|
|
229
|
+
|
|
230
|
+
The tier buys a dispatch; it does not say what the dispatch is for. Name the
|
|
231
|
+
claim the review has to settle, and it differs by row:
|
|
232
|
+
|
|
233
|
+
- **Tier 0**, spot-checked rather than dispatched: that the task is actually
|
|
234
|
+
inert. The claim is that nothing observable changes when this lands by
|
|
235
|
+
itself, and one caller already reaching the new path falsifies it.
|
|
236
|
+
- **Tier 1**: that `Offers` matches what the plan promised later tasks, since
|
|
237
|
+
those tasks are being built blind against exactly that signature.
|
|
238
|
+
- **Tier 2**: that the words are true of the code as it now stands. That is
|
|
239
|
+
the whole reason the row exists and the one claim no stat reaches.
|
|
240
|
+
- **Tier 3, `Flips`**: that the invariant the flip establishes holds, and
|
|
241
|
+
holds from that commit onward rather than only under the test the task
|
|
242
|
+
wrote for itself.
|
|
243
|
+
- **Tier 3, everything else**: whatever the trigger was. A task flagged for
|
|
244
|
+
concurrency gets asked about concurrency.
|
|
245
|
+
|
|
246
|
+
## A finding about another task
|
|
247
|
+
|
|
248
|
+
Contracts mean tasks are built blind, so a reviewer reading Task 6 will
|
|
249
|
+
sometimes be right about Task 2. That finding fits neither destination: Task
|
|
250
|
+
6's agent cannot act on it, and it does not quietly become yours to fix.
|
|
251
|
+
|
|
252
|
+
Record it on the earlier task's `TaskCreate` entry, and send it to that task's
|
|
253
|
+
agent as well if that agent is still live. If it invalidates an `Offers` that
|
|
254
|
+
later tasks have already built against, it has stopped being a finding and
|
|
255
|
+
become a plan change, which is your partner's call rather than something to
|
|
256
|
+
absorb into the next task's brief.
|
|
257
|
+
|
|
258
|
+
## The final review
|
|
259
|
+
|
|
260
|
+
It covers cross-task integration and everything the record accumulated, not
|
|
261
|
+
lines a per-task review already cleared. It is a dispatch, on the stronger
|
|
262
|
+
model, and it gets the whole-plan diff and the deferred findings as a list.
|
|
263
|
+
|
|
264
|
+
Size the brief to what it is actually carrying, and say which of two things it
|
|
265
|
+
is. After nine per-task reviews cleared, it is an integration check. When
|
|
266
|
+
pre-flight chose to skip per-task reviews, it is the only review the plan will
|
|
267
|
+
ever get. Sending the same brief to both is how a plan ends up with one skim
|
|
268
|
+
standing in for nine reviews.
|
|
@@ -26,6 +26,13 @@ that only becomes obvious once it is written down next to the diff. Expect
|
|
|
26
26
|
some runs to make the case for a shallower channel next time. That is the
|
|
27
27
|
ledger working, not the ledger complaining.
|
|
28
28
|
|
|
29
|
+
The agent line carries a concurrency factor next to the wall-clock: agent time
|
|
30
|
+
summed, over the span those agents actually occupied. 1.0× means every agent
|
|
31
|
+
had the clock to itself. That is the right number for a plan whose graph was a
|
|
32
|
+
chain and a finding for one whose graph was not, so read it against the plan
|
|
33
|
+
rather than on its own. Nine agents at 1.0× on a plan with four independent
|
|
34
|
+
tasks in it is a run that took four times longer than it needed to.
|
|
35
|
+
|
|
29
36
|
Read it before you paste it. A row showing an agent that errored, or an agent
|
|
30
37
|
whose token count dwarfs every other row, is a finding about the run and
|
|
31
38
|
belongs in your prose, not left for your partner to spot in a table.
|
|
@@ -11,17 +11,25 @@ mistake, showing the last of five commits and burying the rest. Send what
|
|
|
11
11
|
you built and what it is meant to do alongside the path, and nothing about
|
|
12
12
|
how you got there.
|
|
13
13
|
|
|
14
|
+
Name the claim the review has to settle as well. A diff and an intent with no
|
|
15
|
+
question attached buys a general opinion, which is the most expensive kind of
|
|
16
|
+
finding to receive and the least actionable one.
|
|
17
|
+
|
|
14
18
|
Leave every finding open to the reviewer; steering them away from an issue
|
|
15
19
|
first is the same mistake as reviewing it yourself. A finding that looks
|
|
16
20
|
wrong still gets raised, then argued.
|
|
17
21
|
|
|
18
|
-
Every finding has one of two destinations. Either it
|
|
19
|
-
stays where it is until the fix lands, or it
|
|
20
|
-
which is what the final review reads. Reviewers
|
|
21
|
-
Important or Minor, and the grade picks between the
|
|
22
|
-
for the record, and anything
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
Every finding has one of two destinations. Either it goes back to the agent
|
|
23
|
+
that wrote the code and the work stays where it is until the fix lands, or it
|
|
24
|
+
goes onto the task's record, which is what the final review reads. Reviewers
|
|
25
|
+
grade findings Critical, Important or Minor, and the grade picks between the
|
|
26
|
+
two: only Minor may wait for the record, and anything above it blocks.
|
|
27
|
+
|
|
28
|
+
The grade is the sort, and it has to be load-bearing. The alternative is you
|
|
29
|
+
reading every finding to decide where it goes, which is an adjudication pass
|
|
30
|
+
that costs more than the findings are worth and puts the coordinator back
|
|
31
|
+
inside the diff it dispatched to stay out of. A third destination is not on
|
|
32
|
+
offer, so neither is that pass.
|
|
25
33
|
|
|
26
34
|
Send findings back to the agent that wrote the code: it already holds the
|
|
27
35
|
task and its reasoning, memory you would otherwise rebuild. Three rounds is
|
|
@@ -119,8 +119,21 @@ SUMMARY="$(jq -s '
|
|
|
119
119
|
status: (.toolUseResult.status // "?"),
|
|
120
120
|
tokens: (.toolUseResult.totalTokens // 0),
|
|
121
121
|
ms: (.toolUseResult.totalDurationMs // 0),
|
|
122
|
+
# The transcript timestamps when an agent returned, not when it began,
|
|
123
|
+
# so the start is back-derived from its own duration.
|
|
124
|
+
ends: (.timestamp | ts),
|
|
125
|
+
starts: ((.timestamp | ts) - ((.toolUseResult.totalDurationMs // 0) / 1000)),
|
|
122
126
|
tools: (.toolUseResult.totalToolUseCount // 0) } ] as $agents
|
|
123
127
|
|
|
128
|
+
# Union of the agent intervals: sum the merged runs rather than the raw ones,
|
|
129
|
+
# so overlapping agents are counted once against the clock they shared.
|
|
130
|
+
| ([ $agents[] | { s: .starts, e: .ends } ] | sort_by(.s)
|
|
131
|
+
| reduce .[] as $i ([];
|
|
132
|
+
if (length == 0) or (.[-1].e < $i.s)
|
|
133
|
+
then . + [$i]
|
|
134
|
+
else .[0:-1] + [{ s: .[-1].s, e: ([.[-1].e, $i.e] | max) }] end)
|
|
135
|
+
| map(.e - .s) | add // 0) as $agent_span
|
|
136
|
+
|
|
124
137
|
| { empty: false,
|
|
125
138
|
trail: ($trail | join(" → ")),
|
|
126
139
|
elapsed: $elapsed, waiting: $waiting,
|
|
@@ -130,7 +143,10 @@ SUMMARY="$(jq -s '
|
|
|
130
143
|
out_tok: $out_tok, cache_tok: $cache_tok,
|
|
131
144
|
agents: $agents,
|
|
132
145
|
agent_tokens: ([ $agents[].tokens ] | add // 0),
|
|
133
|
-
agent_ms: ([ $agents[].ms ] | add // 0)
|
|
146
|
+
agent_ms: ([ $agents[].ms ] | add // 0),
|
|
147
|
+
concurrency: (if $agent_span > 0
|
|
148
|
+
then (([ $agents[].ms ] | add // 0) / 1000) / $agent_span
|
|
149
|
+
else 0 end) }
|
|
134
150
|
end
|
|
135
151
|
' "$TRANSCRIPT" 2>/dev/null)"
|
|
136
152
|
|
|
@@ -216,8 +232,11 @@ count=$(g '.agents | length')
|
|
|
216
232
|
if [ "$count" -eq 0 ]; then
|
|
217
233
|
printf 'agents none dispatched\n'
|
|
218
234
|
else
|
|
219
|
-
|
|
220
|
-
|
|
235
|
+
# 1.0× means every agent had the clock to itself. On a plan whose graph had
|
|
236
|
+
# independent tasks in it, that number is the finding.
|
|
237
|
+
printf 'agents %s dispatched · %s tok · %s wall · %s× concurrent\n' \
|
|
238
|
+
"$count" "$(tok "$(g '.agent_tokens')")" "$(dur "$(( $(g '.agent_ms') / 1000 ))")" \
|
|
239
|
+
"$(printf '%.1f' "$(g '.concurrency')")"
|
|
221
240
|
|
|
222
241
|
# Up to a dozen rows read as the narrative of the plan. Past that the order
|
|
223
242
|
# stops helping, so show what the run actually spent on and say what is cut.
|
package/skills/sluice/skill.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sluice",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Routes work by change shape into four channels (bypass, fast, main, deep) and applies only the rules each channel needs, so a one-line fix does not pay the cost of a multi-subsystem build. Carries seven rules as one-liners in the router and the full treatment in references read only on friction, and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what every dispatched agent cost. Claude Code only; conflicts with the superpowers plugin.",
|
|
5
5
|
"author": "iceinvein",
|
|
6
6
|
"type": "prompt",
|