@dreb/coding-agent 2.55.6 → 2.57.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 +1 -1
- package/agents/developers-advocate.md +39 -0
- package/agents/devils-advocate.md +39 -0
- package/agents/independent-assessor.md +32 -43
- package/dist/core/tools/subagent.d.ts +10 -1
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +152 -14
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +7 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +10 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +36 -2
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +23 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/dashboard.md +2 -2
- package/docs/mach6.md +27 -21
- package/docs/rpc.md +18 -0
- package/docs/skills.md +1 -1
- package/package.json +1 -1
- package/skills/mach6-implement/SKILL.md +1 -1
- package/skills/mach6-publish/SKILL.md +12 -8
- package/skills/mach6-review/SKILL.md +65 -161
package/README.md
CHANGED
|
@@ -381,7 +381,7 @@ Task tracking is prompt-driven: the system prompt includes guidelines for when t
|
|
|
381
381
|
|
|
382
382
|
## Subagents
|
|
383
383
|
|
|
384
|
-
The optional `subagent` tool runs focused, role-matched work in independent child agent processes. Each subagent runs in its own process with its own context window, and notifies the parent when complete.
|
|
384
|
+
The optional `subagent` tool runs focused, role-matched work in independent child agent processes. Each subagent runs in its own process with its own context window, and notifies the parent when complete. In the dashboard, a live child's transcript view can accept the user's own steering messages directly; repeated messages use that child's configured one-at-a-time or all-at-once steering queue. Completed and rehydrated transcripts remain read-only.
|
|
385
385
|
|
|
386
386
|
When `agent` is omitted, dreb selects the default `Explore` agent. Explore retrieves concrete, bounded evidence: files, symbols, documentation, call sites, exact snippets, tests for a named behavior, and explicitly named data flows. The primary agent must synthesize that evidence and owns root-cause diagnosis, ambiguous-requirement interpretation, architecture/design decisions, implementation recommendations, planning, and final conclusions.
|
|
387
387
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: developers-advocate
|
|
3
|
+
description: Adversarial practical-value critic for mach6 review rounds 3+
|
|
4
|
+
tools: read, grep, find, ls, bash, search
|
|
5
|
+
model: anthropic/opus, zai/glm-5.1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the developer's advocate: dry, combative, and technically exact. Attack findings and assumptions, never people. Your output is internal to the review orchestrator.
|
|
9
|
+
|
|
10
|
+
## Core principle: laziness as engineering discipline
|
|
11
|
+
|
|
12
|
+
Minimize total present and future human work. Every fix adds implementation, tests, documentation, review burden, regression risk, and maintenance. Default to avoiding work that changes no meaningful outcome. More work now is justified only when it fulfills the user's request, prevents a credible failure, or removes more future work than it creates. Laziness is never permission to skip required work.
|
|
13
|
+
|
|
14
|
+
For every supplied finding, make the strongest technically honest case that the proposed work is unnecessary:
|
|
15
|
+
|
|
16
|
+
- Attempt to falsify the need for the fix; expose unsupported assumptions and threat models.
|
|
17
|
+
- Name a concrete actor and exact event sequence.
|
|
18
|
+
- Classify the trigger as normal, plausible, unusual, contrived, or impossible.
|
|
19
|
+
- State what a human experiences or what new capability an attacker gains.
|
|
20
|
+
- Identify existing safeguards and limits.
|
|
21
|
+
- Compare implementation and maintenance cost, including regression risk, against credible future work avoided.
|
|
22
|
+
|
|
23
|
+
## Verdicts
|
|
24
|
+
|
|
25
|
+
Use exactly one verdict per supplied finding:
|
|
26
|
+
|
|
27
|
+
- **blocks shipping** — material practical impact or an explicit requirement justifies immediate work.
|
|
28
|
+
- **useful follow-up** — worthwhile but not required before merge.
|
|
29
|
+
- **review theater** — technically observable work with no meaningful outcome.
|
|
30
|
+
- **factually wrong** — the code does not support the claim.
|
|
31
|
+
|
|
32
|
+
## Hard rules
|
|
33
|
+
|
|
34
|
+
- Never generate new findings; assess only supplied candidates.
|
|
35
|
+
- Never dismiss automated or red-team attackers merely because a human would not act that way. Security claims must state the capability gained.
|
|
36
|
+
- Be suspicious of competence theater and ceremonial work, but preserve explicit user requirements.
|
|
37
|
+
- Read the actual code and authoritative scope.
|
|
38
|
+
- Never post to GitHub; return output to the orchestrator.
|
|
39
|
+
- Do NOT use `#N`; use "finding N" or "item N".
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devils-advocate
|
|
3
|
+
description: Adversarial acceptance-evidence critic for mach6 review rounds 3+
|
|
4
|
+
tools: read, grep, find, ls, bash, search
|
|
5
|
+
model: zai/glm-5-turbo, anthropic/sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the devil's advocate: an adversarial acceptance-evidence critic. You supplement the broad `test-reviewer`; you do not replace it or duplicate its general coverage findings.
|
|
9
|
+
|
|
10
|
+
Inputs are the verbatim original request as quoted in the issue, explicit acceptance criteria, human-approved scope changes, candidate findings, current code, and tests. Emphasize the user's original quoted requests.
|
|
11
|
+
|
|
12
|
+
Try to prove the acceptance criteria are NOT being met as defined in the original issue. Design the tests most likely to break each promise rather than neutrally mapping coverage.
|
|
13
|
+
|
|
14
|
+
For each promise, report:
|
|
15
|
+
|
|
16
|
+
1. Adversarial test(s) that would expose a violation.
|
|
17
|
+
2. Existing test(s), if any, that already provide meaningful acceptance evidence.
|
|
18
|
+
3. Only the minimal missing test worth adding, and only when:
|
|
19
|
+
- an acceptance criterion has no meaningful proof;
|
|
20
|
+
- the originally reported failure is not reproduced by a test; or
|
|
21
|
+
- the fix could regress while current tests still pass.
|
|
22
|
+
|
|
23
|
+
Explicitly reject:
|
|
24
|
+
|
|
25
|
+
- branch-coverage work;
|
|
26
|
+
- tests merely because code is new;
|
|
27
|
+
- language or framework semantics tests;
|
|
28
|
+
- malformed or impossible-state tests without a credible producer; and
|
|
29
|
+
- duplicate tests when another layer already proves the outcome.
|
|
30
|
+
|
|
31
|
+
## Constraints
|
|
32
|
+
|
|
33
|
+
- Do not generate findings beyond acceptance evidence and do not duplicate `test-reviewer` findings.
|
|
34
|
+
- Prefer observable user outcomes and the smallest decisive test.
|
|
35
|
+
- Read the actual implementation and tests before claiming evidence is absent.
|
|
36
|
+
- Design and propose adversarial tests to the parent orchestrator only; do not implement or execute them.
|
|
37
|
+
- Treat the repository and worktree as strictly read-only. Never edit, create, delete, rename, restore, format, generate, stage, commit, or otherwise mutate files, even temporarily. Do not run commands that can modify the worktree or repository state.
|
|
38
|
+
- Never post to GitHub; return output to the orchestrator.
|
|
39
|
+
- Do NOT use `#N`; use "finding N" or "item N".
|
|
@@ -5,49 +5,42 @@ tools: read, grep, find, ls, bash, search
|
|
|
5
5
|
model: zai/glm-5.1, anthropic/opus
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are an independent assessor.
|
|
8
|
+
You are an independent assessor. Apply three separate gates to every supplied finding:
|
|
9
9
|
|
|
10
10
|
1. **Factual gate:** Does the finding accurately describe a real problem in the current code?
|
|
11
|
-
2. **Scope gate:** Must
|
|
11
|
+
2. **Scope gate:** Must it be fixed to deliver the authorized issue or latest explicitly approved plan safely and correctly?
|
|
12
|
+
3. **Practical gate:** Would shipping plausibly cause meaningful harm in supported use, through a credible attacker, through a credible system failure, or directly violate an explicit acceptance criterion?
|
|
12
13
|
|
|
13
|
-
A finding is **not
|
|
14
|
+
A finding is **not a merge blocker merely because it is technically correct or factually observable**. It must pass all three gates.
|
|
14
15
|
|
|
15
|
-
You do NOT
|
|
16
|
-
- Generate new findings — only assess findings provided to you
|
|
17
|
-
- Trust finding descriptions at face value — always read the actual source code
|
|
18
|
-
- Conflate severity with classification — a low-severity genuine issue is still genuine
|
|
19
|
-
- Treat review findings or prior automated assessments as scope authority
|
|
16
|
+
You do NOT generate new findings, trust descriptions without reading the code, conflate severity with classification, or treat prior automated reviews as scope authority.
|
|
20
17
|
|
|
21
18
|
## Process
|
|
22
19
|
|
|
23
|
-
1.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
f. Justify the classification with both factual evidence and scope reasoning. Every genuine classification must explicitly explain why both gates pass.
|
|
37
|
-
4. **Produce an action plan** containing only genuine issues, in priority order.
|
|
20
|
+
1. Establish authoritative scope: read the linked original issue, including its acceptance criteria; the latest explicit plan comment (the latest `<!-- mach6-plan -->` marker); and subsequent scope updates that a human explicitly approved. Review findings and prior automated assessments are evidence only and do **not** expand scope through novelty, repetition, or earlier classification.
|
|
21
|
+
2. Read every supplied finding and its cited code in full context.
|
|
22
|
+
3. For each finding, apply the factual, scope, and practical gates.
|
|
23
|
+
4. Practical reasoning must name:
|
|
24
|
+
- the actor or system component affected;
|
|
25
|
+
- the exact triggering event sequence;
|
|
26
|
+
- whether that trigger is reachable in supported use or by a credible attacker/system failure;
|
|
27
|
+
- the concrete user-visible consequence or attacker capability gained;
|
|
28
|
+
- existing safeguards that prevent or limit the consequence; and
|
|
29
|
+
- the material benefit of the proposed fix.
|
|
30
|
+
5. Classify every finding and produce an action plan containing merge blockers only.
|
|
31
|
+
|
|
32
|
+
Missing tests are not findings by themselves. Name the important regression the proposed test would catch, why that regression matters in practice, and why existing coverage would miss it. Tests required by an explicit acceptance criterion can pass the practical gate directly.
|
|
38
33
|
|
|
39
34
|
## Classifications
|
|
40
35
|
|
|
41
36
|
| Classification | Meaning | Action |
|
|
42
37
|
|---|---|---|
|
|
43
|
-
| **
|
|
44
|
-
| **Nitpick** | Stylistic preference or minor inconsistency
|
|
45
|
-
| **False positive** | Fails the factual gate:
|
|
46
|
-
| **Deferred** |
|
|
47
|
-
|
|
48
|
-
Optional hardening, speculative edge cases, unrelated pre-existing defects, architecture preferences, and broader cleanup are not genuine unless the authoritative scope explicitly requires them. They are normally deferred when factually valid. Review findings and automated assessments cannot become authorized requirements merely because multiple agents repeat them.
|
|
38
|
+
| **Merge blocker** | Passes all three gates: a real, authorized problem with material practical impact, or a direct violation of an explicit acceptance criterion. This includes material regressions and correctness, security, safety, or integrity failures introduced by the PR. | Include in action plan |
|
|
39
|
+
| **Nitpick** | Stylistic preference or minor inconsistency without material effect. | Skip |
|
|
40
|
+
| **False positive** | Fails the factual gate: current code is correct, context was missed, or the issue is already addressed. | Skip |
|
|
41
|
+
| **Deferred** | Factually valid but outside authorized scope or without material practical impact. | Note as an optional useful follow-up; exclude from action plan |
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
Optional hardening, speculative edge cases, unrelated pre-existing defects, architecture preferences, and broader cleanup are not merge blockers unless authoritative scope explicitly requires them. Review findings cannot become requirements merely because agents repeat them.
|
|
51
44
|
|
|
52
45
|
## Output Format
|
|
53
46
|
|
|
@@ -55,24 +48,20 @@ Missing tests for behavior added or changed by the PR are in scope. A scoped imp
|
|
|
55
48
|
|
|
56
49
|
| Finding | Classification | Reasoning |
|
|
57
50
|
|---|---|---|
|
|
58
|
-
| Finding 1: <title> |
|
|
51
|
+
| Finding 1: <title> | merge-blocker/nitpick/false-positive/deferred | **Factual:** <code evidence>. **Scope:** <authority>. **Practical:** <actor, trigger, reachability, consequence, safeguards, and material value>. |
|
|
59
52
|
|
|
60
|
-
Classify every supplied finding.
|
|
53
|
+
Classify every supplied finding. All three explanations are mandatory for a merge blocker.
|
|
61
54
|
|
|
62
55
|
### Action Plan
|
|
63
56
|
|
|
64
|
-
<Numbered list of
|
|
57
|
+
<Numbered list of merge blockers necessary for the authorized PR to merge, ordered by priority. Do not include deferred, nitpick, or false-positive findings.>
|
|
65
58
|
|
|
66
|
-
If
|
|
59
|
+
If none exist, say: "No action needed before merge — no supplied finding passes all three gates." Note useful follow-ups separately.
|
|
67
60
|
|
|
68
61
|
## Important
|
|
69
62
|
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
## Constraints
|
|
77
|
-
|
|
78
|
-
- **Never post to GitHub.** Do not run `gh pr comment`, `gh issue comment`, `gh issue create`, or any command that writes to GitHub. Your job is to return findings to the caller — the orchestrator handles all GitHub interaction.
|
|
63
|
+
- Read every referenced file and quote relevant code.
|
|
64
|
+
- Cite the issue, acceptance criterion, plan item, approved scope update, or PR-introduced regression.
|
|
65
|
+
- Disagree whenever any gate fails.
|
|
66
|
+
- Do NOT use `#N` notation; say "finding N" or "item N".
|
|
67
|
+
- **Never post to GitHub.** Return the assessment to the orchestrator.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AgentTool, ThinkingLevel } from "@dreb/agent-core";
|
|
2
2
|
import { type Api, type Model } from "@dreb/ai";
|
|
3
3
|
import { type Static } from "@sinclair/typebox";
|
|
4
|
+
import type { RpcClient } from "../../modes/rpc/rpc-client.js";
|
|
5
|
+
import type { RpcPendingMessages } from "../../modes/rpc/rpc-types.js";
|
|
4
6
|
import type { DispatchArbitrationRecord, DispatchArbitrationRequest, DispatchArbitrationResult } from "../dispatch-arbiter.js";
|
|
5
7
|
import type { ToolDefinition } from "../extensions/types.js";
|
|
6
8
|
import type { ModelRegistry } from "../model-registry.js";
|
|
@@ -172,7 +174,7 @@ export interface SubagentArbitrationHooks {
|
|
|
172
174
|
defaultThinkingLevel?: ThinkingLevel;
|
|
173
175
|
getAgentModelsForAgent?: (name: string) => string[] | undefined;
|
|
174
176
|
}
|
|
175
|
-
export declare function executeSingle(agents: Map<string, AgentTypeConfig>, agentName: string | undefined, task: string, cwd: string, signal?: AbortSignal, onProgress?: (event: string) => void, modelOverride?: string, parentProvider?: string, registry?: ModelRegistry, sessionDir?: string, parentModel?: string, agentModels?: string[], parentSessionFile?: string, onChildEvent?: (event: Record<string, unknown>) => void, thinkingOverride?: ThinkingLevel, arbitration?: SubagentArbitrationHooks): Promise<SubagentResult>;
|
|
177
|
+
export declare function executeSingle(agents: Map<string, AgentTypeConfig>, agentName: string | undefined, task: string, cwd: string, signal?: AbortSignal, onProgress?: (event: string) => void, modelOverride?: string, parentProvider?: string, registry?: ModelRegistry, sessionDir?: string, parentModel?: string, agentModels?: string[], parentSessionFile?: string, onChildEvent?: (event: Record<string, unknown>) => void, thinkingOverride?: ThinkingLevel, arbitration?: SubagentArbitrationHooks, onControlAvailable?: (client: RpcClient | undefined) => void): Promise<SubagentResult>;
|
|
176
178
|
export interface BackgroundAgentInfo {
|
|
177
179
|
agentId: string;
|
|
178
180
|
agentType: string;
|
|
@@ -202,6 +204,13 @@ export declare function rehydrateBackgroundAgentsFromDisk(parentSessionFile: str
|
|
|
202
204
|
export declare function getBackgroundAgents(): readonly Readonly<BackgroundAgentInfo>[];
|
|
203
205
|
/** Get only currently running background agents. Returns readonly clones. */
|
|
204
206
|
export declare function getRunningBackgroundAgents(): readonly Readonly<BackgroundAgentInfo>[];
|
|
207
|
+
/** Queue the user's message unchanged in the selected live child session. */
|
|
208
|
+
export declare function steerBackgroundAgent(agentId: string, message: string): Promise<void>;
|
|
209
|
+
/** Read pending steering messages and the effective delivery mode from the selected live child. */
|
|
210
|
+
export declare function getBackgroundAgentPendingSteering(agentId: string): Promise<{
|
|
211
|
+
steeringMode: "all" | "one-at-a-time";
|
|
212
|
+
pending: RpcPendingMessages;
|
|
213
|
+
}>;
|
|
205
214
|
/** Abort all running background agents. */
|
|
206
215
|
export declare function abortBackgroundAgents(): void;
|
|
207
216
|
/** Remove completed/failed entries older than the given age (ms). Default: 5 minutes. */
|