@dreb/coding-agent 2.59.2 → 2.60.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 +2 -0
- package/dist/core/agent-session.d.ts +5 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +55 -13
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/model-registry.d.ts +4 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +74 -3
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/settings-manager.d.ts +16 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +34 -6
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -3
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +1 -5
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/mach6.md +4 -4
- package/docs/models.md +27 -3
- package/docs/settings.md +58 -9
- package/package.json +1 -1
- package/skills/mach6-review/SKILL.md +11 -9
package/docs/mach6.md
CHANGED
|
@@ -77,9 +77,9 @@ Run a durable, explicit, round-aware review. It always posts two comments: an **
|
|
|
77
77
|
/skill:mach6-review 53 tests
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Every round runs the applicable code-reviewer, error-auditor, test-reviewer, completeness-checker, and simplifier together in phase one. A specialist is retried rather than omitted if dispatch arbitration or the agent fails. In rounds 1–2, the independent assessor then applies factual, scope, and practical gates. Practical assessment requires a credible actor, exact reachable trigger, concrete consequence, existing safeguards, and material value from fixing the problem; missing tests are not blockers without an important uncovered regression.
|
|
81
81
|
|
|
82
|
-
Round 3+
|
|
82
|
+
Round 3+ continues to review the full PR and all interactions among its changes while using changes since the latest recorded reviewed SHA as supplemental context for verifying prior blockers and identifying new work. Reviews narrow only when the user explicitly requests a targeted scope. Phase two runs independent-assessor, developers-advocate, and devils-advocate in parallel. The developer's advocate attacks the practical value of proposed work; the devil's advocate attacks evidence that the original acceptance promises hold and supplements rather than replaces test-reviewer. A later-round item blocks merge only when the assessor and developer's advocate agree on material practical impact, with parent adjudication based on a concrete trigger-and-outcome sequence.
|
|
83
83
|
|
|
84
84
|
See [Review Agents](#review-agents) below.
|
|
85
85
|
|
|
@@ -132,7 +132,7 @@ Phase one uses specialists with orthogonal incentives and confidence-scored cand
|
|
|
132
132
|
| **error-auditor** | What can fail silently at runtime? | All applicable rounds |
|
|
133
133
|
| **test-reviewer** | What important behavior lacks coverage? | All applicable rounds; never replaced |
|
|
134
134
|
| **completeness-checker** | Does the PR fulfill authoritative scope? | All applicable rounds |
|
|
135
|
-
| **simplifier** | Can changed code be clearer without behavior changes? |
|
|
135
|
+
| **simplifier** | Can changed code be clearer without behavior changes? | Every round; retry on dispatch or agent failure |
|
|
136
136
|
|
|
137
137
|
Phase two assessment agents:
|
|
138
138
|
|
|
@@ -150,7 +150,7 @@ The two advocates intentionally pull in different directions: one challenges the
|
|
|
150
150
|
|
|
151
151
|
- **GitHub as shared memory** — Plans, reviews, assessments, and progress are posted as PR/issue comments with HTML markers (`<!-- mach6-plan -->`, `<!-- mach6-review -->`, etc.) so any future session can pick up context.
|
|
152
152
|
- **Three-gate independent assessment** — Findings must be factual, authorized, and materially practical before becoming merge blockers.
|
|
153
|
-
- **Deliberate counter-pressure** —
|
|
153
|
+
- **Deliberate counter-pressure** — Every round reviews the full PR; later-round deltas supplement that view for fix verification while practical-value skepticism and adversarial acceptance evidence resist ceremonial review work.
|
|
154
154
|
- **Durable accountability checkpoint** — Implementation and fixes are committed, pushed, and recorded before formal review so work cannot be lost or repeatedly rewritten while still local.
|
|
155
155
|
- **User-controlled review cycles** — Only the user starts each formal review or re-review. Agents stop at the checkpoint and suggest the next command rather than autonomously chaining review and fix cycles.
|
|
156
156
|
- **Focused checks remain available** — One-off reviewer/checker subagents may answer narrow correctness questions without becoming a formal mach6 review cycle.
|
package/docs/models.md
CHANGED
|
@@ -81,7 +81,8 @@ Override defaults when you need specific values:
|
|
|
81
81
|
"input": ["text"],
|
|
82
82
|
"contextWindow": 128000,
|
|
83
83
|
"maxTokens": 32000,
|
|
84
|
-
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
|
|
84
|
+
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
|
|
85
|
+
"appendSystemPrompt": "Prefer solutions that fit this local model's context and tool capabilities."
|
|
85
86
|
}
|
|
86
87
|
]
|
|
87
88
|
}
|
|
@@ -89,7 +90,7 @@ Override defaults when you need specific values:
|
|
|
89
90
|
}
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
The file reloads each time you open `/model`.
|
|
93
|
+
The file reloads each time you open `/model`. `/reload` also refreshes model-specific prompt metadata for the active model, so prompt edits do not require a restart.
|
|
93
94
|
|
|
94
95
|
## Supported APIs
|
|
95
96
|
|
|
@@ -202,11 +203,29 @@ Leave `authHeader` unset or `false` for endpoints that expect `x-api-key`.
|
|
|
202
203
|
| `maxTokens` | No | `16384` | Maximum output tokens |
|
|
203
204
|
| `cost` | No | all zeros | `{"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}` (per million tokens) |
|
|
204
205
|
| `compat` | No | provider `compat` | OpenAI compatibility overrides. Merged with provider-level `compat` when both are set. |
|
|
206
|
+
| `systemPrompt` | No | — | Replace dreb's built-in prompt whenever this exact custom model is active. Mutually exclusive with `appendSystemPrompt`. |
|
|
207
|
+
| `appendSystemPrompt` | No | — | Preserve the selected base prompt and append model-specific instructions. Mutually exclusive with `systemPrompt`. |
|
|
205
208
|
|
|
206
209
|
Current behavior:
|
|
207
210
|
- `/model` and `--list-models` list entries by model `id`.
|
|
208
211
|
- The configured `name` is used for model matching and detail/status text.
|
|
209
212
|
|
|
213
|
+
A custom model can keep its behavioral prompt beside its transport and capability metadata:
|
|
214
|
+
set exactly one of `systemPrompt` and `appendSystemPrompt` on that model object. Values must
|
|
215
|
+
be non-empty strings. Model IDs may contain `/`; dreb retains the provider and complete model
|
|
216
|
+
ID as an exact identity.
|
|
217
|
+
|
|
218
|
+
The same behavior is also configurable through an exact `provider/model` entry under
|
|
219
|
+
[`modelSettings`](settings.md#modelsettings) in `settings.json`. Configure prompt behavior for
|
|
220
|
+
a canonical model in only one file. If both `models.json` and `settings.json` declare either
|
|
221
|
+
prompt field for that model, dreb fails loudly instead of selecting a source.
|
|
222
|
+
|
|
223
|
+
An explicit session replacement from `--system-prompt`, `SYSTEM.md`, or an SDK resource
|
|
224
|
+
loader remains stronger than a model's `systemPrompt`. `appendSystemPrompt` follows the
|
|
225
|
+
selected base and existing session append sources. Switching, cycling, or restoring a model
|
|
226
|
+
rebuilds the prompt immediately; `/reload` picks up prompt edits and removals from either
|
|
227
|
+
configuration file.
|
|
228
|
+
|
|
210
229
|
## Overriding Built-in Providers
|
|
211
230
|
|
|
212
231
|
Route a built-in provider through a proxy without redefining models:
|
|
@@ -255,6 +274,7 @@ Use `modelOverrides` to customize specific built-in models without replacing the
|
|
|
255
274
|
"modelOverrides": {
|
|
256
275
|
"anthropic/claude-sonnet-4": {
|
|
257
276
|
"name": "Claude Sonnet 4 (Bedrock Route)",
|
|
277
|
+
"appendSystemPrompt": "Use APIs and capabilities available through the Bedrock route.",
|
|
258
278
|
"compat": {
|
|
259
279
|
"openRouterRouting": {
|
|
260
280
|
"only": ["amazon-bedrock"]
|
|
@@ -267,7 +287,11 @@ Use `modelOverrides` to customize specific built-in models without replacing the
|
|
|
267
287
|
}
|
|
268
288
|
```
|
|
269
289
|
|
|
270
|
-
`modelOverrides` supports these fields per model: `name`, `reasoning`, `input`, `cost` (partial), `contextWindow`, `maxTokens`, `headers`, `compat`.
|
|
290
|
+
`modelOverrides` supports these fields per model: `name`, `reasoning`, `input`, `cost` (partial), `contextWindow`, `maxTokens`, `headers`, `compat`, `systemPrompt`, `appendSystemPrompt`.
|
|
291
|
+
|
|
292
|
+
Prompt fields follow the same rules as custom model entries: choose replacement or append,
|
|
293
|
+
not both; use a non-empty string; and do not also configure prompt behavior for the canonical
|
|
294
|
+
provider/model in `settings.json`.
|
|
271
295
|
|
|
272
296
|
Behavior notes:
|
|
273
297
|
- `modelOverrides` are applied to built-in provider models.
|
package/docs/settings.md
CHANGED
|
@@ -21,7 +21,7 @@ Edit directly or use `/settings` for common options.
|
|
|
21
21
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
22
22
|
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
23
23
|
| `agentModels.models` | object | - | Per-agent model fallback lists for subagents (map of agent name → ordered model IDs). See [agent-models.md](agent-models.md) |
|
|
24
|
-
| `modelSettings` | object | - | Per-model
|
|
24
|
+
| `modelSettings` | object | - | Per-model thinking-display and provider/model system-prompt overrides. See [modelSettings](#modelsettings) |
|
|
25
25
|
|
|
26
26
|
#### agentModels.models
|
|
27
27
|
|
|
@@ -55,9 +55,12 @@ Configurable in the TUI via `/settings` → **Agent Models**. See [agent-models.
|
|
|
55
55
|
|
|
56
56
|
#### modelSettings
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
`modelSettings` supports thinking-display preferences and persistent model-specific system
|
|
59
|
+
prompts.
|
|
60
|
+
|
|
61
|
+
`thinkingDisplay` remains keyed by bare model ID for compatibility. It controls whether
|
|
62
|
+
adaptive-thinking Claude models (Opus and Sonnet 4.6–4.x, plus Claude 5 families) return
|
|
63
|
+
thinking summaries:
|
|
61
64
|
|
|
62
65
|
```json
|
|
63
66
|
{
|
|
@@ -73,12 +76,58 @@ return thinking summaries.
|
|
|
73
76
|
|
|
74
77
|
Anthropic's API defaults Opus 4.7+ to `"omitted"`, so dreb sends `"summarized"` by default
|
|
75
78
|
on adaptive models to keep thinking visible. Set `"omitted"` here to opt into the
|
|
76
|
-
lower-latency behavior. The setting is
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
lower-latency behavior. The setting is honored identically by the main session and by any
|
|
80
|
+
subagent that uses the same model. Non-adaptive models ignore it. It is configurable in the
|
|
81
|
+
TUI via `/settings` → **Show thinking summaries** (shown only when the current model supports
|
|
82
|
+
adaptive thinking).
|
|
83
|
+
|
|
84
|
+
System-prompt settings require an exact canonical `provider/model` key. Use `systemPrompt`
|
|
85
|
+
to replace dreb's built-in prompt, or `appendSystemPrompt` to preserve the selected base
|
|
86
|
+
prompt and append model-specific instructions:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"modelSettings": {
|
|
91
|
+
"openai-codex/gpt-5.6-sol": {
|
|
92
|
+
"appendSystemPrompt": "When implementing a mach6 plan, stop when the work is ready to commit and push."
|
|
93
|
+
},
|
|
94
|
+
"ollama/qwen2.5-coder:7b": {
|
|
95
|
+
"systemPrompt": "You are a coding assistant for this local model. Verify external facts against authoritative sources before answering."
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
79
100
|
|
|
80
|
-
|
|
81
|
-
|
|
101
|
+
For a model defined or overridden in `~/.dreb/agent/models.json`, the same two fields may
|
|
102
|
+
instead live directly on its custom `models[]` object or built-in `modelOverrides` object.
|
|
103
|
+
This keeps a custom model and its behavior together. Do not use both surfaces for one
|
|
104
|
+
canonical model: any prompt declaration in both files is rejected, even if both declarations
|
|
105
|
+
use the same mode.
|
|
106
|
+
|
|
107
|
+
Prompt behavior:
|
|
108
|
+
|
|
109
|
+
- The key is matched as one exact string. Model IDs may themselves contain `/`, so
|
|
110
|
+
`openrouter/anthropic/claude-sonnet-4` means provider `openrouter` and model ID
|
|
111
|
+
`anthropic/claude-sonnet-4`.
|
|
112
|
+
- Bare model-ID keys never apply prompt instructions; this prevents instructions from
|
|
113
|
+
leaking to another provider exposing the same ID.
|
|
114
|
+
- Configure exactly one of `systemPrompt` and `appendSystemPrompt` for a canonical model.
|
|
115
|
+
Defining both, or using an empty/non-string value, fails loudly when dreb builds that
|
|
116
|
+
model's prompt.
|
|
117
|
+
- An explicit session replacement from `--system-prompt`, `SYSTEM.md`, or an SDK resource
|
|
118
|
+
loader takes precedence over `systemPrompt`. `appendSystemPrompt` still appends after
|
|
119
|
+
existing session append sources such as `--append-system-prompt`, `APPEND_SYSTEM.md`, and
|
|
120
|
+
subagent-definition instructions.
|
|
121
|
+
- Switching or cycling models rebuilds the prompt immediately: instructions from the old
|
|
122
|
+
model are removed and instructions for the new model are applied. `/reload` picks up
|
|
123
|
+
external prompt edits and removals from both `settings.json` and `models.json`.
|
|
124
|
+
- Global and project entries follow the existing per-property merge. A project value wins
|
|
125
|
+
for the same field; a merged entry that supplies both prompt modes is rejected rather
|
|
126
|
+
than choosing one silently.
|
|
127
|
+
- Built-in and custom models use the same exact identity. A `models.json` custom model or
|
|
128
|
+
built-in override can own the prompt directly; otherwise use its exact `provider/id` here.
|
|
129
|
+
- A canonical model with prompt behavior in both files is invalid. There is no source
|
|
130
|
+
precedence between `models.json` and `settings.json`.
|
|
82
131
|
|
|
83
132
|
### UI & Display
|
|
84
133
|
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ Track prepare, phase-one review, findings comment, phase-two assessment, assessm
|
|
|
26
26
|
|
|
27
27
|
Extract the required PR number and optional aspects: `code`, `errors`, `tests`, `completeness`, `simplify`.
|
|
28
28
|
|
|
29
|
-
## Step 3: Prepare, determine the round, and establish the
|
|
29
|
+
## Step 3: Prepare, determine the round, and establish the review context
|
|
30
30
|
|
|
31
31
|
Before checkout, run `git status --porcelain`. If non-empty, stop and use `suggest_next` to offer `/skill:mach6-push`.
|
|
32
32
|
|
|
@@ -51,21 +51,23 @@ PRIOR_ROUNDS="$(printf '%s' "$PR_CONTEXT" | jq '[.comments[] | select(.body | st
|
|
|
51
51
|
REVIEW_ROUND="$((PRIOR_ROUNDS + 1))"
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Use `gh pr diff <pr-number>` in every round. The full PR and the interactions among all of its changes are the review target unless the user explicitly requests a narrower review.
|
|
55
55
|
|
|
56
|
-
For
|
|
56
|
+
For round 3+, also extract the most recent parseable full SHA after `Reviewed commit:` in the latest review comment. If found, use `git log <sha>..HEAD` and `git diff <sha>..HEAD` as supplemental context for identifying new changes and verifying prior fixes, never as a replacement for the full PR diff. Extract previous merge blockers and verify that each is fixed. Do not reject a finding merely because the relevant lines are unchanged since the previous round.
|
|
57
|
+
|
|
58
|
+
Mark the PR ready only after all checks pass: `gh pr ready <pr-number>`.
|
|
57
59
|
|
|
58
60
|
## Step 4: Phase one — specialist candidates
|
|
59
61
|
|
|
60
62
|
Agent mapping: `code` → `code-reviewer`; `errors` → `error-auditor`; `tests` → `test-reviewer`; `completeness` → `completeness-checker`; `simplify` → `simplifier`.
|
|
61
63
|
|
|
62
|
-
Without targeted aspects
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
Without targeted aspects, run `code-reviewer`, applicable `error-auditor`, applicable `test-reviewer`, applicable `completeness-checker`, and `simplifier` together in one parallel `subagent` `tasks` call in every round. `test-reviewer` remains present whenever the PR contains testable code changes.
|
|
65
|
+
|
|
66
|
+
With targeted aspects, run only mapped agents while still reviewing the full PR unless the user explicitly requests a narrower target.
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
If dispatch arbitration or a specialist agent fails, retry that specialist. A retry may run separately after the original parallel batch; do not omit a required or requested specialist because its first attempt failed.
|
|
67
69
|
|
|
68
|
-
Give every agent changed paths, full PR context, authoritative scope, actual files, and confidence scoring (0–100; report only candidates at least 80). In round 3+,
|
|
70
|
+
Give every agent changed paths, the full PR diff and context, authoritative scope, actual files, and confidence scoring (0–100; report only candidates at least 80). In round 3+, also provide the prior reviewed SHA, supplemental delta, and previous blockers so agents can verify fixes without narrowing the review target. Verify previous blockers independently even if no agent reports them.
|
|
69
71
|
|
|
70
72
|
## Step 5: Post unverified candidates
|
|
71
73
|
|
|
@@ -99,7 +101,7 @@ Post with a unique temp file and `gh pr comment <pr-number> --body-file "$GH_BOD
|
|
|
99
101
|
|
|
100
102
|
## Step 6: Phase two — assess with counter-pressure
|
|
101
103
|
|
|
102
|
-
All assessors receive identical candidate findings, actual code, full PR/issue context, verbatim original quoted requests, acceptance criteria, approved scope changes, review round
|
|
104
|
+
All assessors receive identical candidate findings, actual code, the full PR diff and PR/issue context, verbatim original quoted requests, acceptance criteria, approved scope changes, and the review round. For round 3+, also provide the latest delta as supplemental fix-verification context without narrowing assessment of the full PR.
|
|
103
105
|
|
|
104
106
|
Apply three gates:
|
|
105
107
|
1. **Factual:** current code contains the problem.
|