@mu-crew/mu 3.3.0 → 3.4.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/README.md +45 -31
- package/dist/cli.js +186 -20
- package/dist/cli.js.map +1 -1
- package/dist/extension/mu-pi.js +103 -74
- package/dist/extension/mu-pi.js.map +1 -1
- package/dist/index.d.ts +33 -4
- package/dist/index.js +70 -4
- package/dist/index.js.map +1 -1
- package/docs/VISION.md +3 -1
- package/docs/VOCABULARY.md +4 -1
- package/docs/architecture/dag.md +3 -3
- package/docs/guide/delegate.md +30 -3
- package/docs/reference/env.md +1 -0
- package/docs/reference/naming.md +18 -0
- package/docs/specs/2026-09-29-task-substates.md +1 -1
- package/package.json +1 -1
- package/prompts/mu-debug.md +8 -0
- package/prompts/mu-sweep.md +8 -0
- package/prompts/mu-until.md +8 -0
- package/prompts/ultrathink.md +2 -1
- package/skills/mu/SKILL.md +70 -31
- package/skills/mu/recipes/adversarial-review.md +27 -19
- package/skills/mu/recipes/{triage.md → backlog-triage.md} +9 -4
- package/skills/mu/recipes/codemode-driver.md +68 -20
- package/skills/mu/recipes/deep-research.md +23 -8
- package/skills/mu/recipes/fan-out.md +15 -11
- package/skills/mu/recipes/findings.md +103 -0
- package/skills/mu/recipes/hypothesis-panel.md +18 -13
- package/skills/mu/recipes/long-run.md +4 -4
- package/skills/mu/recipes/loop-until-done.md +7 -3
- package/skills/mu/recipes/orchestrator-loop.md +38 -27
- package/skills/mu/recipes/plan.md +8 -3
- package/skills/mu/recipes/recovery.md +2 -0
- package/skills/mu/recipes/refute.md +38 -36
- package/skills/mu/recipes/remote-workers.md +7 -2
- package/skills/mu/recipes/review-panel.md +36 -31
- package/skills/mu/recipes/rules-audit.md +30 -17
- package/skills/mu/recipes/tasks-or-calls.md +67 -0
- package/skills/mu/recipes/tournament.md +13 -10
- package/skills/mu/recipes/ultrathink.md +20 -11
- package/skills/mu/recipes/watcher.md +4 -1
- package/skills/mu/recipes/waves.md +6 -5
- package/skills/mu/recipes/worker.md +3 -1
|
@@ -7,13 +7,21 @@ a claim in a draft holds. This is [refute](refute.md) applied to
|
|
|
7
7
|
sources. Workers need a web search tool (pi's `brave_search`, or
|
|
8
8
|
`curl` on docs) or the code they research.
|
|
9
9
|
|
|
10
|
+
**Mode:** delegates by default: the report is the result, and claims
|
|
11
|
+
need no permanent record. Use a workstream for a long run that must
|
|
12
|
+
survive compaction or feeds a tracked decision; then each claim the
|
|
13
|
+
answer rests on is an `OPEN/triage` task, decided like a finding
|
|
14
|
+
([findings](findings.md)).
|
|
15
|
+
|
|
10
16
|
## Steps
|
|
11
17
|
|
|
12
|
-
1. **Write the question and the bar
|
|
18
|
+
1. **Write the question and the bar**, into every searcher's brief
|
|
19
|
+
(delegate mode) or on an umbrella task (workstream mode): the exact
|
|
13
20
|
question, what a good answer contains (a recommendation, a
|
|
14
21
|
comparison table, a yes/no with conditions), and how fresh sources
|
|
15
22
|
must be.
|
|
16
|
-
2. **Split by angle**, one
|
|
23
|
+
2. **Split by angle**, one searcher per angle (delegates; tasks only in
|
|
24
|
+
workstream mode): official docs,
|
|
17
25
|
changelogs and release notes, issue trackers, independent write-ups,
|
|
18
26
|
the code itself. Each searcher reads, fetches, and writes claims to
|
|
19
27
|
its note, one per line:
|
|
@@ -24,16 +32,23 @@ sources. Workers need a web search tool (pi's `brave_search`, or
|
|
|
24
32
|
|
|
25
33
|
A claim without a source and a quote is not a claim. Searchers can
|
|
26
34
|
run on a cheap model.
|
|
27
|
-
3. **Dedupe claims
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
3. **Dedupe claims**: merge the same fact from several sources (keep
|
|
36
|
+
every source), and flag claims that contradict each other. In
|
|
37
|
+
workstream mode, each surviving claim becomes an `OPEN/triage` task
|
|
38
|
+
titled with the claim, its sources and quotes in the note.
|
|
39
|
+
4. **One checker per claim** that the answer depends on, as a
|
|
40
|
+
[delegate call](tasks-or-calls.md#delegate-call) in both modes. The checker
|
|
31
41
|
gets the claim and its sources, not the searcher's reasoning, fetches
|
|
32
42
|
the source itself, and tries to break the claim: is the quote there,
|
|
33
43
|
does it say that, is it current, does another source disagree? It
|
|
34
44
|
ends with `VERDICT: c4 CONFIRMED | REFUTED | UNVERIFIED <evidence>`.
|
|
35
|
-
For contradicted claims, one checker per side.
|
|
36
|
-
|
|
45
|
+
For contradicted claims, one checker per side. Batch under the cap
|
|
46
|
+
([orchestrator-loop § Concurrency](orchestrator-loop.md#concurrency)). In workstream mode the
|
|
47
|
+
verdict is the claim task's state: `accept` for confirmed,
|
|
48
|
+
`close --as rejected` for refuted, an `UNVERIFIED:` note in triage
|
|
49
|
+
otherwise.
|
|
50
|
+
5. **Synthesize** once every checker has answered (in workstream mode,
|
|
51
|
+
when no claim task is left undecided): answer the question
|
|
37
52
|
from confirmed claims only, each with its source URL. List
|
|
38
53
|
unverified claims separately. Note what the sources disagree on and
|
|
39
54
|
which side the evidence favours.
|
|
@@ -6,7 +6,7 @@ some and calls the job done; one task per unit cannot.
|
|
|
6
6
|
|
|
7
7
|
## Steps
|
|
8
8
|
|
|
9
|
-
1. **Enumerate first
|
|
9
|
+
1. **Enumerate first.** A scout (a [delegate call](tasks-or-calls.md#delegate-call)) lists the units and
|
|
10
10
|
writes them to the umbrella's note, one per line. The list is done
|
|
11
11
|
when it matches a command the scout ran (`rg -l`, a test listing),
|
|
12
12
|
not when it looks complete. Record the command and the count.
|
|
@@ -18,19 +18,23 @@ some and calls the job done; one task per unit cannot.
|
|
|
18
18
|
mu task block sweep -w <ws> --by sweep_auth_ts
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Put the shared brief and acceptance criteria on the
|
|
22
|
-
unit task's note holds only what differs.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
Put the shared [brief](brief.md) and acceptance criteria on the
|
|
22
|
+
umbrella; each unit task's note holds only what differs. A sweep that
|
|
23
|
+
only checks (no commits) makes each unit a delegate call instead
|
|
24
|
+
([tasks-or-calls](tasks-or-calls.md)).
|
|
25
|
+
3. **Cap concurrency** ([orchestrator-loop § Concurrency](orchestrator-loop.md#concurrency)).
|
|
26
|
+
Spawn at most one agent per ready track. Tell workers to avoid
|
|
27
|
+
repo-wide commands so more can run.
|
|
28
|
+
4. **Pipeline.** Dispatch, wait `--first`, merge
|
|
29
|
+
([orchestrator-loop § Merging](orchestrator-loop.md#merging)), dispatch
|
|
30
|
+
the next unit to the freed worker with `--fresh`. With `codemode`, a
|
|
31
|
+
[driver](codemode-driver.md) can dispatch each batch. Units that touch the same files
|
|
28
32
|
go on one track (see [waves](waves.md)).
|
|
29
33
|
5. **Review per unit** when a wrong unit is costly: add a review task
|
|
30
34
|
per unit ([adversarial-review](adversarial-review.md)).
|
|
31
|
-
6. **Synthesize** when the output is a report, not commits:
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
6. **Synthesize** when the output is a report, not commits: one
|
|
36
|
+
delegate call reads the unit notes (not transcripts) and writes one
|
|
37
|
+
result into the umbrella's note.
|
|
34
38
|
|
|
35
39
|
Done when `mu task close sweep --if-ready` closes the umbrella: every
|
|
36
40
|
unit is closed, and the closed count matches the step 1 count.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Findings
|
|
2
|
+
|
|
3
|
+
Use whenever an agent reviews, audits, checks, or researches something
|
|
4
|
+
and reports problems: every recipe that produces findings follows this
|
|
5
|
+
one. It decides where findings live, and how they become work.
|
|
6
|
+
|
|
7
|
+
## Pick the mode first
|
|
8
|
+
|
|
9
|
+
Ask: **will anyone act on these findings through the DAG?**
|
|
10
|
+
|
|
11
|
+
| Situation | Mode | Findings live in |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| The result is read once and acted on directly: PR comments, doc edits, a go/no-go, a draft fact-check | **Delegate** | the delegate's answer |
|
|
14
|
+
| Findings become work agents fix, or must be tracked to closure | **Workstream** | one `OPEN/triage` task per finding |
|
|
15
|
+
|
|
16
|
+
Delegate mode keeps reviews of other people's PRs and docs out of the
|
|
17
|
+
ops log, which is permanent and syncs to every machine. Workstream mode
|
|
18
|
+
is the mu way for your own work: the graph shows every finding, who
|
|
19
|
+
decided it, and the fix.
|
|
20
|
+
|
|
21
|
+
## Delegate mode
|
|
22
|
+
|
|
23
|
+
1. Run reviewers as [delegate calls](tasks-or-calls.md#delegate-call):
|
|
24
|
+
one per angle or slice, all in one turn so they run in parallel,
|
|
25
|
+
under the cap ([orchestrator-loop § Concurrency](orchestrator-loop.md#concurrency)).
|
|
26
|
+
2. Each delegate ends its answer with one line per finding:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
FINDING: high src/api/user.ts:88 PUT handler skips the auth check EVIDENCE: curl -X PUT ... returned 200
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. You read the answers, merge duplicates, and act: post the comments,
|
|
33
|
+
edit the doc, give the verdict.
|
|
34
|
+
4. **Promote** when the findings turn out to be work: create one
|
|
35
|
+
`OPEN/triage` task per line (below) and continue in workstream mode.
|
|
36
|
+
|
|
37
|
+
Done when every delegate answered and every finding line was acted on
|
|
38
|
+
or dropped with a reason.
|
|
39
|
+
|
|
40
|
+
## Workstream mode
|
|
41
|
+
|
|
42
|
+
### Record
|
|
43
|
+
|
|
44
|
+
The reviewer records each finding as a task in triage, blocking the
|
|
45
|
+
review's umbrella so the umbrella cannot close while findings are
|
|
46
|
+
undecided:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
mu task add -w <ws> --triage \
|
|
50
|
+
-t "high: PUT /user skips the auth check" -i 70 -e 0.5 \
|
|
51
|
+
--note 'FINDING: high src/api/user.ts:88 PUT skips the auth check EVIDENCE: curl -X PUT ... returned 200 without a token'
|
|
52
|
+
mu task block <umbrella> -w <ws> --by <finding-id>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The title starts with the severity. The note is one `FINDING:` line,
|
|
56
|
+
the same shape everywhere: `FINDING: <severity> <file:line> <what>
|
|
57
|
+
EVIDENCE: <command + output>`. `OPEN/triage` keeps the finding out of `mu task next`, and
|
|
58
|
+
`claim` refuses it, so no worker starts on an undecided finding.
|
|
59
|
+
|
|
60
|
+
**More than 5 findings from one reviewer:** the reviewer writes them as
|
|
61
|
+
`FINDING:` lines in its own task note instead. Before that reviewer
|
|
62
|
+
task closes, the orchestrator adds `triage_<umbrella>` blocking the
|
|
63
|
+
umbrella; the triage agent ([Triage](#triage) step 1) merges duplicates
|
|
64
|
+
across reviewers and creates one task per real problem.
|
|
65
|
+
|
|
66
|
+
### Triage
|
|
67
|
+
|
|
68
|
+
1. **Who:** a handful of findings, the orchestrator triages itself. Many,
|
|
69
|
+
or several reviewers on one change: a `triage_<umbrella>` task, run
|
|
70
|
+
by a fresh agent, so the orchestrator reads only its result.
|
|
71
|
+
2. **Refute** each finding before accepting it with a
|
|
72
|
+
[delegate call](tasks-or-calls.md#delegate-call): a fresh agent tries
|
|
73
|
+
to prove it false and ends with
|
|
74
|
+
`VERDICT: <id> CONFIRMED | REFUTED | UNVERIFIED <evidence>`. Skip this
|
|
75
|
+
for low-severity style findings. High severity: three refuters,
|
|
76
|
+
accept only if at least two say CONFIRMED.
|
|
77
|
+
3. **Decide** each one; the decision is the task's state:
|
|
78
|
+
|
|
79
|
+
| Decision | Command |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| real work | `mu task accept <id> --evidence '<what confirmed it>'` |
|
|
82
|
+
| false | `mu task close <id> --as rejected --why '<evidence>'` |
|
|
83
|
+
| same as another | `mu task close <id> --as duplicate --why 'same as <id>'` |
|
|
84
|
+
| valid, not worth it | `mu task close <id> --as wontfix --why '<reason>'` |
|
|
85
|
+
| could not check | stays in triage, with an `UNVERIFIED: <why>` note |
|
|
86
|
+
|
|
87
|
+
4. **Group** accepted findings that touch the same files into one fix
|
|
88
|
+
task when separate workers would collide; close the grouped findings
|
|
89
|
+
`--as superseded --why 'fixed in <fix-task>'`.
|
|
90
|
+
|
|
91
|
+
Done when `mu task list --substate triage -w <ws>` lists only findings
|
|
92
|
+
with an `UNVERIFIED` note, and each of those is reported to the human.
|
|
93
|
+
|
|
94
|
+
### Fix and close
|
|
95
|
+
|
|
96
|
+
Accepted findings are ordinary tasks: dispatch them, review the fix
|
|
97
|
+
([adversarial-review](adversarial-review.md)), merge. The umbrella
|
|
98
|
+
closes with `mu task close <umbrella> --if-ready` once every finding is
|
|
99
|
+
`CLOSED/*`. A plain `close` would succeed with findings still open.
|
|
100
|
+
|
|
101
|
+
The report is a query, not a document: `mu task list -w <ws>
|
|
102
|
+
--substate rejected`, `--substate duplicate`, `--status OPEN`, and the
|
|
103
|
+
notes on each task.
|
|
@@ -9,19 +9,23 @@ form independent theories; separate agents then try to kill them.
|
|
|
9
9
|
|
|
10
10
|
1. **Write the symptom** on the umbrella: what happens, how often, the
|
|
11
11
|
repro command, and what would count as fixed.
|
|
12
|
-
2. **One
|
|
13
|
-
recent commits, data, environment. Each
|
|
14
|
-
so the theories do not anchor on each other.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
2. **One reader per evidence source** (a [delegate call](tasks-or-calls.md#delegate-call)): logs, the
|
|
13
|
+
code path, recent commits, data, environment. Each sees only its
|
|
14
|
+
source, so the theories do not anchor on each other. Record each
|
|
15
|
+
theory as an `OPEN/triage` task blocking the umbrella, decided like
|
|
16
|
+
a finding ([findings § Triage](findings.md#triage)):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
mu task add -w <ws> --triage -t "h: <cause>" -i 60 -e 0.5 \
|
|
20
|
+
--note 'PREDICTS: <an observation true if this is the cause, false otherwise>'
|
|
19
21
|
```
|
|
20
22
|
|
|
21
|
-
3. **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
3. **Test each hypothesis.** An experiment that changes code (force the
|
|
24
|
+
race, revert the commit) needs a workspace: `mu task accept` the
|
|
25
|
+
hypothesis and dispatch it as a task. One that only reads (feed the
|
|
26
|
+
data, grep the logs) is a delegate call. A killed hypothesis closes
|
|
27
|
+
`--as rejected --why '<evidence>'`; a survivor gets a
|
|
28
|
+
`SURVIVED: <evidence>` note.
|
|
25
29
|
4. **If one survives**, add a fix task for it, then a review task
|
|
26
30
|
([adversarial-review](adversarial-review.md)). The fix is accepted
|
|
27
31
|
only if the step 1 repro stops reproducing.
|
|
@@ -29,12 +33,13 @@ form independent theories; separate agents then try to kill them.
|
|
|
29
33
|
([loop-until-done](loop-until-done.md)): the new hypothesis tasks get
|
|
30
34
|
the killed hypotheses and their evidence as input.
|
|
31
35
|
|
|
32
|
-
Done when
|
|
36
|
+
Done when the fix's review task is `CLOSED/done` (ACCEPT) and the
|
|
37
|
+
repro from step 1 no longer
|
|
33
38
|
reproduces at the rate step 1 recorded.
|
|
34
39
|
|
|
35
40
|
## Traps
|
|
36
41
|
|
|
37
42
|
- **Two survivors** usually means the experiments were too weak. Design
|
|
38
43
|
one experiment that separates them before you fix either.
|
|
39
|
-
- **Flaky repros need counts
|
|
44
|
+
- **Flaky repros need counts** ([long-run](long-run.md) step 1). "Passed once" proves nothing for a 1 in
|
|
40
45
|
50 failure. Put the run count in step 1.
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
Use when a task or proof runs for hours, crosses context compaction,
|
|
4
4
|
or may hit flakes.
|
|
5
5
|
|
|
6
|
-
1. **
|
|
6
|
+
1. **Define done first.** Before dispatch, write the completion criterion
|
|
7
7
|
into the task note: the checks, how many runs must agree, the
|
|
8
8
|
allowed variance. A worker that finds the bar in the note stops at
|
|
9
9
|
the bar, not at the first green.
|
|
10
|
-
2. **Split into independent units
|
|
10
|
+
2. **Split into independent units** ([fan-out](fan-out.md)). Shard a long proof into tasks
|
|
11
11
|
that run in parallel, so one flake restarts only its unit. Each unit
|
|
12
12
|
carries its own criterion.
|
|
13
13
|
3. **Keep state in the DB.** Progress lives in task notes, not in the
|
|
14
14
|
orchestrator's context. After a compaction, `mu state` and
|
|
15
15
|
`mu task notes <id>` are the whole picture.
|
|
16
|
-
4. **Accept evidence, not close notes
|
|
17
|
-
|
|
16
|
+
4. **Accept evidence, not close notes**
|
|
17
|
+
([orchestrator-loop § Merging](orchestrator-loop.md#merging)).
|
|
18
18
|
|
|
19
19
|
Done when every unit is `CLOSED/done` and the criterion from step 1
|
|
20
20
|
holds on the merged tree.
|
|
@@ -15,14 +15,18 @@ written down first does neither.
|
|
|
15
15
|
NO-PROGRESS: two rounds in a row reduce the error count by zero
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
2. **Each round is a task
|
|
18
|
+
2. **Each round is a task** that blocks the umbrella and is blocked by
|
|
19
|
+
the previous round:
|
|
19
20
|
`round_1`, `round_2`, .... Add the next round only when the current
|
|
20
|
-
one closes; never pre-create rounds.
|
|
21
|
+
one closes; never pre-create rounds. Dispatch each per
|
|
22
|
+
[orchestrator-loop](orchestrator-loop.md); multi-hour loops follow
|
|
23
|
+
[long-run](long-run.md).
|
|
21
24
|
3. **Each round ends with its measurement** in the note:
|
|
22
25
|
`MEASURE: 14 errors (was 31)`, or `NEW: 0 flaky tests`.
|
|
23
26
|
4. **After each round, check the rule** yourself, from the measurement
|
|
24
27
|
command, not from the worker's note.
|
|
25
|
-
- Rule met: close
|
|
28
|
+
- Rule met: `mu task close <umbrella> --if-ready --evidence '<stop
|
|
29
|
+
command + result>'` (each round blocks the umbrella).
|
|
26
30
|
- No progress: stop the loop and decide. Change the approach, split
|
|
27
31
|
the work, or park the umbrella with
|
|
28
32
|
`mu task park <umbrella> --why '<what is stuck>'` and tell the human.
|
|
@@ -8,42 +8,53 @@ the loop and the reasons behind them.
|
|
|
8
8
|
|
|
9
9
|
1. `mu state -w <ws>` — read agents, IN_PROGRESS, ready tasks,
|
|
10
10
|
parallel tracks.
|
|
11
|
-
2. Spawn at most one agent per independent ready track.
|
|
11
|
+
2. Spawn at most one agent per independent ready track ([waves](waves.md)
|
|
12
|
+
when workers share files).
|
|
12
13
|
3. **Claim before sending — even one-shot reviewers/scouts.**
|
|
13
14
|
`mu task claim <id> -w <ws> --for <agent> --evidence "..."`.
|
|
14
15
|
If no task exists, `mu task add` first (`--note 'REPRO: ...'` when
|
|
15
16
|
the title is not enough). Ownership is durable and waitable; agent
|
|
16
|
-
state is not.
|
|
17
|
-
4.
|
|
18
|
-
session + prompt in one step;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
5. End with a loud final-action block:
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
⚠️ FINAL ACTION
|
|
26
|
-
git commit -am '...' THEN
|
|
27
|
-
mu task close <id> -w <ws> --evidence '...'
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
6. `mu task wait ... --first --on-stall exit --json`.
|
|
31
|
-
7. Cherry-pick the closed worker's **new** commit(s), verify the MERGE,
|
|
17
|
+
state is not. Review tasks: [adversarial-review](adversarial-review.md).
|
|
18
|
+
4. Run `mu workspace refresh <w>`, then send a [brief](brief.md) with
|
|
19
|
+
`mu agent send <w> --fresh '...'` (new session + prompt in one step;
|
|
20
|
+
refuses while busy). The brief ends with its final-action block.
|
|
21
|
+
5. `mu task wait ... --first --on-stall exit --json`.
|
|
22
|
+
6. Cherry-pick the closed worker's **new** commit(s), verify the MERGE,
|
|
32
23
|
then continue the loop in the same turn. Do not barrier or loop in
|
|
33
24
|
shell.
|
|
34
25
|
Only `CLOSED/done` ships; other closes: read the reason note.
|
|
35
|
-
|
|
26
|
+
7. Repeat from `mu state`.
|
|
27
|
+
|
|
28
|
+
## Concurrency
|
|
29
|
+
|
|
30
|
+
Write the ceiling on the umbrella before the first wave
|
|
31
|
+
(`CONCURRENCY: delegates 12, workers 4`) so a resumed orchestrator
|
|
32
|
+
keeps it.
|
|
33
|
+
|
|
34
|
+
- **[Delegate calls](tasks-or-calls.md#delegate-call)** (read-only): 10 to 20 at once is reasonable.
|
|
35
|
+
Token spend and provider rate limits bind first; start near 8 and
|
|
36
|
+
raise after a clean wave. `mu_delegate` refuses past
|
|
37
|
+
`MU_DELEGATE_MAX` (default 16).
|
|
38
|
+
- **Workers with workspaces** build and test: about one per CPU core,
|
|
39
|
+
fewer when each runs the full suite. A remote host has its own
|
|
40
|
+
session cap ([remote-workers](remote-workers.md)).
|
|
41
|
+
- **Stream, do not batch.** Keep the pool full: dispatch the next unit
|
|
42
|
+
when one closes, rather than waiting for a whole wave. With the
|
|
43
|
+
`codemode` tool, a [driver](codemode-driver.md) can dispatch a batch
|
|
44
|
+
of workers in one script.
|
|
36
45
|
|
|
37
46
|
## Waiting
|
|
38
47
|
|
|
39
48
|
Use `--first --on-stall exit`: `--first` populates `.firing`, and
|
|
40
49
|
`--on-stall exit` stops an unattended wait when a worker needs attention.
|
|
41
|
-
Exit 6
|
|
50
|
+
Exit 6: the owner's pane died and the reaper reopened the task; exit 7:
|
|
51
|
+
the owner sat in `needs_input`. Read that
|
|
42
52
|
pane (`mu agent read <owner>`) and answer: the worker may be waiting on
|
|
43
|
-
you.
|
|
53
|
+
you.
|
|
44
54
|
|
|
45
55
|
For an idle worker, read the pane, then answer, retry, or release its
|
|
46
|
-
task. `MU_IDLE_THRESHOLD_MS` defaults to 5m.
|
|
56
|
+
task. `MU_IDLE_THRESHOLD_MS` defaults to 5m. A remote owner: poll once
|
|
57
|
+
per turn ([remote-workers](remote-workers.md#step-5-poll-once-per-turn)).
|
|
47
58
|
|
|
48
59
|
## Merging
|
|
49
60
|
|
|
@@ -51,10 +62,10 @@ task. `MU_IDLE_THRESHOLD_MS` defaults to 5m.
|
|
|
51
62
|
new commits, verify, dispatch the next. An umbrella wait hides progress;
|
|
52
63
|
merging stale branches can restore reverted code.
|
|
53
64
|
- **Verify the merge, not the worker's rerun.** Only the combination
|
|
54
|
-
with moved main is new
|
|
55
|
-
|
|
56
|
-
- **Push only
|
|
57
|
-
`set -e`. Check the gate runs what it claims: an env-gated randomized
|
|
65
|
+
with moved main is new, and it breaks in ways the worker's own run
|
|
66
|
+
cannot show. Remote hosts: [run the merged gate there](remote-workers.md#run-the-merged-gate-on-the-host).
|
|
67
|
+
- **Push only when the gate command passes.** Make `git push` the last
|
|
68
|
+
line under `set -e`. Check the gate command runs what it claims: an env-gated randomized
|
|
58
69
|
test once passed with zero cases.
|
|
59
70
|
- **Accept evidence, not close notes.** Re-run the key measurement from
|
|
60
71
|
a clean checkout; close notes have claimed unpushed commits. A
|
|
@@ -63,8 +74,6 @@ task. `MU_IDLE_THRESHOLD_MS` defaults to 5m.
|
|
|
63
74
|
no is not evidence: a test filtered to zero cases, a script you wrote
|
|
64
75
|
agreeing with itself, a fixture you tuned on. A nonzero diff is a
|
|
65
76
|
failure even when the command exited 0.
|
|
66
|
-
- **Dispatch from current main.** Reset the worker's worktree to main
|
|
67
|
-
before each task.
|
|
68
77
|
|
|
69
78
|
## Sending
|
|
70
79
|
|
|
@@ -85,3 +94,5 @@ task. `MU_IDLE_THRESHOLD_MS` defaults to 5m.
|
|
|
85
94
|
context, waits for idle; exit 5 = still busy; queued follow-ups return
|
|
86
95
|
to the editor unsent). Then `mu agent kick` (pi unresponsive, or
|
|
87
96
|
non-pi; local panes only), then `mu agent close`.
|
|
97
|
+
|
|
98
|
+
Done when every task is closed, or a decision only a human can make blocks all progress (SKILL.md § Orchestrator rules).
|
|
@@ -17,9 +17,12 @@ human asks for a file.
|
|
|
17
17
|
in two or three sentences, and the global constraints copied
|
|
18
18
|
verbatim from the spec. Every other task is blocked by it; close it
|
|
19
19
|
at once. It carries notes, not work.
|
|
20
|
-
4. **Write each task's note** as a [brief](brief.md):
|
|
20
|
+
4. **Write each task's note** as a [brief](brief.md): its Shape, plus
|
|
21
|
+
INTERFACES and STEPS:
|
|
21
22
|
|
|
22
23
|
```text
|
|
24
|
+
GOAL: one sentence
|
|
25
|
+
DONE WHEN: checkable, exhaustive criterion
|
|
23
26
|
FILES: Create/Modify/Test with exact paths (line ranges if known)
|
|
24
27
|
INTERFACES: Consumes: <exact signatures from earlier tasks>
|
|
25
28
|
Produces: <exact names and types later tasks use>
|
|
@@ -35,14 +38,16 @@ human asks for a file.
|
|
|
35
38
|
of order.
|
|
36
39
|
6. **Add edges for dependencies only.** `mu task block A --by B` when A
|
|
37
40
|
consumes what B produces. Plan order is not a dependency: an extra
|
|
38
|
-
edge serialises tracks that could run in parallel.
|
|
41
|
+
edge serialises tracks that could run in parallel. The exception:
|
|
42
|
+
tasks that edit the same files share a track ([waves](waves.md)).
|
|
39
43
|
7. **Self-review before dispatch.** Walk each spec requirement and name
|
|
40
44
|
the task that implements it. Grep the notes for placeholders. Check
|
|
41
45
|
that names in INTERFACES match across tasks. Then read the graph back
|
|
42
46
|
with `mu task tree task_0 -w <ws> --down`, or `mu state -w <ws>` for the tracks.
|
|
43
47
|
|
|
44
48
|
Done when every spec requirement maps to a task, no note holds a
|
|
45
|
-
placeholder, and `mu state` shows the intended parallel tracks.
|
|
49
|
+
placeholder, and `mu state` shows the intended parallel tracks. Then
|
|
50
|
+
dispatch per [orchestrator-loop](orchestrator-loop.md).
|
|
46
51
|
|
|
47
52
|
## Notes
|
|
48
53
|
|
|
@@ -24,3 +24,5 @@ when done in the wrong order.
|
|
|
24
24
|
- The `doctor` `disk` section is report-only: an orphan dir may hold the
|
|
25
25
|
only copy of uncommitted work, so mu prints cleanup commands and runs
|
|
26
26
|
none. Read before you run them.
|
|
27
|
+
|
|
28
|
+
Done when `mu doctor` reports no DRIFT and every cleanup command you ran was read first.
|
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
# Find, refute, synthesize
|
|
2
2
|
|
|
3
|
-
Use for audits, bug sweeps,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[
|
|
3
|
+
Use for audits, bug sweeps, and fact-checks: anything that produces
|
|
4
|
+
findings. Finders over-report; a separate agent told to kill each
|
|
5
|
+
finding filters what survives. Where findings live and how triage works
|
|
6
|
+
is [findings](findings.md); this recipe is the search around it. Builds
|
|
7
|
+
on [fan-out](fan-out.md).
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
integrity, one module each). One finder task per slice. Finders read;
|
|
12
|
-
they do not fix.
|
|
13
|
-
2. **Finders write structured findings** to their task note, one line
|
|
14
|
-
each:
|
|
9
|
+
**Mode:** workstream by default (an audit feeds fixes). For a quick
|
|
10
|
+
fact-check nobody will track, use delegate mode from
|
|
11
|
+
[findings](findings.md) and skip the tasks.
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
FINDING: f3 src/routes/user.ts:42 high: handler skips the auth check on PUT
|
|
18
|
-
```
|
|
13
|
+
## Steps
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
1. **Pin the scope** on an umbrella task: what is searched, and what
|
|
16
|
+
counts as a finding.
|
|
17
|
+
2. **Split the search** into slices (security, data integrity, one
|
|
18
|
+
module each). One finder task per slice. Finders read; they do not
|
|
19
|
+
fix.
|
|
20
|
+
3. **Finders record findings** as `OPEN/triage` tasks blocking the
|
|
21
|
+
umbrella, one per finding, severity first in the title, file:line and
|
|
22
|
+
evidence in the note ([findings § Record](findings.md#record)). A
|
|
23
|
+
finder with more than 5 writes `FINDING:` lines in its own note
|
|
24
|
+
instead, and [findings § Triage](findings.md#triage) turns them into
|
|
25
|
+
tasks.
|
|
26
|
+
4. **Refute each finding** with a
|
|
27
|
+
[delegate call](tasks-or-calls.md#delegate-call), not a task. The
|
|
24
28
|
refuter gets the finding and the code, not the finder's reasoning,
|
|
25
29
|
and tries to prove it false: run it, find the guard, read the caller.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
only
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Done when every finding id from step 3 has a verdict line, and the
|
|
39
|
-
synthesis task closed.
|
|
30
|
+
Record its verdict on the finding, and apply the skip and
|
|
31
|
+
three-refuter rules, as in [findings § Triage](findings.md#triage).
|
|
32
|
+
Many findings: issue the calls in batches under the cap ([orchestrator-loop § Concurrency](orchestrator-loop.md#concurrency)); to
|
|
33
|
+
get the verdicts back as one table, see
|
|
34
|
+
[codemode-driver § Delegate calls](codemode-driver.md#delegate-calls).
|
|
35
|
+
5. **Report** from the graph: accepted findings are the result, ranked
|
|
36
|
+
by impact; `mu task list --substate rejected` is what was refuted.
|
|
37
|
+
A synthesis task is needed only when the human wants prose.
|
|
38
|
+
|
|
39
|
+
Done when no finding is left in triage without an `UNVERIFIED` note,
|
|
40
|
+
and the umbrella closes with `--if-ready` once the accepted findings
|
|
41
|
+
are fixed or handed off.
|
|
40
42
|
|
|
41
43
|
## Traps
|
|
42
44
|
|
|
43
45
|
- **UNVERIFIED is not REFUTED.** A refuter that hit a rate limit or
|
|
44
|
-
could not run the code
|
|
45
|
-
|
|
46
|
-
- **Cheap finders, strong refuters.** Finders can run on `pi_mini`;
|
|
47
|
-
|
|
46
|
+
could not run the code disproved nothing. The finding stays in triage
|
|
47
|
+
with an `UNVERIFIED:` note, reported apart.
|
|
48
|
+
- **Cheap finders, strong refuters.** Finders can run on `pi_mini`; the
|
|
49
|
+
refute step is where the judgement is (`pi_big`).
|
|
48
50
|
- **No findings is a result.** A slice that finds nothing closes with
|
|
49
51
|
that in its note; do not re-run it until it finds something.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Remote workers
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Use when an agent's process runs on another machine (a devserver, a
|
|
4
|
+
bigger box) while its pane stays local. mu has no remote backend, ssh
|
|
5
|
+
code, or host registry. This is a recipe plus the traps that cost time.
|
|
5
6
|
|
|
6
7
|
**If you read one thing:** on a session-capped host, an open attach pane
|
|
7
8
|
holds the only ssh channel and silently breaks `git fetch`,
|
|
@@ -49,6 +50,10 @@ mu agent send worker-1 -w big --fresh '...'
|
|
|
49
50
|
git fetch "ssh://dev/~/ws/worker-1" HEAD && git cherry-pick FETCH_HEAD
|
|
50
51
|
```
|
|
51
52
|
|
|
53
|
+
Done when the worker's commits are cherry-picked locally, the merged
|
|
54
|
+
tree passes the gate command (on the host, below), and the pane is
|
|
55
|
+
closed.
|
|
56
|
+
|
|
52
57
|
### Step 2: the note is load-bearing
|
|
53
58
|
|
|
54
59
|
Keep the exact forms `REMOTE: <host>:<path>` and
|