@zhixuan92/multi-model-agent 3.7.0 → 3.8.1
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 +68 -20
- package/dist/http/cross-tier-guard.d.ts +15 -0
- package/dist/http/cross-tier-guard.d.ts.map +1 -0
- package/dist/http/cross-tier-guard.js +30 -0
- package/dist/http/cross-tier-guard.js.map +1 -0
- package/dist/http/handlers/tools/audit.d.ts.map +1 -1
- package/dist/http/handlers/tools/audit.js +5 -0
- package/dist/http/handlers/tools/audit.js.map +1 -1
- package/dist/http/handlers/tools/debug.d.ts.map +1 -1
- package/dist/http/handlers/tools/debug.js +5 -0
- package/dist/http/handlers/tools/debug.js.map +1 -1
- package/dist/http/handlers/tools/investigate.d.ts.map +1 -1
- package/dist/http/handlers/tools/investigate.js +5 -0
- package/dist/http/handlers/tools/investigate.js.map +1 -1
- package/dist/http/handlers/tools/review.d.ts.map +1 -1
- package/dist/http/handlers/tools/review.js +5 -0
- package/dist/http/handlers/tools/review.js.map +1 -1
- package/dist/http/handlers/tools/verify.d.ts.map +1 -1
- package/dist/http/handlers/tools/verify.js +5 -0
- package/dist/http/handlers/tools/verify.js.map +1 -1
- package/dist/skills/_shared/response-shape.md +28 -17
- package/dist/skills/mma-audit/SKILL.md +22 -1
- package/dist/skills/mma-clarifications/SKILL.md +1 -1
- package/dist/skills/mma-context-blocks/SKILL.md +1 -1
- package/dist/skills/mma-debug/SKILL.md +22 -1
- package/dist/skills/mma-delegate/SKILL.md +2 -1
- package/dist/skills/mma-execute-plan/SKILL.md +5 -4
- package/dist/skills/mma-investigate/SKILL.md +24 -2
- package/dist/skills/mma-retry/SKILL.md +1 -1
- package/dist/skills/mma-review/SKILL.md +22 -1
- package/dist/skills/mma-verify/SKILL.md +22 -1
- package/dist/skills/multi-model-agent/SKILL.md +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Two ways — pick one:
|
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
84
|
mmagent serve # 127.0.0.1:7337 by default
|
|
85
|
-
curl -s http://localhost:7337/health # → {"ok":true,"version":"3.
|
|
85
|
+
curl -s http://localhost:7337/health # → {"ok":true,"version":"3.8.1",...}
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
For an always-on background install (survives reboots): [launchd / systemd templates](./scripts/README.md).
|
|
@@ -98,6 +98,72 @@ mmagent update-skills # refresh installed skills
|
|
|
98
98
|
|
|
99
99
|
A drift warning prints on `mmagent serve` if installed skills are older than the daemon. To rotate the auth token: `rm ~/.multi-model/auth-token && mmagent serve`.
|
|
100
100
|
|
|
101
|
+
## Skills
|
|
102
|
+
|
|
103
|
+
Skills are the surface your AI client sees. `mmagent install-skill` writes them to the client's skill directory; the client then picks the right one based on what you ask. You don't call them by hand — you describe the work, the client routes it to the matching skill, the skill calls the matching REST endpoint.
|
|
104
|
+
|
|
105
|
+
### Work-delegation skills
|
|
106
|
+
|
|
107
|
+
| Skill | Target endpoint | Use when |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| `mma-delegate` | `POST /delegate` | Ad-hoc implementation or research tasks **without** a plan file — run them in parallel on cheap workers. |
|
|
110
|
+
| `mma-execute-plan` | `POST /execute-plan` | A plan / spec markdown exists on disk with numbered task headings; implement one or more tasks from it. |
|
|
111
|
+
| `mma-investigate` | `POST /investigate` | Answer a question about *this* codebase ("how does X work", "where is Y called") without burning main-context tokens on grep + reads. |
|
|
112
|
+
| `mma-debug` | `POST /debug` | A test fails, a build breaks, or behavior is unexpected — delegate the reproduce/trace, keep the hypothesis on the main agent. |
|
|
113
|
+
| `mma-review` | `POST /review` | Source-code review (pre-merge, post-implementation, security-focused). One worker per file, in parallel. |
|
|
114
|
+
| `mma-audit` | `POST /audit` | Audit a prose document — spec, config, PR description — for correctness, security, or style. |
|
|
115
|
+
| `mma-verify` | `POST /verify` | Check acceptance criteria against finished work *before* claiming done. One worker per checklist item. |
|
|
116
|
+
|
|
117
|
+
### Plumbing skills
|
|
118
|
+
|
|
119
|
+
| Skill | Target endpoint | Use when |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| `mma-context-blocks` | `POST/DELETE /context-blocks` | The same large doc (>~2 KB) will be referenced by 2+ subsequent mma-* calls — register once, pass the ID instead of re-uploading. |
|
|
122
|
+
| `mma-clarifications` | `POST /clarifications/confirm` | A previous batch's terminal envelope returned a `proposedInterpretation` string — the service is paused waiting for you to confirm or correct its read. |
|
|
123
|
+
| `mma-retry` | `POST /retry` | A previous batch came back partial — re-run only the failed indices without re-dispatching the whole batch. |
|
|
124
|
+
|
|
125
|
+
The `multi-model-agent` skill (no `mma-` prefix) is a top-level overview your client reads first to pick which `mma-*` skill applies.
|
|
126
|
+
|
|
127
|
+
### Two generic usage samples
|
|
128
|
+
|
|
129
|
+
**Sample 1 — implement a feature from a plan**
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
You: "Execute tasks 3, 4, and 5 from docs/plans/auth-rewrite.md"
|
|
133
|
+
↓
|
|
134
|
+
Client picks mma-execute-plan (plan file on disk, multiple independent tasks)
|
|
135
|
+
↓
|
|
136
|
+
mmagent dispatches 3 workers in parallel on the standard agent (e.g. MiniMax-M2.7),
|
|
137
|
+
each runs cross-agent review on the complex agent, returns a structured report.
|
|
138
|
+
↓
|
|
139
|
+
You see one consolidated headline: "$0.04 actual / $1.20 saved vs claude-opus-4-7 (30× ROI)"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Sample 2 — debug a failing test (multiple skills chained)**
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
You: "tests/auth/session.test.ts is failing intermittently after the token-refresh refactor — figure it out and fix it"
|
|
146
|
+
↓
|
|
147
|
+
Step 1 — mma-context-blocks
|
|
148
|
+
The failing test output + the refactor diff are ~8 KB and will be referenced by every
|
|
149
|
+
downstream call. Register once, get a contextBlockId, reuse it.
|
|
150
|
+
↓
|
|
151
|
+
Step 2 — mma-debug
|
|
152
|
+
Worker reproduces the failure, traces across session.ts + token-refresh.ts, returns a
|
|
153
|
+
root-cause hypothesis: "race between refresh-in-flight and session.invalidate()".
|
|
154
|
+
Main agent stays on the hypothesis, decides the fix shape.
|
|
155
|
+
↓
|
|
156
|
+
Step 3 — mma-delegate
|
|
157
|
+
Dispatch the actual code change as an ad-hoc task (no plan file). Worker writes the
|
|
158
|
+
fix, runs the failing test 20× to confirm the race is gone.
|
|
159
|
+
↓
|
|
160
|
+
Step 4 — mma-verify
|
|
161
|
+
One worker per acceptance criterion: (a) failing test now passes, (b) no other
|
|
162
|
+
auth tests regressed, (c) refresh path still emits the expected telemetry.
|
|
163
|
+
↓
|
|
164
|
+
Total cost: ~$0.08. Main-context tokens consumed: just the hypotheses and the verdicts.
|
|
165
|
+
```
|
|
166
|
+
|
|
101
167
|
## Configuration reference
|
|
102
168
|
|
|
103
169
|
### Lookup order
|
|
@@ -199,24 +265,6 @@ mmagent telemetry reset-id # rotate the local Ed25519 iden
|
|
|
199
265
|
mmagent telemetry dump-queue # print the locally-queued events as JSON
|
|
200
266
|
```
|
|
201
267
|
|
|
202
|
-
## Shipped skills
|
|
203
|
-
|
|
204
|
-
Skills are Markdown prompts that tell your AI client when and how to call each endpoint. `mmagent install-skill` inlines the shared auth/polling patterns at install time.
|
|
205
|
-
|
|
206
|
-
| Skill | Target endpoint |
|
|
207
|
-
|---|---|
|
|
208
|
-
| `multi-model-agent` | Overview + skill map (read first to pick the right `mma-*` skill) |
|
|
209
|
-
| `mma-delegate` | `POST /delegate` |
|
|
210
|
-
| `mma-audit` | `POST /audit` |
|
|
211
|
-
| `mma-review` | `POST /review` |
|
|
212
|
-
| `mma-verify` | `POST /verify` |
|
|
213
|
-
| `mma-debug` | `POST /debug` |
|
|
214
|
-
| `mma-execute-plan` | `POST /execute-plan` |
|
|
215
|
-
| `mma-retry` | `POST /retry` |
|
|
216
|
-
| `mma-investigate` | `POST /investigate` |
|
|
217
|
-
| `mma-context-blocks` | `POST/DELETE /context-blocks` |
|
|
218
|
-
| `mma-clarifications` | `POST /clarifications/confirm` |
|
|
219
|
-
|
|
220
268
|
## Architecture
|
|
221
269
|
|
|
222
270
|
`mmagent serve` runs a loopback HTTP server. Each tool call dispatches to a labor agent (standard or complex), runs a cross-agent review cycle, and returns a structured report. Tasks run in parallel; each has a cost ceiling and wall-clock timeout.
|
|
@@ -237,7 +285,7 @@ Full design rationale: [DIRECTION.md](https://github.com/zhixuan312/multi-model-
|
|
|
237
285
|
|
|
238
286
|
## What's new
|
|
239
287
|
|
|
240
|
-
Latest: **3.
|
|
288
|
+
Latest: **3.8.1** — read-only review becomes annotation, not gating. The 5 read-only routes (audit, review, verify, investigate, debug) now run a single reviewer pass that annotates each worker finding with `reviewerConfidence` (0-100) and an optional `reviewerSeverity` correction — no rework loop, restoring 3.7.0-comparable wall-clock. `Finding` schema simplified (drop `file`/`line`/`sourceQuote`; required `evidence`; rename `suggestedFix` → `suggestion`). Full history: [CHANGELOG](https://github.com/zhixuan312/multi-model-agent/blob/master/CHANGELOG.md).
|
|
241
289
|
|
|
242
290
|
## Full documentation
|
|
243
291
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ServerResponse } from 'node:http';
|
|
2
|
+
import type { MultiModelConfig } from '@zhixuan92/multi-model-agent-core';
|
|
3
|
+
/**
|
|
4
|
+
* Guards read-only routes against misconfigured cross-tier review topology.
|
|
5
|
+
*
|
|
6
|
+
* Read-only routes (audit, review, verify, investigate, debug) require both
|
|
7
|
+
* 'standard' and 'complex' agent slots to be configured so the quality_only
|
|
8
|
+
* review pipeline can run cross-tier comparison.
|
|
9
|
+
*
|
|
10
|
+
* Callers MUST check the read-only-review kill switch before calling this
|
|
11
|
+
* function — if quality review is disabled for the route, the cross-tier
|
|
12
|
+
* check is skipped entirely.
|
|
13
|
+
*/
|
|
14
|
+
export declare function assertCrossTierConfigured(config: MultiModelConfig, res: ServerResponse): boolean;
|
|
15
|
+
//# sourceMappingURL=cross-tier-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-tier-guard.d.ts","sourceRoot":"","sources":["../../src/http/cross-tier-guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG1E;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,cAAc,GAClB,OAAO,CA6BT"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { sendError } from './errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* Guards read-only routes against misconfigured cross-tier review topology.
|
|
4
|
+
*
|
|
5
|
+
* Read-only routes (audit, review, verify, investigate, debug) require both
|
|
6
|
+
* 'standard' and 'complex' agent slots to be configured so the quality_only
|
|
7
|
+
* review pipeline can run cross-tier comparison.
|
|
8
|
+
*
|
|
9
|
+
* Callers MUST check the read-only-review kill switch before calling this
|
|
10
|
+
* function — if quality review is disabled for the route, the cross-tier
|
|
11
|
+
* check is skipped entirely.
|
|
12
|
+
*/
|
|
13
|
+
export function assertCrossTierConfigured(config, res) {
|
|
14
|
+
// Cast to unknown — this is a runtime defense-in-depth guard; the Zod schema
|
|
15
|
+
// already requires both slots, but a config constructed outside parseConfig
|
|
16
|
+
// (e.g. in tests) may be missing one.
|
|
17
|
+
const agents = config.agents;
|
|
18
|
+
if (!agents?.standard) {
|
|
19
|
+
sendError(res, 400, 'invalid_configuration', "Read-only routes require both 'standard' and 'complex' slots configured for cross-tier review. " +
|
|
20
|
+
"Configure the missing 'standard' slot or set MMAGENT_READ_ONLY_REVIEW=disabled to skip the review topology.");
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
if (!agents?.complex) {
|
|
24
|
+
sendError(res, 400, 'invalid_configuration', "Read-only routes require both 'standard' and 'complex' slots configured for cross-tier review. " +
|
|
25
|
+
"Configure the missing 'complex' slot or set MMAGENT_READ_ONLY_REVIEW=disabled to skip the review topology.");
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=cross-tier-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-tier-guard.js","sourceRoot":"","sources":["../../src/http/cross-tier-guard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAwB,EACxB,GAAmB;IAEnB,6EAA6E;IAC7E,4EAA4E;IAC5E,sCAAsC;IACtC,MAAM,MAAM,GAAI,MAA0D,CAAC,MAAM,CAAC;IAElF,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;QACtB,SAAS,CACP,GAAG,EACH,GAAG,EACH,uBAAuB,EACvB,iGAAiG;YAC/F,6GAA6G,CAChH,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QACrB,SAAS,CACP,GAAG,EACH,GAAG,EACH,uBAAuB,EACvB,iGAAiG;YAC/F,4GAA4G,CAC/G,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/audit.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/audit.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CA0C/D"}
|
|
@@ -3,6 +3,8 @@ import { executeAudit } from '@zhixuan92/multi-model-agent-core/executors/audit'
|
|
|
3
3
|
import { sendError, sendJson } from '../../errors.js';
|
|
4
4
|
import { asyncDispatch } from '../../async-dispatch.js';
|
|
5
5
|
import { emitRequestReceived } from '../../request-observability.js';
|
|
6
|
+
import { assertCrossTierConfigured } from '../../cross-tier-guard.js';
|
|
7
|
+
import { resolveReadOnlyReviewFlag } from '@zhixuan92/multi-model-agent-core/config/read-only-review-flag';
|
|
6
8
|
export function buildAuditHandler(deps) {
|
|
7
9
|
return async (_req, res, _params, ctx) => {
|
|
8
10
|
const parsed = audit.inputSchema.safeParse(ctx.body);
|
|
@@ -12,6 +14,9 @@ export function buildAuditHandler(deps) {
|
|
|
12
14
|
});
|
|
13
15
|
return;
|
|
14
16
|
}
|
|
17
|
+
const flag = resolveReadOnlyReviewFlag();
|
|
18
|
+
if (flag.isEnabledFor('audit_document') && !assertCrossTierConfigured(deps.config, res))
|
|
19
|
+
return;
|
|
15
20
|
const input = parsed.data;
|
|
16
21
|
const cwd = ctx.cwd;
|
|
17
22
|
const reserveResult = deps.projectRegistry.reserveProject(cwd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/audit.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,sDAAsD,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
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
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/debug.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CA0C/D"}
|
|
@@ -3,6 +3,8 @@ import { executeDebug } from '@zhixuan92/multi-model-agent-core/executors/debug'
|
|
|
3
3
|
import { sendError, sendJson } from '../../errors.js';
|
|
4
4
|
import { asyncDispatch } from '../../async-dispatch.js';
|
|
5
5
|
import { emitRequestReceived } from '../../request-observability.js';
|
|
6
|
+
import { assertCrossTierConfigured } from '../../cross-tier-guard.js';
|
|
7
|
+
import { resolveReadOnlyReviewFlag } from '@zhixuan92/multi-model-agent-core/config/read-only-review-flag';
|
|
6
8
|
export function buildDebugHandler(deps) {
|
|
7
9
|
return async (_req, res, _params, ctx) => {
|
|
8
10
|
const parsed = debug.inputSchema.safeParse(ctx.body);
|
|
@@ -12,6 +14,9 @@ export function buildDebugHandler(deps) {
|
|
|
12
14
|
});
|
|
13
15
|
return;
|
|
14
16
|
}
|
|
17
|
+
const flag = resolveReadOnlyReviewFlag();
|
|
18
|
+
if (flag.isEnabledFor('debug_task') && !assertCrossTierConfigured(deps.config, res))
|
|
19
|
+
return;
|
|
15
20
|
const input = parsed.data;
|
|
16
21
|
const cwd = ctx.cwd;
|
|
17
22
|
const reserveResult = deps.projectRegistry.reserveProject(cwd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/debug.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,sDAAsD,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAA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"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"investigate.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/investigate.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CA8ErE"}
|
|
@@ -7,6 +7,8 @@ import { sendError, sendJson } from '../../errors.js';
|
|
|
7
7
|
import { asyncDispatch } from '../../async-dispatch.js';
|
|
8
8
|
import { emitRequestReceived } from '../../request-observability.js';
|
|
9
9
|
import { canonicalizeFilePaths } from '../../canonicalize-file-paths.js';
|
|
10
|
+
import { assertCrossTierConfigured } from '../../cross-tier-guard.js';
|
|
11
|
+
import { resolveReadOnlyReviewFlag } from '@zhixuan92/multi-model-agent-core/config/read-only-review-flag';
|
|
10
12
|
export function buildInvestigateHandler(deps) {
|
|
11
13
|
return async (req, res, _params, ctx) => {
|
|
12
14
|
// Step 1: schema.
|
|
@@ -18,6 +20,9 @@ export function buildInvestigateHandler(deps) {
|
|
|
18
20
|
return;
|
|
19
21
|
}
|
|
20
22
|
const input = parsed.data;
|
|
23
|
+
const flag = resolveReadOnlyReviewFlag();
|
|
24
|
+
if (flag.isEnabledFor('investigate_codebase') && !assertCrossTierConfigured(deps.config, res))
|
|
25
|
+
return;
|
|
21
26
|
const cwd = ctx.cwd;
|
|
22
27
|
// Step 2: reservation lifecycle (mirrors audit.ts; reservation is just a cwd-validity gate).
|
|
23
28
|
const reserveResult = deps.projectRegistry.reserveProject(cwd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"investigate.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/investigate.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,WAAW,MAAM,4DAA4D,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"investigate.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/investigate.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,WAAW,MAAM,4DAA4D,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gEAAgE,CAAC;AAE3G,MAAM,UAAU,uBAAuB,CAAC,IAAiB;IACvD,OAAO,KAAK,EAAE,GAAoB,EAAE,GAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;QACvE,kBAAkB;QAClB,MAAM,MAA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C;YAC3C,IAAI,EAAE,aAAa;YACnB,UAAU,EAAE,GAAG;YACf,QAAQ;YACR,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,EAAE;YAClB,IAAI;YACJ,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,CAAC,kBAAkB,CAAC,YAAY,EAAE;gBACjE,KAAK;gBACL,qBAAqB;gBACrB,sBAAsB;gBACtB,0BAA0B;aAC3B,CAAC;SACH,CAAC,CAAC;QAEH,MAAM,mBAAmB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QACjG,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/review.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/review.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CA0ChE"}
|
|
@@ -3,6 +3,8 @@ import { executeReview } from '@zhixuan92/multi-model-agent-core/executors/revie
|
|
|
3
3
|
import { sendError, sendJson } from '../../errors.js';
|
|
4
4
|
import { asyncDispatch } from '../../async-dispatch.js';
|
|
5
5
|
import { emitRequestReceived } from '../../request-observability.js';
|
|
6
|
+
import { assertCrossTierConfigured } from '../../cross-tier-guard.js';
|
|
7
|
+
import { resolveReadOnlyReviewFlag } from '@zhixuan92/multi-model-agent-core/config/read-only-review-flag';
|
|
6
8
|
export function buildReviewHandler(deps) {
|
|
7
9
|
return async (_req, res, _params, ctx) => {
|
|
8
10
|
const parsed = review.inputSchema.safeParse(ctx.body);
|
|
@@ -12,6 +14,9 @@ export function buildReviewHandler(deps) {
|
|
|
12
14
|
});
|
|
13
15
|
return;
|
|
14
16
|
}
|
|
17
|
+
const flag = resolveReadOnlyReviewFlag();
|
|
18
|
+
if (flag.isEnabledFor('review_code') && !assertCrossTierConfigured(deps.config, res))
|
|
19
|
+
return;
|
|
15
20
|
const input = parsed.data;
|
|
16
21
|
const cwd = ctx.cwd;
|
|
17
22
|
const reserveResult = deps.projectRegistry.reserveProject(cwd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/review.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/review.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,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AAiB,CAAC,GAAG,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QAC7C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC;YAC3C,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,GAAG;YACf,QAAQ;YACR,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,EAAE;YAClB,IAAI;YACJ,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE;gBAC/B,OAAO,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC,CAAC;QAEH,MAAM,mBAAmB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAElG,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/verify.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/verify.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CA0ChE"}
|
|
@@ -3,6 +3,8 @@ import { executeVerify } from '@zhixuan92/multi-model-agent-core/executors/verif
|
|
|
3
3
|
import { sendError, sendJson } from '../../errors.js';
|
|
4
4
|
import { asyncDispatch } from '../../async-dispatch.js';
|
|
5
5
|
import { emitRequestReceived } from '../../request-observability.js';
|
|
6
|
+
import { assertCrossTierConfigured } from '../../cross-tier-guard.js';
|
|
7
|
+
import { resolveReadOnlyReviewFlag } from '@zhixuan92/multi-model-agent-core/config/read-only-review-flag';
|
|
6
8
|
export function buildVerifyHandler(deps) {
|
|
7
9
|
return async (_req, res, _params, ctx) => {
|
|
8
10
|
const parsed = verify.inputSchema.safeParse(ctx.body);
|
|
@@ -12,6 +14,9 @@ export function buildVerifyHandler(deps) {
|
|
|
12
14
|
});
|
|
13
15
|
return;
|
|
14
16
|
}
|
|
17
|
+
const flag = resolveReadOnlyReviewFlag();
|
|
18
|
+
if (flag.isEnabledFor('verify_work') && !assertCrossTierConfigured(deps.config, res))
|
|
19
|
+
return;
|
|
15
20
|
const input = parsed.data;
|
|
16
21
|
const cwd = ctx.cwd;
|
|
17
22
|
const reserveResult = deps.projectRegistry.reserveProject(cwd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/verify.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/verify.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,oD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M,EAAE,GAAG,aAAa,CAAC,cAAc,CAAC;QACxC,EAAE,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QAC7C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC;YAC3C,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,GAAG;YACf,QAAQ;YACR,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,EAAE;YAClB,IAAI;YACJ,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE;gBAC/B,OAAO,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC,CAAC;QAEH,MAAM,mBAAmB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAElG,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -3,34 +3,46 @@
|
|
|
3
3
|
### POST /<tool>?cwd=<abs> — dispatch response (202)
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
|
-
{
|
|
7
|
-
"batchId": "<uuid>",
|
|
8
|
-
"state": "pending"
|
|
9
|
-
}
|
|
6
|
+
{ "batchId": "<uuid>", "statusUrl": "/batch/<uuid>" }
|
|
10
7
|
```
|
|
11
8
|
|
|
9
|
+
Use `batchId` to poll. `statusUrl` is a convenience pointer.
|
|
10
|
+
|
|
12
11
|
### GET /batch/:id — polling response
|
|
13
12
|
|
|
13
|
+
The HTTP status is the state discriminator:
|
|
14
|
+
|
|
15
|
+
| Status | Meaning |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `202 text/plain` | Still pending — body is the running headline string (e.g. `"1/2 running, 47s elapsed"`) |
|
|
18
|
+
| `200 application/json` | Terminal — body is the uniform 7-field envelope below |
|
|
19
|
+
| `404` / `401` / `5xx` | Error — see Error response below; stop polling |
|
|
20
|
+
|
|
21
|
+
The terminal JSON envelope always has these 7 fields. Each may be a real value or a `not_applicable` sentinel:
|
|
22
|
+
|
|
14
23
|
```json
|
|
15
24
|
{
|
|
16
|
-
"batchId": "<uuid>",
|
|
17
|
-
"state": "pending | running | awaiting_clarification | complete | failed | expired",
|
|
18
|
-
"proposedInterpretation": "<string>",
|
|
19
|
-
"results": [ ... ],
|
|
20
25
|
"headline": "<string>",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
26
|
+
"results": [ /* per-task result objects */ ],
|
|
27
|
+
"batchTimings": { /* timings */ },
|
|
28
|
+
"costSummary": { /* cost roll-up */ },
|
|
29
|
+
"structuredReport": { /* parsed sections */ },
|
|
30
|
+
"error": { "kind": "not_applicable", "reason": "batch succeeded" },
|
|
31
|
+
"proposedInterpretation": { "kind": "not_applicable", "reason": "batch not awaiting clarification" }
|
|
23
32
|
}
|
|
24
33
|
```
|
|
25
34
|
|
|
26
|
-
|
|
35
|
+
Read the envelope by the shape of `error` and `proposedInterpretation`:
|
|
27
36
|
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
| Shape | Meaning |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `error` is a real object (with `code` / `message`) | Batch failed — read `error.code` + `error.message` |
|
|
40
|
+
| `proposedInterpretation` is a string | Batch is awaiting clarification — invoke `mma-clarifications` |
|
|
41
|
+
| Both are `{kind: "not_applicable", ...}` sentinels | Batch succeeded — read `results` |
|
|
30
42
|
|
|
31
43
|
### GET /batch/:id?taskIndex=N — single task slice
|
|
32
44
|
|
|
33
|
-
|
|
45
|
+
Same 7-field envelope. `results` contains exactly the task at index `N`. Returns `404 unknown_task_index` if `N` is out of range.
|
|
34
46
|
|
|
35
47
|
### Error response (4xx / 5xx)
|
|
36
48
|
|
|
@@ -38,9 +50,8 @@ Returns the same shape but `results` contains only the task at index `N`.
|
|
|
38
50
|
{
|
|
39
51
|
"error": "<code>",
|
|
40
52
|
"message": "<human-readable>",
|
|
41
|
-
"details": {
|
|
53
|
+
"details": { /* optional structured context, e.g. fieldErrors for 400 */ }
|
|
42
54
|
}
|
|
43
55
|
```
|
|
44
56
|
|
|
45
|
-
`details` is optional and present only when the server has structured
|
|
46
|
-
additional context (e.g. `fieldErrors` for validation failures).
|
|
57
|
+
`details` is optional and present only when the server has structured additional context.
|
|
@@ -8,7 +8,7 @@ when_to_use: >-
|
|
|
8
8
|
User asks for a doc/spec/config audit OR a methodology skill
|
|
9
9
|
(superpowers:dispatching-parallel-agents, /security-review) points at one AND
|
|
10
10
|
mmagent is running. Audit on PROSE/SPEC docs — use mma-review for source code.
|
|
11
|
-
version: 3.
|
|
11
|
+
version: 3.8.1
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# mma-audit
|
|
@@ -72,6 +72,27 @@ BATCH_ID=$(echo "$BATCH" | jq -r '.batchId')
|
|
|
72
72
|
|
|
73
73
|
@include _shared/response-shape.md
|
|
74
74
|
|
|
75
|
+
## Reading the review verdicts (annotation model — 3.8.1+)
|
|
76
|
+
|
|
77
|
+
The terminal envelope includes:
|
|
78
|
+
- `specReviewVerdict: 'not_applicable'` — read-only routes have no spec review stage.
|
|
79
|
+
- `qualityReviewVerdict` — outcome of the single annotation pass.
|
|
80
|
+
- `roundsUsed` — `1` when reviewer ran (annotated or errored), `0` when reviewer was skipped.
|
|
81
|
+
|
|
82
|
+
There is no rework loop. The reviewer annotates each finding in place and exits — never gates, never causes the worker to re-run.
|
|
83
|
+
|
|
84
|
+
Action per `qualityReviewVerdict`:
|
|
85
|
+
- `'annotated'` — every finding in `findings[]` has `reviewerConfidence` (integer 0-100) and possibly `reviewerSeverity`. Sort or filter by confidence; treat low-confidence findings with skepticism.
|
|
86
|
+
- `'skipped'` — kill switch (`MMAGENT_READ_ONLY_REVIEW=disabled` or per-route `MMAGENT_READ_ONLY_REVIEW_AUDIT=disabled`) bypassed the reviewer. Findings carry no reviewer fields; treat as raw worker output.
|
|
87
|
+
- `'error'` — reviewer call or response parsing failed. Findings have no reviewer fields; fall back to caution.
|
|
88
|
+
|
|
89
|
+
### Per-finding reviewer fields
|
|
90
|
+
|
|
91
|
+
Every finding the worker emits has the standard fields (`id`, `severity`, `claim`, `evidence`, `suggestion?`). After a successful annotation pass, two more fields are added:
|
|
92
|
+
|
|
93
|
+
- `reviewerConfidence` (integer 0-100): how confident the reviewer is that the finding is correct, on-brief, and grounded. Use as a filter (`>=70`) or a sort key for triage.
|
|
94
|
+
- `reviewerSeverity?` (`'high' | 'medium' | 'low'`): only present when the reviewer disagrees with the worker's `severity`. Workers tend to inflate severity; use this to dial down. Trust `reviewerSeverity` over `severity` when present.
|
|
95
|
+
|
|
75
96
|
## Best practices
|
|
76
97
|
|
|
77
98
|
This skill is one step in the larger flow described in `multi-model-agent` → "Best practices". Recipes that involve `mma-audit`:
|
|
@@ -12,7 +12,7 @@ when_to_use: >-
|
|
|
12
12
|
`proposedInterpretation` is a hard gate — the batch is paused, not
|
|
13
13
|
informational. The batch will not complete until the caller responds. Treating
|
|
14
14
|
it as advisory is the clarification-as-info anti-pattern (AP5).
|
|
15
|
-
version: 3.
|
|
15
|
+
version: 3.8.1
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# mma-clarifications
|
|
@@ -12,7 +12,7 @@ when_to_use: >-
|
|
|
12
12
|
Register once here, then pass the ID via `contextBlockIds` on mma-delegate /
|
|
13
13
|
mma-execute-plan / mma-audit / mma-review / mma-verify / mma-debug /
|
|
14
14
|
mma-investigate. Cheaper and faster than inlining the same content N times.
|
|
15
|
-
version: 3.
|
|
15
|
+
version: 3.8.1
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# mma-context-blocks
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
read files, reproduce, trace — OR a methodology skill
|
|
11
11
|
(superpowers:systematic-debugging) points at the investigation step. Delegate
|
|
12
12
|
the read/reproduce/trace; the main agent stays on the hypothesis and the fix.
|
|
13
|
-
version: 3.
|
|
13
|
+
version: 3.8.1
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-debug
|
|
@@ -78,6 +78,27 @@ BATCH_ID=$(echo "$BATCH" | jq -r '.batchId')
|
|
|
78
78
|
|
|
79
79
|
@include _shared/response-shape.md
|
|
80
80
|
|
|
81
|
+
## Reading the review verdicts (annotation model — 3.8.1+)
|
|
82
|
+
|
|
83
|
+
The terminal envelope includes:
|
|
84
|
+
- `specReviewVerdict: 'not_applicable'` — read-only routes have no spec review stage.
|
|
85
|
+
- `qualityReviewVerdict` — outcome of the single annotation pass.
|
|
86
|
+
- `roundsUsed` — `1` when reviewer ran (annotated or errored), `0` when reviewer was skipped.
|
|
87
|
+
|
|
88
|
+
There is no rework loop. The reviewer annotates each finding in place and exits — never gates, never causes the worker to re-run.
|
|
89
|
+
|
|
90
|
+
Action per `qualityReviewVerdict`:
|
|
91
|
+
- `'annotated'` — every finding in `findings[]` has `reviewerConfidence` (integer 0-100) and possibly `reviewerSeverity`. Sort or filter by confidence; treat low-confidence findings with skepticism.
|
|
92
|
+
- `'skipped'` — kill switch (`MMAGENT_READ_ONLY_REVIEW=disabled` or per-route `MMAGENT_READ_ONLY_REVIEW_DEBUG=disabled`) bypassed the reviewer. Findings carry no reviewer fields; treat as raw worker output.
|
|
93
|
+
- `'error'` — reviewer call or response parsing failed. Findings have no reviewer fields; fall back to caution.
|
|
94
|
+
|
|
95
|
+
### Per-finding reviewer fields
|
|
96
|
+
|
|
97
|
+
Every finding the worker emits has the standard fields (`id`, `severity`, `claim`, `evidence`, `suggestion?`). After a successful annotation pass, two more fields are added:
|
|
98
|
+
|
|
99
|
+
- `reviewerConfidence` (integer 0-100): how confident the reviewer is that the finding is correct, on-brief, and grounded. Use as a filter (`>=70`) or a sort key for triage.
|
|
100
|
+
- `reviewerSeverity?` (`'high' | 'medium' | 'low'`): only present when the reviewer disagrees with the worker's `severity`. Workers tend to inflate severity; use this to dial down. Trust `reviewerSeverity` over `severity` when present.
|
|
101
|
+
|
|
81
102
|
## Best practices
|
|
82
103
|
|
|
83
104
|
This skill is one step in the larger flow described in `multi-model-agent` → "Best practices". Recipes that involve `mma-debug`:
|
|
@@ -11,7 +11,7 @@ when_to_use: >-
|
|
|
11
11
|
and keep main context free. If a plan file exists → use mma-execute-plan. If
|
|
12
12
|
the task is audit / review / verify / debug / investigate → use the matching
|
|
13
13
|
specialized skill.
|
|
14
|
-
version: 3.
|
|
14
|
+
version: 3.8.1
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
# mma-delegate
|
|
@@ -65,6 +65,7 @@ Dispatch one or more ad-hoc tasks to workers concurrently. Each task is an indep
|
|
|
65
65
|
| `tasks[].filePaths` | string[] | no | Files the worker focuses on |
|
|
66
66
|
| `tasks[].done` | string | no | Acceptance criteria |
|
|
67
67
|
| `tasks[].contextBlockIds` | string[] | no | IDs from `mma-context-blocks` |
|
|
68
|
+
| `tasks[].maxCostUSD` | number | no | Per-task cost cap in USD (positive finite). Default 10 when omitted. |
|
|
68
69
|
| `tasks[].verifyCommand` | string[] | no | See verify-and-review snippet below |
|
|
69
70
|
| `tasks[].reviewPolicy` | `"full"` / `"spec_only"` / `"diff_only"` / `"off"` | no | See verify-and-review snippet below. Default `"full"` |
|
|
70
71
|
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
superpowers:subagent-driven-development / superpowers:executing-plans —
|
|
11
11
|
workers are cheaper and don't pollute main context. Task descriptors must
|
|
12
12
|
match plan headings verbatim.
|
|
13
|
-
version: 3.
|
|
13
|
+
version: 3.8.1
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-execute-plan
|
|
@@ -52,8 +52,7 @@ Dispatch named tasks from a plan file to workers. Each `tasks` string must match
|
|
|
52
52
|
"/project/docs/plan.md",
|
|
53
53
|
"/project/src/auth/login.ts"
|
|
54
54
|
],
|
|
55
|
-
"contextBlockIds": []
|
|
56
|
-
"agentType": "standard"
|
|
55
|
+
"contextBlockIds": []
|
|
57
56
|
}
|
|
58
57
|
```
|
|
59
58
|
|
|
@@ -63,12 +62,14 @@ Dispatch named tasks from a plan file to workers. Each `tasks` string must match
|
|
|
63
62
|
| `context` | string | no | Short additional context not in the plan |
|
|
64
63
|
| `filePaths` | string[] | no | Plan file + relevant source files. Required: the plan file itself. |
|
|
65
64
|
| `contextBlockIds` | string[] | no | IDs from `mma-context-blocks` |
|
|
66
|
-
| `
|
|
65
|
+
| `maxCostUSD` | number | no | Per-task cost cap in USD (positive finite). Default 10 when omitted. |
|
|
67
66
|
| `verifyCommand` | string[] | no | See verify-and-review snippet below |
|
|
68
67
|
| `tasks[].reviewPolicy` | `"full"` / `"spec_only"` / `"diff_only"` / `"off"` | no | See verify-and-review snippet below. Default `"full"`. |
|
|
69
68
|
|
|
70
69
|
@include _shared/verify-and-review.md
|
|
71
70
|
|
|
71
|
+
> **No `agentType` here.** Worker tier is set by the plan and per-route defaults. For ad-hoc work where you need direct tier control, use `mma-delegate`.
|
|
72
|
+
|
|
72
73
|
If the batch reaches `awaiting_clarification`, use `mma-clarifications` to confirm or correct the proposed interpretation.
|
|
73
74
|
|
|
74
75
|
## Full example
|
|
@@ -12,7 +12,7 @@ when_to_use: >-
|
|
|
12
12
|
git-history queries. OR you are about to read 3+ files / run any grep in main
|
|
13
13
|
context — that's the inline-labor-leakage anti-pattern (AP2); delegate to this
|
|
14
14
|
skill instead.
|
|
15
|
-
version: 3.
|
|
15
|
+
version: 3.8.1
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# mma-investigate
|
|
@@ -76,9 +76,10 @@ digraph when_to_use {
|
|
|
76
76
|
| `question` | string | yes | Natural-language investigation question |
|
|
77
77
|
| `filePaths` | string[] | no | Anchor paths the worker starts from. Worker may grep beyond. |
|
|
78
78
|
| `contextBlockIds` | string[] | no | IDs from `mma-context-blocks` — enables follow-up / delta investigation |
|
|
79
|
-
| `agentType` | `'standard' \| 'complex'` | no | Caller override of the route default (`'complex'`) |
|
|
80
79
|
| `tools` | `'none' \| 'readonly'` | no | Default `'readonly'`. `'no-shell'` and `'full'` are rejected — investigation is read-only |
|
|
81
80
|
|
|
81
|
+
> Worker tier for `mma-investigate` is hardcoded to `complex` and is not caller-configurable. Sending `agentType` is rejected with HTTP 400.
|
|
82
|
+
|
|
82
83
|
**Anchor narrow questions with `filePaths`:**
|
|
83
84
|
|
|
84
85
|
❌ `{ "question": "Where is parseConfig called?" }` — searches the whole repo
|
|
@@ -123,6 +124,27 @@ Each task carries an `investigation` field on its per-task report:
|
|
|
123
124
|
|
|
124
125
|
`workerStatus` is one of `done`, `done_with_concerns`, `needs_context`, `blocked`. When `done_with_concerns`, the per-task report carries `incompleteReason` (`turn_cap`, `cost_cap`, `timeout`, or `missing_sections`). When `needs_context`, the worker flagged a `[needs_context]` bullet under `## Unresolved` — re-dispatch with extra context (anchor paths, a context block, or a clarification turn).
|
|
125
126
|
|
|
127
|
+
## Reading the review verdicts (annotation model — 3.8.1+)
|
|
128
|
+
|
|
129
|
+
The terminal envelope includes:
|
|
130
|
+
- `specReviewVerdict: 'not_applicable'` — read-only routes have no spec review stage.
|
|
131
|
+
- `qualityReviewVerdict` — outcome of the single annotation pass.
|
|
132
|
+
- `roundsUsed` — `1` when reviewer ran (annotated or errored), `0` when reviewer was skipped.
|
|
133
|
+
|
|
134
|
+
There is no rework loop. The reviewer annotates each finding in place and exits — never gates, never causes the worker to re-run.
|
|
135
|
+
|
|
136
|
+
Action per `qualityReviewVerdict`:
|
|
137
|
+
- `'annotated'` — every finding in `findings[]` has `reviewerConfidence` (integer 0-100) and possibly `reviewerSeverity`. Sort or filter by confidence; treat low-confidence findings with skepticism.
|
|
138
|
+
- `'skipped'` — kill switch (`MMAGENT_READ_ONLY_REVIEW=disabled` or per-route `MMAGENT_READ_ONLY_REVIEW_INVESTIGATE=disabled`) bypassed the reviewer. Findings carry no reviewer fields; treat as raw worker output.
|
|
139
|
+
- `'error'` — reviewer call or response parsing failed. Findings have no reviewer fields; fall back to caution.
|
|
140
|
+
|
|
141
|
+
### Per-finding reviewer fields
|
|
142
|
+
|
|
143
|
+
Every finding the worker emits has the standard fields (`id`, `severity`, `claim`, `evidence`, `suggestion?`). After a successful annotation pass, two more fields are added:
|
|
144
|
+
|
|
145
|
+
- `reviewerConfidence` (integer 0-100): how confident the reviewer is that the finding is correct, on-brief, and grounded. Use as a filter (`>=70`) or a sort key for triage.
|
|
146
|
+
- `reviewerSeverity?` (`'high' | 'medium' | 'low'`): only present when the reviewer disagrees with the worker's `severity`. Workers tend to inflate severity; use this to dial down. Trust `reviewerSeverity` over `severity` when present.
|
|
147
|
+
|
|
126
148
|
## Best practices
|
|
127
149
|
|
|
128
150
|
This skill is one step in the larger flow described in `multi-model-agent` → "Best practices". Recipes that involve `mma-investigate`:
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
you want to re-try the failed indices only. Prefer this over re-dispatching
|
|
11
11
|
the whole batch or inline-retrying — it's idempotent and preserves the
|
|
12
12
|
original batch's diagnostics.
|
|
13
|
-
version: 3.
|
|
13
|
+
version: 3.8.1
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-retry
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
AND mmagent is running. Delegate so each file reviews on its own worker; the
|
|
11
11
|
main agent only decides what to merge. Review on SOURCE CODE — use mma-audit
|
|
12
12
|
for prose specs / configs.
|
|
13
|
-
version: 3.
|
|
13
|
+
version: 3.8.1
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-review
|
|
@@ -75,6 +75,27 @@ BATCH_ID=$(echo "$BATCH" | jq -r '.batchId')
|
|
|
75
75
|
|
|
76
76
|
@include _shared/response-shape.md
|
|
77
77
|
|
|
78
|
+
## Reading the review verdicts (annotation model — 3.8.1+)
|
|
79
|
+
|
|
80
|
+
The terminal envelope includes:
|
|
81
|
+
- `specReviewVerdict: 'not_applicable'` — read-only routes have no spec review stage.
|
|
82
|
+
- `qualityReviewVerdict` — outcome of the single annotation pass.
|
|
83
|
+
- `roundsUsed` — `1` when reviewer ran (annotated or errored), `0` when reviewer was skipped.
|
|
84
|
+
|
|
85
|
+
There is no rework loop. The reviewer annotates each finding in place and exits — never gates, never causes the worker to re-run.
|
|
86
|
+
|
|
87
|
+
Action per `qualityReviewVerdict`:
|
|
88
|
+
- `'annotated'` — every finding in `findings[]` has `reviewerConfidence` (integer 0-100) and possibly `reviewerSeverity`. Sort or filter by confidence; treat low-confidence findings with skepticism.
|
|
89
|
+
- `'skipped'` — kill switch (`MMAGENT_READ_ONLY_REVIEW=disabled` or per-route `MMAGENT_READ_ONLY_REVIEW_REVIEW=disabled`) bypassed the reviewer. Findings carry no reviewer fields; treat as raw worker output.
|
|
90
|
+
- `'error'` — reviewer call or response parsing failed. Findings have no reviewer fields; fall back to caution.
|
|
91
|
+
|
|
92
|
+
### Per-finding reviewer fields
|
|
93
|
+
|
|
94
|
+
Every finding the worker emits has the standard fields (`id`, `severity`, `claim`, `evidence`, `suggestion?`). After a successful annotation pass, two more fields are added:
|
|
95
|
+
|
|
96
|
+
- `reviewerConfidence` (integer 0-100): how confident the reviewer is that the finding is correct, on-brief, and grounded. Use as a filter (`>=70`) or a sort key for triage.
|
|
97
|
+
- `reviewerSeverity?` (`'high' | 'medium' | 'low'`): only present when the reviewer disagrees with the worker's `severity`. Workers tend to inflate severity; use this to dial down. Trust `reviewerSeverity` over `severity` when present.
|
|
98
|
+
|
|
78
99
|
## Best practices
|
|
79
100
|
|
|
80
101
|
This skill is one step in the larger flow described in `multi-model-agent` → "Best practices". Recipes that involve `mma-review`:
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
against implemented work BEFORE claiming success. Delegate so each checklist
|
|
11
11
|
item gets independent evidence-gathering on a worker. Use this BEFORE saying
|
|
12
12
|
"done" — never after.
|
|
13
|
-
version: 3.
|
|
13
|
+
version: 3.8.1
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-verify
|
|
@@ -76,6 +76,27 @@ BATCH_ID=$(echo "$BATCH" | jq -r '.batchId')
|
|
|
76
76
|
|
|
77
77
|
@include _shared/response-shape.md
|
|
78
78
|
|
|
79
|
+
## Reading the review verdicts (annotation model — 3.8.1+)
|
|
80
|
+
|
|
81
|
+
The terminal envelope includes:
|
|
82
|
+
- `specReviewVerdict: 'not_applicable'` — read-only routes have no spec review stage.
|
|
83
|
+
- `qualityReviewVerdict` — outcome of the single annotation pass.
|
|
84
|
+
- `roundsUsed` — `1` when reviewer ran (annotated or errored), `0` when reviewer was skipped.
|
|
85
|
+
|
|
86
|
+
There is no rework loop. The reviewer annotates each finding in place and exits — never gates, never causes the worker to re-run.
|
|
87
|
+
|
|
88
|
+
Action per `qualityReviewVerdict`:
|
|
89
|
+
- `'annotated'` — every finding in `findings[]` has `reviewerConfidence` (integer 0-100) and possibly `reviewerSeverity`. Sort or filter by confidence; treat low-confidence findings with skepticism.
|
|
90
|
+
- `'skipped'` — kill switch (`MMAGENT_READ_ONLY_REVIEW=disabled` or per-route `MMAGENT_READ_ONLY_REVIEW_VERIFY=disabled`) bypassed the reviewer. Findings carry no reviewer fields; treat as raw worker output.
|
|
91
|
+
- `'error'` — reviewer call or response parsing failed. Findings have no reviewer fields; fall back to caution.
|
|
92
|
+
|
|
93
|
+
### Per-finding reviewer fields
|
|
94
|
+
|
|
95
|
+
Every finding the worker emits has the standard fields (`id`, `severity`, `claim`, `evidence`, `suggestion?`). After a successful annotation pass, two more fields are added:
|
|
96
|
+
|
|
97
|
+
- `reviewerConfidence` (integer 0-100): how confident the reviewer is that the finding is correct, on-brief, and grounded. Use as a filter (`>=70`) or a sort key for triage.
|
|
98
|
+
- `reviewerSeverity?` (`'high' | 'medium' | 'low'`): only present when the reviewer disagrees with the worker's `severity`. Workers tend to inflate severity; use this to dial down. Trust `reviewerSeverity` over `severity` when present.
|
|
99
|
+
|
|
79
100
|
## Best practices
|
|
80
101
|
|
|
81
102
|
This skill is one step in the larger flow described in `multi-model-agent` → "Best practices". Recipes that involve `mma-verify`:
|
|
@@ -11,7 +11,7 @@ when_to_use: >-
|
|
|
11
11
|
tasks — AND mmagent is running. Read this once, pick the matching mma-* skill,
|
|
12
12
|
and delegate there. Applies equally whether the user invoked a superpowers
|
|
13
13
|
methodology skill or asked directly.
|
|
14
|
-
version: 3.
|
|
14
|
+
version: 3.8.1
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
# multi-model-agent (router)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhixuan92/multi-model-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Standalone HTTP server for multi-model-agent. Routes tool-invocation work to Claude, Codex, or OpenAI-compatible sub-agents with async-polling REST dispatch and installable skills for Claude Code, Gemini CLI, Codex CLI, and Cursor.",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@asteasolutions/zod-to-openapi": "^8.5.0",
|
|
55
|
-
"@zhixuan92/multi-model-agent-core": "^3.
|
|
55
|
+
"@zhixuan92/multi-model-agent-core": "^3.8.1",
|
|
56
56
|
"gray-matter": "^4.0.3",
|
|
57
57
|
"minimist": "^1.2.8",
|
|
58
58
|
"proper-lockfile": "^4.1.2",
|