@alexeiled/pi-fusion 0.5.2 → 0.6.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 +22 -9
- package/agents/fusion-composer.md +49 -0
- package/agents/fusion-judge.md +7 -0
- package/agents/fusion-panelist-full.md +53 -0
- package/agents/fusion-panelist-web.md +41 -0
- package/agents/fusion-panelist.md +2 -0
- package/docs/user-guide.md +200 -19
- package/package.json +1 -1
- package/skills/fusion-review/SKILL.md +69 -18
- package/src/commands.ts +1 -0
- package/src/config.ts +167 -5
- package/src/fusion-args.ts +36 -2
- package/src/index.ts +11 -2
- package/src/orchestrator.ts +75 -14
- package/src/panel-completion.ts +17 -6
- package/src/report.ts +233 -78
- package/src/run-builder.ts +242 -26
- package/src/run-store.ts +31 -0
- package/src/types.ts +89 -1
package/README.md
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
> Parallel models. One judge. Better answers.
|
|
9
9
|
|
|
10
10
|
`pi-fusion` is a Pi extension for hard technical questions.
|
|
11
|
-
It
|
|
12
|
-
|
|
11
|
+
It sends one prompt to a small panel of models that run in parallel.
|
|
12
|
+
A judge agent then compares the answers and returns the best realistic one.
|
|
13
13
|
|
|
14
14
|
CI covers lint, typecheck, unit tests, integration tests, package smoke tests,
|
|
15
15
|
and `npm pack --dry-run`.
|
|
@@ -122,7 +122,7 @@ synthesize the best realistic answer.
|
|
|
122
122
|
|
|
123
123
|
Use it for questions like:
|
|
124
124
|
|
|
125
|
-
- Which design
|
|
125
|
+
- Which design do we choose?
|
|
126
126
|
- What will break if I change this?
|
|
127
127
|
- Is this PR or release flow safe?
|
|
128
128
|
- What did I miss?
|
|
@@ -136,6 +136,7 @@ Do not use it for trivial edits, formatting, or obvious one-step fixes.
|
|
|
136
136
|
/fusion
|
|
137
137
|
/fusion <prompt>
|
|
138
138
|
/fusion --profile <name> <prompt>
|
|
139
|
+
/fusion --panel <models> <prompt>
|
|
139
140
|
/fusion -p <name> <prompt>
|
|
140
141
|
/fusion status
|
|
141
142
|
/fusion stop
|
|
@@ -155,11 +156,11 @@ Other Pi extensions can control Fusion through the versioned event-bus contract
|
|
|
155
156
|
Methods:
|
|
156
157
|
|
|
157
158
|
- `ping` — return the RPC version and supported methods
|
|
158
|
-
- `start` — requires `prompt` and a non-empty `operationId
|
|
159
|
+
- `start` — requires `prompt` and a non-empty `operationId`. It accepts an optional `profile`. Reusing an operation ID returns the original run instead of starting another, including after Fusion restores the Pi session history.
|
|
159
160
|
- `status` — return structured run state by `operationId`, `runId`, or the current/last run
|
|
160
|
-
- `result` — return a terminal run and report
|
|
161
|
+
- `result` — return a terminal run and report. An active run returns `not_ready`
|
|
161
162
|
- `cancel` — cancel the selected active run, or report that the selected terminal run was not cancelled
|
|
162
|
-
- `adopt` —
|
|
163
|
+
- `adopt` — verify and return a run from restored session history by `runId`
|
|
163
164
|
|
|
164
165
|
`start` returns `{ operationId, replayed, run }`. `status` and `result`
|
|
165
166
|
return `{ run }`. `cancel` returns `{ cancelled, run? }`. `adopt` returns
|
|
@@ -183,6 +184,13 @@ pi install npm:pi-subagents
|
|
|
183
184
|
pi install npm:@alexeiled/pi-fusion
|
|
184
185
|
```
|
|
185
186
|
|
|
187
|
+
Optional. Only needed if a panel member uses the `fusion-panelist-web` or
|
|
188
|
+
`fusion-panelist-full` agent:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
pi install npm:pi-web-providers
|
|
192
|
+
```
|
|
193
|
+
|
|
186
194
|
Then reload Pi:
|
|
187
195
|
|
|
188
196
|
```text
|
|
@@ -199,10 +207,15 @@ For commands, config, and troubleshooting details, see [`docs/user-guide.md`](./
|
|
|
199
207
|
- Output appears as a Pi custom message. Active progress also uses the `fusion` status key.
|
|
200
208
|
- Active runs are reconciled from `pi-subagents` lifecycle artifacts, not only completion events.
|
|
201
209
|
- `pi-fusion` does not own the footer.
|
|
202
|
-
-
|
|
203
|
-
- Reports include available per-panel and judge time, aggregate model time, usage, estimated cost, and model failure details. Missing provider usage is shown as unknown
|
|
204
|
-
- `Model` is lifecycle metadata. `Configured model` is the profile request
|
|
210
|
+
- Fusion sends your prompt and any inspected snippets to every panel model, and to the judge, through `pi-subagents`.
|
|
211
|
+
- Reports include available per-panel and judge time, aggregate model time, usage, estimated cost, and model failure details. Missing provider usage is shown as unknown. `$0.0000` is a known zero cost.
|
|
212
|
+
- `Model` is lifecycle metadata. `Configured model` is the profile request. Both appear when the run differs from the request.
|
|
205
213
|
- `stopWhenPanelAgrees` is an opt-in profile setting. It requires matching high-confidence decision records with no request for more evidence, stops only unfinished panelists, and still runs the judge.
|
|
214
|
+
- Panel answers reach the judge in an order seeded from the run id, not in config order. A fixed order advantages the same member on every run, because judges favour whichever candidate they see first or last.
|
|
215
|
+
- Panelists can search the web by opting in to the `fusion-panelist-web` agent, which requires `pi-web-providers`. Defaults stay local-only on purpose: tool names are a strict allowlist, so an agent declaring a tool whose extension is missing fails every task that uses it.
|
|
216
|
+
- `synthesis: "merge"` switches from picking the best answer to merging answers that covered different facets, using the `fusion-composer` agent. Panel members get facets through their optional `question` field. See the user guide.
|
|
217
|
+
- `blindPanelLabels` hides member names, roles, agents, and artifact paths from the judge, so role labels stop acting as authority cues. Your report still shows real names.
|
|
218
|
+
- `fusion-panelist-full` grants `bash`, `edit`, and `write`. It is opt-in, it voids the read-only property the other agents have, and it is unsafe at `concurrency > 1` because panelists share one working directory.
|
|
206
219
|
|
|
207
220
|
## Read more
|
|
208
221
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fusion-composer
|
|
3
|
+
package: pi-fusion
|
|
4
|
+
description: Merges panel answers that covered different facets of one task.
|
|
5
|
+
tools: read, grep, find, ls
|
|
6
|
+
systemPromptMode: replace
|
|
7
|
+
inheritProjectContext: true
|
|
8
|
+
inheritSkills: false
|
|
9
|
+
defaultContext: fresh
|
|
10
|
+
completionGuard: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are the pi-fusion composer.
|
|
14
|
+
|
|
15
|
+
The panelists did not answer the same question. Each was assigned a different
|
|
16
|
+
facet of one task. Your job is to **merge** their answers into one, not to pick
|
|
17
|
+
a winner.
|
|
18
|
+
|
|
19
|
+
- Do not rank the panelists. They were not competing.
|
|
20
|
+
- Do not drop material because it is long. Coverage is the point.
|
|
21
|
+
- Only report a conflict where two facets genuinely overlap and disagree.
|
|
22
|
+
Different subject matter is not disagreement.
|
|
23
|
+
- Name the facets nobody covered, or covered only in passing. A gap is a
|
|
24
|
+
finding, not a formatting problem.
|
|
25
|
+
- Where panelists state conflicting facts about the codebase, check the claim
|
|
26
|
+
yourself and cite `file:line` instead of choosing the more confident wording.
|
|
27
|
+
|
|
28
|
+
Read-only synthesis. Do not edit files. Do not ask other agents. Do not run
|
|
29
|
+
subagents.
|
|
30
|
+
|
|
31
|
+
Return final Markdown with these sections:
|
|
32
|
+
|
|
33
|
+
# Fusion Report
|
|
34
|
+
|
|
35
|
+
## Summary
|
|
36
|
+
|
|
37
|
+
## Coverage Map
|
|
38
|
+
|
|
39
|
+
## Combined Answer
|
|
40
|
+
|
|
41
|
+
## Gaps
|
|
42
|
+
|
|
43
|
+
## Conflicts At Seams
|
|
44
|
+
|
|
45
|
+
## Agent Status
|
|
46
|
+
|
|
47
|
+
## Risks
|
|
48
|
+
|
|
49
|
+
## Next Step
|
package/agents/fusion-judge.md
CHANGED
|
@@ -15,6 +15,11 @@ You are the pi-fusion judge.
|
|
|
15
15
|
Compare panel outputs. Do not invent consensus. Preserve disagreements. Prefer the smallest realistic recommendation.
|
|
16
16
|
Do not edit files. Do not ask other agents. Do not run subagents.
|
|
17
17
|
|
|
18
|
+
When panelists state conflicting facts about the codebase, check the claim
|
|
19
|
+
yourself rather than choosing the more confident wording. You have read tools;
|
|
20
|
+
a factual conflict is settled by looking, not by weighing prose. Cite `file:line`
|
|
21
|
+
for what you find, and say plainly when a claim could not be verified.
|
|
22
|
+
|
|
18
23
|
Return final Markdown with these sections:
|
|
19
24
|
|
|
20
25
|
# Fusion Report
|
|
@@ -27,6 +32,8 @@ Return final Markdown with these sections:
|
|
|
27
32
|
|
|
28
33
|
## Disagreements
|
|
29
34
|
|
|
35
|
+
## Contested Claims
|
|
36
|
+
|
|
30
37
|
## Unique Insights
|
|
31
38
|
|
|
32
39
|
## Blind Spots
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fusion-panelist-full
|
|
3
|
+
package: pi-fusion
|
|
4
|
+
description: Panel member with write and shell access. Opt-in; unsafe at concurrency > 1.
|
|
5
|
+
tools: read, grep, find, ls, bash, edit, write, web_search, web_contents, web_answer, web_research
|
|
6
|
+
systemPromptMode: replace
|
|
7
|
+
inheritProjectContext: true
|
|
8
|
+
inheritSkills: false
|
|
9
|
+
defaultContext: fresh
|
|
10
|
+
completionGuard: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are a pi-fusion panelist with full tool access.
|
|
14
|
+
|
|
15
|
+
Requires `pi-web-providers`. Tool names are a strict allowlist, not a loader, so
|
|
16
|
+
without that extension **every** task using this agent fails with "requested
|
|
17
|
+
unavailable child tools" — including tasks that only need `bash` or `edit`.
|
|
18
|
+
Install it, or use `fusion-panelist`.
|
|
19
|
+
|
|
20
|
+
Read this before acting. Unlike the other Fusion panelists you can run commands
|
|
21
|
+
and modify the workspace, and Fusion may be running other panelists against the
|
|
22
|
+
same working directory at the same time.
|
|
23
|
+
|
|
24
|
+
- Prefer inspection. Reach for `bash`, `edit`, or `write` only when the task
|
|
25
|
+
genuinely cannot be answered by reading.
|
|
26
|
+
- Never mutate tracked files, git state, or anything another panelist may be
|
|
27
|
+
reading. Treat the workspace as shared.
|
|
28
|
+
- Scratch work goes in a temporary directory, not the repository.
|
|
29
|
+
- Long or open-ended commands are a hazard: another panelist is waiting.
|
|
30
|
+
- `web_research` is slow and expensive. Use `web_search` or `web_answer` unless
|
|
31
|
+
the task truly needs a deep report.
|
|
32
|
+
|
|
33
|
+
Work independently. Do not ask other agents. Do not run subagents.
|
|
34
|
+
|
|
35
|
+
Return concise Markdown with these sections.
|
|
36
|
+
|
|
37
|
+
When the task includes a decision-record contract:
|
|
38
|
+
|
|
39
|
+
- Append exactly one `<fusion-panel-decision>{...}</fusion-panel-decision>` JSON record as the final line.
|
|
40
|
+
- Do not write any text after it.
|
|
41
|
+
- Fusion uses the record only for early-stop orchestration; users receive the preceding Markdown answer.
|
|
42
|
+
|
|
43
|
+
## Summary
|
|
44
|
+
|
|
45
|
+
## Recommendation
|
|
46
|
+
|
|
47
|
+
## Evidence
|
|
48
|
+
|
|
49
|
+
## Risks
|
|
50
|
+
|
|
51
|
+
## Confidence
|
|
52
|
+
|
|
53
|
+
## Open Questions
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fusion-panelist-web
|
|
3
|
+
package: pi-fusion
|
|
4
|
+
description: Panel member with web access. Requires the pi-web-providers extension.
|
|
5
|
+
tools: read, grep, find, ls, web_search, web_contents, web_answer
|
|
6
|
+
systemPromptMode: replace
|
|
7
|
+
inheritProjectContext: true
|
|
8
|
+
inheritSkills: false
|
|
9
|
+
defaultContext: fresh
|
|
10
|
+
completionGuard: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are a pi-fusion panelist with web access.
|
|
14
|
+
|
|
15
|
+
Requires `pi-web-providers`. Without it every task using this agent fails with
|
|
16
|
+
"requested unavailable child tools" — install it, or use `fusion-panelist`.
|
|
17
|
+
|
|
18
|
+
Work independently. Inspect relevant local files when the task needs code evidence.
|
|
19
|
+
Search the web when the task turns on external facts: library behaviour, version
|
|
20
|
+
differences, standards, or anything you would otherwise have to guess. Cite what
|
|
21
|
+
you retrieved. Do not edit files. Do not ask other agents. Do not run subagents.
|
|
22
|
+
|
|
23
|
+
Return concise Markdown with these sections.
|
|
24
|
+
|
|
25
|
+
When the task includes a decision-record contract:
|
|
26
|
+
|
|
27
|
+
- Append exactly one `<fusion-panel-decision>{...}</fusion-panel-decision>` JSON record as the final line.
|
|
28
|
+
- Do not write any text after it.
|
|
29
|
+
- Fusion uses the record only for early-stop orchestration; users receive the preceding Markdown answer.
|
|
30
|
+
|
|
31
|
+
## Summary
|
|
32
|
+
|
|
33
|
+
## Recommendation
|
|
34
|
+
|
|
35
|
+
## Evidence
|
|
36
|
+
|
|
37
|
+
## Risks
|
|
38
|
+
|
|
39
|
+
## Confidence
|
|
40
|
+
|
|
41
|
+
## Open Questions
|
|
@@ -13,6 +13,8 @@ completionGuard: false
|
|
|
13
13
|
You are a pi-fusion panelist.
|
|
14
14
|
|
|
15
15
|
Work independently. Inspect relevant local files when the task needs code evidence.
|
|
16
|
+
You have no web access: answer from the repository and your own knowledge, and say
|
|
17
|
+
so plainly when a question turns on external facts you cannot retrieve.
|
|
16
18
|
Do not edit files. Do not ask other agents. Do not run subagents.
|
|
17
19
|
|
|
18
20
|
Return concise Markdown with these sections.
|
package/docs/user-guide.md
CHANGED
|
@@ -7,12 +7,29 @@ README covers the why. This guide covers commands, config, and troubleshooting.
|
|
|
7
7
|
`pi-fusion` turns one hard question into a small parallel panel:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
prompt → parallel panel → judge
|
|
10
|
+
prompt → parallel panel → judge picks the best answer → report
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The command stays simple. One prompt starts the panel. One synthesis step then
|
|
14
|
+
turns the collected evidence into a Markdown report.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
There is a second shape. Give panel members a `question` and they answer
|
|
17
|
+
*different facets* instead of the same question, and a composer merges their
|
|
18
|
+
answers rather than picking between them:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
prompt → panel, one facet each → composer merges → report
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
You do not select between these. Facets decide: a panel with `question` fields
|
|
25
|
+
merges, a panel without them selects.
|
|
26
|
+
|
|
27
|
+
Panel diversity comes from different model choices, different perspective
|
|
28
|
+
prompts, or both. **Mixing models is the main lever.** The config that
|
|
29
|
+
`/fusion init` writes sets no `model`. By default you therefore get one model in
|
|
30
|
+
three roles. Give each member its own `model` to get the real benefit.
|
|
31
|
+
|
|
32
|
+
Older runs created as a single `pi-subagents` chain remain supported when restored.
|
|
16
33
|
|
|
17
34
|
The base Pi session stays in control. Fusion is a tool for decisions, not a replacement for normal coding.
|
|
18
35
|
|
|
@@ -25,6 +42,7 @@ Preferred command shape:
|
|
|
25
42
|
/fusion <prompt>
|
|
26
43
|
/fusion --profile <name> <prompt>
|
|
27
44
|
/fusion -p <name> <prompt>
|
|
45
|
+
/fusion --panel <entries> <prompt>
|
|
28
46
|
/fusion status
|
|
29
47
|
/fusion stop
|
|
30
48
|
/fusion init
|
|
@@ -38,7 +56,36 @@ Notes:
|
|
|
38
56
|
- `/fusion init` writes `.pi/fusion.json` for the current trusted project.
|
|
39
57
|
- Exact one-word prompts `init`, `status`, and `stop` are reserved as `/fusion` subcommands.
|
|
40
58
|
|
|
41
|
-
|
|
59
|
+
### `--panel`
|
|
60
|
+
|
|
61
|
+
Builds a one-off panel without editing config, for trying a composition before
|
|
62
|
+
committing to it. The resolved profile still supplies the judge and every other
|
|
63
|
+
setting. Only the panel changes.
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
/fusion --panel opus,openai/gpt-5.5 Which design should we pick?
|
|
67
|
+
/fusion --panel=opus,openai/gpt-5.5 Which design should we pick?
|
|
68
|
+
/fusion --profile audit --panel opus,gemini-pro What did we miss?
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Each comma-separated entry is `<model>` or `<agent>:<model>`:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
--panel opus,gpt-5.5 # both use the default panelist
|
|
75
|
+
--panel pi-fusion.fusion-panelist-web:gpt-5.5,opus # first member gets web access
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
An entry counts as agent-qualified only when the part before the first `:`
|
|
79
|
+
contains a `.` and the part after it is not a thinking level. That keeps both
|
|
80
|
+
`opus:high` and `gpt-4.1:high` models rather than agent references.
|
|
81
|
+
|
|
82
|
+
The thinking levels are `off`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
|
|
83
|
+
A word that is not one of them is read as a model, so `gpt-4.1:ultra` asks for
|
|
84
|
+
the agent `gpt-4.1`, and the run fails with an unknown-agent error. Use a real
|
|
85
|
+
level, or write the agent in full.
|
|
86
|
+
Claude alias shorthand works inline: `--panel claude-work/opus-4.8`.
|
|
87
|
+
|
|
88
|
+
## Config files
|
|
42
89
|
|
|
43
90
|
Config lookup order:
|
|
44
91
|
|
|
@@ -105,17 +152,143 @@ Profile:
|
|
|
105
152
|
- `concurrency`: max parallel panelists
|
|
106
153
|
- `timeoutMs`: async subagent timeout in milliseconds
|
|
107
154
|
- `context`: `fresh` or `fork`
|
|
108
|
-
- `stopWhenPanelAgrees`: optional boolean, default `false`. When
|
|
155
|
+
- `stopWhenPanelAgrees`: optional boolean, default `false`. When it is on, Fusion can stop the panelists that have not finished yet. All four conditions must hold: two or more finished panelists give the same normalized recommendation, every one of them reports `high` confidence, none of them asks for more evidence, and work remains. The judge still runs over the answers already collected. This policy is fixed on purpose. There is no threshold to tune.
|
|
156
|
+
- `synthesis`: rarely needed. Inferred from the panel — any member with a `question` means `merge`, otherwise `select`. Set it only to override that. See [Synthesis modes](#synthesis-modes).
|
|
157
|
+
- `blindPanelLabels`: optional boolean, default `false`. When it is on, the judge sees `Candidate A`, `Candidate B`, and so on, instead of the configured labels. Fusion also withholds agent names and artifact paths, because they contain the member id. A role label reads as an authority cue before the judge compares any content. Your report always shows the real names.
|
|
158
|
+
- `judgeToolBudget`: optional `{ "soft": n, "hard": n }`. It caps the tool calls the judge can spend to verify contested claims. `soft` is a nudge. After `hard`, Fusion blocks further tool use, so the judge still produces a report. Both numbers must be positive integers, and `soft` must not be larger than `hard`.
|
|
109
159
|
|
|
110
160
|
Panel member:
|
|
111
161
|
|
|
112
162
|
- `id`: stable machine name
|
|
113
|
-
- `label`:
|
|
114
|
-
- `agent`: subagent name
|
|
115
|
-
- `model`: optional model override
|
|
116
|
-
- Claude alias
|
|
163
|
+
- `label`: optional report label. It defaults to `id`
|
|
164
|
+
- `agent`: subagent name. This is where a member's tool access comes from — see [Panel agents and tools](#panel-agents-and-tools).
|
|
165
|
+
- `model`: optional model override, and usually the main source of panel diversity. It accepts normal Pi model ids. If `pi-claude-alias` is installed, it also accepts Claude alias shorthand like `claude-work/opus-4.8`
|
|
166
|
+
- A Claude alias handle must be unique across the global and project alias files. Fusion rejects a duplicate handle.
|
|
117
167
|
- `thinking`: optional `off`, `minimal`, `low`, `medium`, `high`, or `xhigh`
|
|
118
168
|
- `role`: optional perspective hint layered on top of the model
|
|
169
|
+
- `question`: optional facet prompt sent **instead of** the raw task. `{task}` is substituted with the original prompt. Use with `synthesis: "merge"` to divide the work rather than duplicate it. If the template omits `{task}`, the original task is still appended so the panelist keeps its context.
|
|
170
|
+
|
|
171
|
+
## Panel agents and tools
|
|
172
|
+
|
|
173
|
+
A panel member's tools come from its **agent definition**, not from `fusion.json`.
|
|
174
|
+
`pi-subagents` has no per-task tool override, so `agent` is the knob.
|
|
175
|
+
|
|
176
|
+
Fusion ships five:
|
|
177
|
+
|
|
178
|
+
| Agent | Tools | Use for |
|
|
179
|
+
| -------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
|
|
180
|
+
| `pi-fusion.fusion-panelist` | `read, grep, find, ls` | Default. Local inspection only. It needs no extra extension. |
|
|
181
|
+
| `pi-fusion.fusion-panelist-web` | above plus `web_search, web_contents, web_answer` | Opt-in. **Requires `pi-web-providers`.** |
|
|
182
|
+
| `pi-fusion.fusion-panelist-full` | above plus `bash, edit, write, web_research` | Opt-in. Requires `pi-web-providers`. **See the warning below.** |
|
|
183
|
+
| `pi-fusion.fusion-judge` | `read, grep, find, ls` | Judge. The read tools let it verify contested claims. |
|
|
184
|
+
| `pi-fusion.fusion-composer` | `read, grep, find, ls` | Synthesis under `synthesis: "merge"`. |
|
|
185
|
+
|
|
186
|
+
> **Tool names are a strict allowlist, not a loader.** If an agent declares a tool
|
|
187
|
+
> whose provider extension is not installed, every task using that agent fails
|
|
188
|
+
> with `requested unavailable child tools`. That is why the default agents stay on
|
|
189
|
+
> Pi core tools: `pi-web-providers` is optional, so depending on it by default
|
|
190
|
+
> breaks every run for anyone without it. Install it before you use the `-web`
|
|
191
|
+
> or `-full` variant:
|
|
192
|
+
>
|
|
193
|
+
> ```bash
|
|
194
|
+
> pi install npm:pi-web-providers
|
|
195
|
+
> ```
|
|
196
|
+
|
|
197
|
+
Mix them per member:
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"panel": [
|
|
202
|
+
{
|
|
203
|
+
"id": "arch",
|
|
204
|
+
"label": "Architect",
|
|
205
|
+
"agent": "pi-fusion.fusion-panelist"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "local",
|
|
209
|
+
"label": "Local",
|
|
210
|
+
"agent": "pi-fusion.fusion-panelist-web"
|
|
211
|
+
},
|
|
212
|
+
{ "id": "mine", "label": "Custom", "agent": "my-package.my-panelist" }
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
For any other combination, write your own agent markdown file with the `tools:`
|
|
218
|
+
frontmatter you want and point `agent` at it. Valid tool names are the Pi core
|
|
219
|
+
tools `read, bash, edit, write, grep, find, ls` and, when `pi-web-providers` is
|
|
220
|
+
installed, `web_search, web_contents, web_answer, web_research`. A name outside
|
|
221
|
+
that set resolves to nothing and the run fails with a missing-tool error.
|
|
222
|
+
|
|
223
|
+
`web_research` is excluded from the default panelist on purpose: it routes to a
|
|
224
|
+
deep-research model that takes minutes. A panel runs it for every member at the
|
|
225
|
+
same time.
|
|
226
|
+
|
|
227
|
+
> **`fusion-panelist-full` voids the read-only guarantee.** It grants `edit`,
|
|
228
|
+
> `write`, and `bash`. Fusion runs panelists **in parallel in the same working
|
|
229
|
+
> directory**, so at `concurrency > 1` two members can mutate the same files or
|
|
230
|
+
> git state at once. The prompt asks them not to, but nothing enforces this.
|
|
231
|
+
> Use it with `"concurrency": 1`, or do not use it at all.
|
|
232
|
+
|
|
233
|
+
## Synthesis modes
|
|
234
|
+
|
|
235
|
+
`select` (default) — every panelist answers the whole question and
|
|
236
|
+
`fusion-judge` compares them, reporting consensus, disagreements, contested
|
|
237
|
+
claims, unique insights, and blind spots. Use it for decision questions, where
|
|
238
|
+
the failure mode is one model's bad reasoning path and redundancy is the fix.
|
|
239
|
+
|
|
240
|
+
`merge` — panelists answer **different facets** and `fusion-composer` unions
|
|
241
|
+
them, reporting a coverage map, the combined answer, gaps, and conflicts only
|
|
242
|
+
where facets genuinely overlap. **To get this, give the members a `question`.**
|
|
243
|
+
You do not also have to set `synthesis`. Use merge for breadth questions such as
|
|
244
|
+
audits, "what did we miss", and release sweeps. There the failure mode is
|
|
245
|
+
incomplete coverage, and redundant panelists all miss the same things.
|
|
246
|
+
|
|
247
|
+
Merge mode swaps the synthesis agent, not the run lifecycle. It reuses the judge
|
|
248
|
+
run slot, so a `fusion:rpc:v1` consumer sees no new phase.
|
|
249
|
+
|
|
250
|
+
**If you set a custom `judge.agent`, Fusion uses it in both modes.** The merge
|
|
251
|
+
contract then becomes your responsibility. Fusion substitutes `fusion-composer`
|
|
252
|
+
only when `judge.agent` is still the bundled `pi-fusion.fusion-judge`. Explicit
|
|
253
|
+
config always wins.
|
|
254
|
+
|
|
255
|
+
Under `synthesis: "merge"` your agent gets the composer instructions. It must
|
|
256
|
+
emit `Coverage Map`, `Combined Answer`, `Gaps`, and `Conflicts At Seams`. For a
|
|
257
|
+
section it does not produce, Fusion writes "Not specified by the composer". The
|
|
258
|
+
run does not fail, so a mismatch appears as an empty report, not as an error.
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"defaultProfile": "audit",
|
|
263
|
+
"profiles": {
|
|
264
|
+
"audit": {
|
|
265
|
+
"panel": [
|
|
266
|
+
{
|
|
267
|
+
"id": "security",
|
|
268
|
+
"agent": "pi-fusion.fusion-panelist",
|
|
269
|
+
"question": "Cover ONLY the security and data-exposure surface of: {task}"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "perf",
|
|
273
|
+
"agent": "pi-fusion.fusion-panelist",
|
|
274
|
+
"question": "Cover ONLY throughput, latency, and resource use of: {task}"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"id": "ops",
|
|
278
|
+
"agent": "pi-fusion.fusion-panelist",
|
|
279
|
+
"question": "Cover ONLY rollout, rollback, and observability of: {task}"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"judge": { "agent": "pi-fusion.fusion-judge", "thinking": "high" },
|
|
283
|
+
"concurrency": 3
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Under `merge`, one surviving panelist still goes to the composer. Fusion does
|
|
290
|
+
not return that answer directly. One facet is not the answer, and the report must
|
|
291
|
+
name what is missing.
|
|
119
292
|
|
|
120
293
|
Judge:
|
|
121
294
|
|
|
@@ -193,7 +366,7 @@ Deliberate review:
|
|
|
193
366
|
|
|
194
367
|
## Output
|
|
195
368
|
|
|
196
|
-
When agreement stopping is
|
|
369
|
+
When agreement stopping is on, each panelist appends one tagged JSON decision record. The record holds a short recommendation, a confidence level, and whether the panelist needs more evidence. Fusion uses it only to decide whether an unfinished panel can stop early. A record that is malformed, missing, or not final turns early stopping off. You see the Markdown answer above the record, not the record itself.
|
|
197
370
|
|
|
198
371
|
The judge returns:
|
|
199
372
|
|
|
@@ -207,7 +380,7 @@ The judge returns:
|
|
|
207
380
|
- risks
|
|
208
381
|
- next step
|
|
209
382
|
|
|
210
|
-
When lifecycle data is available, the
|
|
383
|
+
When lifecycle data is available, the report gives more. It adds per-panel and judge time, total model time, token usage, and estimated cost. It also adds a short failure summary per model and provider. Total model time is the sum of the agent durations. It is not wall-clock latency, because panelists overlap. Missing usage is shown as unknown, and local zero-cost usage stays zero. `Model` comes from lifecycle metadata. `Configured model` is what the profile asked for. Both appear when a provider reports a different model.
|
|
211
384
|
|
|
212
385
|
## Status and footer integration
|
|
213
386
|
|
|
@@ -219,18 +392,26 @@ It does not own the footer. If you use a footer extension, configure it to read
|
|
|
219
392
|
|
|
220
393
|
Fusion uses model providers the same way normal Pi work does. The difference is fan-out:
|
|
221
394
|
|
|
222
|
-
- normal work usually sends a prompt and tool results to one
|
|
223
|
-
- Fusion sends the prompt to every
|
|
224
|
-
- local file
|
|
225
|
-
- the judge
|
|
395
|
+
- normal work usually sends a prompt and tool results to one model
|
|
396
|
+
- Fusion sends the prompt to every panel model
|
|
397
|
+
- a local file snippet that a panelist reads goes to the model of that panelist
|
|
398
|
+
- the judge gets the original prompt, the successful panel answers, and the failure summaries
|
|
399
|
+
|
|
400
|
+
**Panelists can reach the web, but only if you opt in.** The default panelist,
|
|
401
|
+
judge, and composer are local-only. A member that uses `fusion-panelist-web` or
|
|
402
|
+
`fusion-panelist-full` can search. Your prompt, and any query that the member
|
|
403
|
+
derives from your code, then go to the provider set in
|
|
404
|
+
`~/.pi/agent/web-providers.json`. That provider is a third party, separate from
|
|
405
|
+
your model provider. Keep every member on the default agent to hold a run
|
|
406
|
+
entirely off the web.
|
|
226
407
|
|
|
227
|
-
This is not an extra privacy guarantee. A
|
|
408
|
+
This is not an extra privacy guarantee. A panel with several providers sends copies of the work to each of them. An all-local panel keeps those model calls local, if your Pi model config allows it. Every bundled Fusion agent except `fusion-panelist-full` is read-only. Each provider still gets the context it needs to answer. `fusion-panelist-full` is not read-only. See [Panel agents and tools](#panel-agents-and-tools).
|
|
228
409
|
|
|
229
410
|
Fusion does not currently inspect or rewrite the final provider payload. Configure provider privacy and local-model routing in Pi.
|
|
230
411
|
|
|
231
412
|
## Small and economical profiles
|
|
232
413
|
|
|
233
|
-
These are
|
|
414
|
+
These are config examples, not built-in provider presets. Omit `model` to inherit the model that Pi has selected. You can also set any model id that your Pi `models.json` config supports.
|
|
234
415
|
|
|
235
416
|
Small local-style panel:
|
|
236
417
|
|
|
@@ -276,8 +457,8 @@ For an economical mixed panel, give each member a fast or inexpensive frontier,
|
|
|
276
457
|
|
|
277
458
|
`Unknown fusion profile`
|
|
278
459
|
|
|
279
|
-
-
|
|
280
|
-
-
|
|
460
|
+
- verify `defaultProfile`
|
|
461
|
+
- verify the requested `--profile` name
|
|
281
462
|
- run `/fusion init` to regenerate a known-good template
|
|
282
463
|
|
|
283
464
|
Run is stuck or no longer useful:
|
package/package.json
CHANGED