mixdog 0.9.102 → 0.9.104

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.
Files changed (65) hide show
  1. package/README.md +13 -5
  2. package/package.json +2 -2
  3. package/scripts/code-graph-description-contract.mjs +1 -1
  4. package/src/defaults/agents.json +0 -28
  5. package/src/defaults/skills/setup/SKILL.md +5 -5
  6. package/src/headless-command.mjs +0 -1
  7. package/src/help.mjs +1 -1
  8. package/src/lib/rules-builder.cjs +7 -112
  9. package/src/output-styles/detailed.md +10 -14
  10. package/src/output-styles/extreme-minimal.md +5 -7
  11. package/src/output-styles/minimal.md +6 -7
  12. package/src/output-styles/simple.md +11 -12
  13. package/src/rules/agent/30-explorer.md +23 -22
  14. package/src/rules/lead/01-general.md +13 -14
  15. package/src/rules/lead/lead-tool.md +1 -1
  16. package/src/rules/shared/01-tool.md +39 -30
  17. package/src/runtime/agent/orchestrator/agent-runtime/agent-dispatch.mjs +2 -13
  18. package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +1 -6
  19. package/src/runtime/agent/orchestrator/config.mjs +3 -6
  20. package/src/runtime/agent/orchestrator/context/collect.mjs +2 -23
  21. package/src/runtime/agent/orchestrator/internal-agents.mjs +4 -45
  22. package/src/runtime/agent/orchestrator/session/agent-loop.mjs +3 -4
  23. package/src/runtime/agent/orchestrator/session/eager-dispatch.mjs +33 -8
  24. package/src/runtime/agent/orchestrator/session/manager/rules-cache.mjs +8 -40
  25. package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +9 -12
  26. package/src/runtime/agent/orchestrator/session/manager/tool-resolution.mjs +13 -9
  27. package/src/runtime/agent/orchestrator/session/manager.mjs +0 -1
  28. package/src/runtime/agent/orchestrator/session/tool-batch.mjs +14 -9
  29. package/src/runtime/agent/orchestrator/stall-policy.mjs +0 -1
  30. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +10 -9
  31. package/src/runtime/agent/orchestrator/tools/builtin/list-tool.mjs +36 -4
  32. package/src/runtime/agent/orchestrator/tools/builtin/search-builders.mjs +2 -0
  33. package/src/runtime/agent/orchestrator/tools/builtin/shell-runtime.mjs +7 -3
  34. package/src/runtime/agent/orchestrator/tools/code-graph-tool-defs.mjs +3 -3
  35. package/src/runtime/agent/orchestrator/tools/patch-tool-defs.mjs +7 -7
  36. package/src/runtime/channels/lib/webhook.mjs +1 -3
  37. package/src/runtime/channels/lib/worker-main.mjs +0 -19
  38. package/src/runtime/media/adapters/codex-image.mjs +10 -4
  39. package/src/runtime/media/adapters/codex-image.test.mjs +22 -0
  40. package/src/runtime/shared/tool-card-model.mjs +0 -1
  41. package/src/runtime/shared/tool-primitives.mjs +0 -1
  42. package/src/runtime/shared/webhooks-db.mjs +4 -4
  43. package/src/session-runtime/provider-request-snapshot.mjs +0 -2
  44. package/src/session-runtime/tool-catalog-data.mjs +13 -5
  45. package/src/session-runtime/tool-catalog-schema.mjs +7 -6
  46. package/src/session-runtime/tool-catalog.mjs +5 -5
  47. package/src/session-runtime/workflow-agents-api.mjs +33 -21
  48. package/src/session-runtime/workflow.mjs +14 -26
  49. package/src/standalone/agent-tool/helpers.mjs +2 -1
  50. package/src/standalone/explore-tool.mjs +5 -10
  51. package/src/tui/app/onboarding-steps.mjs +2 -3
  52. package/src/tui/app/use-prompt-handlers.mjs +3 -3
  53. package/src/tui/app/use-prompt-queue-history.mjs +26 -12
  54. package/src/tui/components/PromptInput.jsx +9 -1
  55. package/src/tui/components/prompt-input/escape-policy.mjs +4 -4
  56. package/src/tui/components/prompt-input/restore-policy.mjs +35 -3
  57. package/src/tui/dist/index.mjs +105 -80
  58. package/src/ui/statusline-agents.mjs +1 -3
  59. package/src/agents/debugger/AGENT.md +0 -14
  60. package/src/agents/debugger/agent.json +0 -6
  61. package/src/agents/scheduler-task/AGENT.md +0 -11
  62. package/src/agents/scheduler-task/agent.json +0 -6
  63. package/src/agents/webhook-handler/AGENT.md +0 -11
  64. package/src/agents/webhook-handler/agent.json +0 -6
  65. package/src/rules/agent/20-skip-protocol.md +0 -4
package/README.md CHANGED
@@ -4,6 +4,14 @@
4
4
  ![node](https://img.shields.io/badge/node-%3E%3D22-brightgreen)
5
5
  ![license](https://img.shields.io/badge/license-MIT-blue)
6
6
 
7
+ **Mixdog Desktop:** [Download for Windows (x64)](https://github.com/tribgames/mixdog/releases/latest/download/mixdog-desktop-win-x64.exe)
8
+ · [macOS / Linux preview builds](https://github.com/tribgames/mixdog/releases/latest)
9
+
10
+ Windows is the primary manually tested desktop platform. macOS and Linux
11
+ packages are built on native CI runners and pass packaged-runtime smoke tests,
12
+ but remain preview builds. Desktop packages are currently unsigned, so Windows
13
+ SmartScreen or macOS Gatekeeper may show a security warning.
14
+
7
15
  Standalone coding agent that runs an orchestrated, multi-provider agent
8
16
  workflow from one terminal — or from a full desktop workbench — built to
9
17
  get the same quality out of the same models with less time, cost, and
@@ -118,9 +126,9 @@ every number above live under `benchmarks/terminal-bench-2.1/`.
118
126
 
119
127
  - Skills, MCP servers, hooks, and plugins load through standard-compatible
120
128
  interfaces.
121
- - Workflow delegation through the `agent` tool and `/agents`: worker,
122
- heavy-worker, reviewer, debugger, maintainer, explorer, and
123
- web-researcher roles.
129
+ - Built-in Web Search, Explorer, and Maintainer services, plus editable
130
+ starter agents (`worker`, `heavy-worker`, `reviewer`) and user-authored
131
+ custom roles.
124
132
 
125
133
  ## Run
126
134
 
@@ -160,8 +168,8 @@ mixdog --provider anthropic-oauth --model claude-opus-5 worker "fix the failing
160
168
  mixdog --provider openai-oauth --model gpt-5.6-sol reviewer "review the current diff"
161
169
  ```
162
170
 
163
- Roles: `explore`, `worker`, `heavy-worker`, `reviewer`, `debugger`,
164
- `maintainer`, `web-researcher`.
171
+ Roles: `explore`, `worker`, `heavy-worker`, `reviewer`, `maintainer`,
172
+ `web-researcher`.
165
173
 
166
174
  ## TUI basics
167
175
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixdog",
3
- "version": "0.9.102",
3
+ "version": "0.9.104",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Standalone mixdog coding-agent CLI/TUI workspace.",
@@ -112,7 +112,7 @@
112
112
  "test:workflow-editor": "node --test scripts/workflow-id-test.mjs scripts/workflow-pack-editor-test.mjs",
113
113
  "test:route-scope": "node --test scripts/route-scope-isolation-test.mjs",
114
114
  "test:schedule-reload": "node --test scripts/schedule-reload-arm-test.mjs",
115
- "test:media": "node --test src/runtime/media/store.test.mjs src/runtime/media/renditions.test.mjs",
115
+ "test:media": "node --test src/runtime/media/store.test.mjs src/runtime/media/renditions.test.mjs src/runtime/media/adapters/codex-image.test.mjs",
116
116
  "test:shell-harness": "node --test scripts/shell-harness-regression-test.mjs",
117
117
  "failures": "node scripts/tool-failures.mjs",
118
118
  "trace:llm": "node scripts/llm-trace-summary.mjs",
@@ -69,7 +69,7 @@ const CODE_GRAPH_DESCRIPTION_MUTATION_CORPUS = [
69
69
  name: 'contracted negated file assignment',
70
70
  mutate: (parts) => ({
71
71
  ...parts,
72
- description: parts.description.replace(/file modes take files\[\]/i, "file modes aren't assigned files[]"),
72
+ description: parts.description.replace(/file modes (?:take|use) files\[\]/i, "file modes aren't assigned files[]"),
73
73
  }),
74
74
  },
75
75
  {
@@ -59,34 +59,6 @@
59
59
  "kind": "maintenance",
60
60
  "permission": "read",
61
61
  "stallCap": { "idleSeconds": 90, "toolRunningSeconds": 90 }
62
- },
63
- {
64
- "agent": "scheduler-task",
65
- "slot": "scheduler",
66
- "systemFile": "agents/scheduler-task/AGENT.md",
67
- "description": "Scheduled-task executor invoked by scheduler tick",
68
- "invokedBy": "scheduler",
69
- "toolSchemaProfile": "read-write-search",
70
- "schemaAllowedTools": ["code_graph", "find", "glob", "list", "grep", "read", "apply_patch", "search", "web_fetch"],
71
- "kind": "maintenance",
72
- "permission": "read-write",
73
- "inboundEvent": true,
74
- "instructionDir": "schedules",
75
- "stallCap": { "idleSeconds": 600, "toolRunningSeconds": 600 }
76
- },
77
- {
78
- "agent": "webhook-handler",
79
- "slot": "webhook",
80
- "systemFile": "agents/webhook-handler/AGENT.md",
81
- "description": "Webhook payload handler invoked by inbound webhook events",
82
- "invokedBy": "webhook",
83
- "toolSchemaProfile": "read-write-search",
84
- "schemaAllowedTools": ["code_graph", "find", "glob", "list", "grep", "read", "apply_patch", "search", "web_fetch"],
85
- "kind": "maintenance",
86
- "permission": "read-write",
87
- "inboundEvent": true,
88
- "instructionDir": "webhooks",
89
- "stallCap": { "idleSeconds": 600, "toolRunningSeconds": 600 }
90
62
  }
91
63
  ]
92
64
  }
@@ -72,13 +72,13 @@ apply it, and verify the result.
72
72
 
73
73
  ### Workflow / agent definitions
74
74
 
75
- 1. Workflows and agents are Markdown packs. Built-ins ship with mixdog
76
- (workflows `default`, `solo`; agents worker, heavy-worker, reviewer,
77
- debugger, maintainer); custom packs live at
75
+ 1. Workflows and agents are Markdown packs. Built-in services are Web Search,
76
+ Explore, and Maintainer. Mixdog ships editable starter agents `worker`,
77
+ `heavy-worker`, and `reviewer`; custom packs live at
78
78
  `<mixdogData>/workflows/<id>/WORKFLOW.md` and
79
79
  `<mixdogData>/agents/<id>/AGENT.md`.
80
- 2. Saving a built-in id writes a user override; deleting the override
81
- reverts to the built-in.
80
+ 2. Starter and user-authored agents can be edited or deleted. Built-in service
81
+ definitions stay protected while their model routes remain configurable.
82
82
  3. The desktop app (Workflows page) is the full editor. The TUI only
83
83
  switches the active workflow (`/workflow`) and per-agent model routes
84
84
  (`/agents`).
@@ -9,7 +9,6 @@ const HEADLESS_ROLE_ALIASES = new Map([
9
9
  ['worker', 'worker'],
10
10
  ['heavy', 'heavy-worker'], ['heavyworker', 'heavy-worker'], ['heavy-worker', 'heavy-worker'],
11
11
  ['review', 'reviewer'], ['reviewer', 'reviewer'],
12
- ['debug', 'debugger'], ['debugger', 'debugger'],
13
12
  ['web', 'web-researcher'], ['web-researcher', 'web-researcher'],
14
13
  ]);
15
14
  const HEADLESS_WORKFLOW_ERROR = 'option --workflow is not supported for headless role commands';
package/src/help.mjs CHANGED
@@ -21,7 +21,7 @@ export const HELP_LINES = [
21
21
  '',
22
22
  'Headless role commands require an explicit provider/model pair and run with',
23
23
  'ephemeral config/data; host behavioral config and personal state are not loaded.',
24
- 'Roles: explore, worker, heavy-worker, reviewer, debugger, maintainer, web-researcher.',
24
+ 'Roles: explore, worker, heavy-worker, reviewer, maintainer, web-researcher.',
25
25
  '',
26
26
  'Slash commands (inside mixdog):',
27
27
  ' /clear start a fresh chat (alias: /new)',
@@ -9,7 +9,6 @@
9
9
  * - buildAgentRoleContent — BP2: agent role/system rules
10
10
  * - buildAgentRetrievalInjectionContent — BP2: narrow read-only retrieval role
11
11
  * - buildLeadMetaContent — BP3: Lead memory/meta context
12
- * - buildAgentRoleSpecificContent — BP4-adjacent user/task data
13
12
  * - buildInjectionContent — legacy joined Lead session content
14
13
  *
15
14
  * 4-BP cache layout (composeSystemPrompt):
@@ -21,7 +20,7 @@
21
20
  * Source files (rules/):
22
21
  * - shared/01-tool.md — universal tool policy (Lead + agent BP1, identical full set)
23
22
  * - lead/lead-tool.md — Lead-specific control-tower / delegation / ToolSearch guidance
24
- * - lead/lead-brief.md — Lead brief contract (skipped in solo workflow)
23
+ * - lead/lead-brief.md — Lead brief contract (delegating workflows only)
25
24
  * - lead/01-general.md — Lead general
26
25
  * - output-styles/<name>.md — Lead output style, selected by config outputStyle
27
26
  * - agent/00-core.md — universal agent constraints (BP2, all profiles)
@@ -132,9 +131,8 @@ function buildProfilePreferencesContent(dataDir) {
132
131
  lines.push(`- User title: ${profile.title}.`);
133
132
  lines.push(`- Use "${profile.title}" when directly addressing the user; do not repeat it in routine progress updates or pre-tool preambles.`);
134
133
  }
135
- // Host shell syntax is NOT repeated here: the `shell` tool schema already
136
- // carries the PowerShell/bash cheat next to its command argument, and a
137
- // standing prompt line only primed shell use the tool policy discourages.
134
+ const shell = process.platform === 'win32' ? 'PowerShell' : 'Bash';
135
+ lines.push(`- Shell: ${shell}. Use ${shell} syntax unless the user specifies otherwise.`);
138
136
  return lines.length ? `# Profile Preferences\n\n${lines.join('\n')}` : '';
139
137
  }
140
138
 
@@ -146,8 +144,8 @@ function buildLanguageSection(dataDir) {
146
144
  ? ` from system locale ${language.locale}`
147
145
  : '';
148
146
  const lines = [
149
- `- Default user-facing response language${source}: ${language.prompt}. Write every user-facing message preambles, progress, questions, reports, notices — in ${language.prompt} only, overriding any tone implied by the output style; switch only when the user writes in another language or asks.`,
150
- `- Code identifiers, paths, commands, symbols, API names, and exact errors should remain in their original form.`,
147
+ `- Default user-facing language${source}: ${language.prompt}. Use it for all user-facing text (preambles, progress, questions, reports, notices), overriding output style; switch only when the user does or asks.`,
148
+ `- Keep code identifiers, paths, commands, symbols, API names, and exact errors in original form.`,
151
149
  ];
152
150
  return `# Language\n\n${lines.join('\n')}`;
153
151
  }
@@ -186,67 +184,12 @@ function loadOutputStyle({ PLUGIN_ROOT, DATA_DIR }) {
186
184
  return '';
187
185
  }
188
186
 
189
- /**
190
- * Resolve the DATA_DIR subdir whose *.md instruction tree is sent as
191
- * BP4-adjacent user/task data, from the agent's `instructionDir` metadata in
192
- * defaults/agents.json. Returns null when the agent declares none.
193
- *
194
- * Mirrors internal-agents.mjs getAgentInstructionDir — rules-builder is CommonJS
195
- * and cannot import the ESM module, so it reads the same source of truth
196
- * directly. Keeps the webhook-handler→webhooks / scheduler-task→schedules
197
- * mapping declarative instead of a hard-coded agent-name ternary.
198
- *
199
- * @param {string} mixdogRoot
200
- * @param {string} agent
201
- * @returns {string|null}
202
- */
203
- function resolveAgentInstructionDir(mixdogRoot, agent) {
204
- if (!mixdogRoot || !agent) return null;
205
- const metaPath = path.join(mixdogRoot, 'defaults', 'agents.json');
206
- let raw;
207
- try {
208
- raw = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
209
- } catch (e) {
210
- throw new Error(`[rules-builder] failed to read/parse agents.json at ${metaPath}: ${e.message}`);
211
- }
212
- for (const entry of (raw.agents || [])) {
213
- if (entry && entry.agent === agent) {
214
- const dir = typeof entry.instructionDir === 'string' ? entry.instructionDir.trim() : '';
215
- return dir || null;
216
- }
217
- }
218
- return null;
219
- }
220
-
221
- /**
222
- * Recursively collect all `.md` files under `dir`. Returns absolute paths
223
- * in stack-DFS order (callers sort before use). Missing/unreadable `dir`
224
- * yields an empty array — matches the previous inline `try {} catch {}`
225
- * behavior at every call site.
226
- */
227
- function collectMarkdownFilesRecursive(dir) {
228
- const collected = [];
229
- try {
230
- const stack = [dir];
231
- while (stack.length) {
232
- const current = stack.pop();
233
- const entries = fs.readdirSync(current, { withFileTypes: true });
234
- for (const entry of entries) {
235
- const full = path.join(current, entry.name);
236
- if (entry.isDirectory()) stack.push(full);
237
- else if (entry.isFile() && entry.name.endsWith('.md')) collected.push(full);
238
- }
239
- }
240
- } catch {}
241
- return collected;
242
- }
243
-
244
187
  function buildSharedToolContent({ PLUGIN_ROOT }) {
245
188
  const SHARED_DIR = path.join(PLUGIN_ROOT, 'rules', 'shared');
246
189
  return readOptional(path.join(SHARED_DIR, '01-tool.md'));
247
190
  }
248
191
 
249
- function buildLeadRoleContent({ PLUGIN_ROOT, DATA_DIR }) {
192
+ function buildLeadRoleContent({ PLUGIN_ROOT, DATA_DIR, includeLeadBrief = true }) {
250
193
  const RULES_DIR = path.join(PLUGIN_ROOT, 'rules');
251
194
  const LEAD_DIR = path.join(RULES_DIR, 'lead');
252
195
  const general = readOptional(path.join(LEAD_DIR, '01-general.md'));
@@ -255,15 +198,7 @@ function buildLeadRoleContent({ PLUGIN_ROOT, DATA_DIR }) {
255
198
  const toolLead = readOptional(path.join(LEAD_DIR, 'lead-tool.md'));
256
199
  if (toolLead) parts.push(toolLead);
257
200
 
258
- // Solo workflow forbids delegation, so the agent-brief contract is dead
259
- // weight there. Cache safety: lead rules cache keys on mixdog-config.json
260
- // mtime, so switching workflow rebuilds this block.
261
- const workflowActive = String(
262
- (readConfigSection(DATA_DIR, 'agent').workflow || {}).active
263
- || readConfigSection(DATA_DIR, 'workflow').active
264
- || 'default',
265
- ).trim().toLowerCase();
266
- if (workflowActive !== 'solo') {
201
+ if (includeLeadBrief) {
267
202
  const briefLead = readOptional(path.join(LEAD_DIR, 'lead-brief.md'));
268
203
  if (briefLead) parts.push(briefLead);
269
204
  }
@@ -365,45 +300,6 @@ function buildAgentRetrievalInjectionContent({ PLUGIN_ROOT }) {
365
300
  return parts.join('\n');
366
301
  }
367
302
 
368
- /**
369
- * BP4-adjacent role-specific data. Only the calling role's own task / tool
370
- * detail body emits — webhook-handler gets webhooks/<all-events>/ and
371
- * scheduler gets schedules/<all-tasks>/. Other roles return ''.
372
- *
373
- * NOTE: webhook-event narrowing (one event per call) requires the inbound
374
- * payload's event id at compose time; not implemented yet, so all webhook
375
- * instruction files still ride with the webhook-handler user/task context.
376
- *
377
- * @param {object} opts
378
- * @param {string} opts.PLUGIN_ROOT
379
- * @param {string} opts.DATA_DIR
380
- * @param {string|null} opts.currentAgent
381
- * @returns {string}
382
- */
383
- function buildAgentRoleSpecificContent({ PLUGIN_ROOT, DATA_DIR, currentAgent }) {
384
- if (!currentAgent) return '';
385
- const parts = [];
386
-
387
- // The agent's instruction subdir (webhook-handler → webhooks, scheduler-task
388
- // → schedules) is declared via `instructionDir` in defaults/agents.json
389
- // rather than hard-coded here, so adding a new inbound-event agent needs only
390
- // a metadata entry.
391
- const subdirForAgent = resolveAgentInstructionDir(PLUGIN_ROOT, currentAgent);
392
- if (subdirForAgent) {
393
- const dir = path.join(DATA_DIR, subdirForAgent);
394
- const collected = collectMarkdownFilesRecursive(dir);
395
- if (collected.length > 0) {
396
- collected.sort();
397
- const blocks = collected.map(f => stripFrontmatter(readOptional(f))).filter(Boolean);
398
- if (blocks.length > 0) {
399
- parts.push([`# Agent ${subdirForAgent}`, '', blocks.join('\n\n')].join('\n'));
400
- }
401
- }
402
- }
403
-
404
- return parts.join('\n\n');
405
- }
406
-
407
303
  module.exports = {
408
304
  buildSharedToolContent,
409
305
  buildLeadRoleContent,
@@ -412,5 +308,4 @@ module.exports = {
412
308
  buildInjectionContent,
413
309
  buildAgentInjectionContent,
414
310
  buildAgentRetrievalInjectionContent,
415
- buildAgentRoleSpecificContent,
416
311
  };
@@ -8,18 +8,14 @@ keep-coding-instructions: true
8
8
 
9
9
  # Output Style
10
10
 
11
- Detailed — the fullest style, still summary-form: depth comes from picking the
12
- right facts, not from explaining more.
11
+ Detailed — dense facts, complete handoff.
13
12
 
14
- - Lead with the outcome in one short sentence, then only the detail that
15
- matters: what changed, paths, commands, errors. Conclusions, not reasoning;
16
- cite a symbol/path only as an anchor.
17
- - ~2 rendered lines per point, whole report ~10–15 lines, each point once;
18
- collapse trivial tasks to a couple of sentences.
19
- - One bullet = one idea, opened with a short **bold key point**; blank line
20
- between multi-line items; nest one sub-level at most.
21
- - Labels like `Changes` or `Risks / next steps` in final reports only; never
22
- dump raw tool output.
23
- - State blockers and failures in one short clause each.
24
- - Complete sentences in the user's language; commands, code, and errors
25
- verbatim. Never name this style unless asked.
13
+ - Outcome first; changes/anchors/commands/errors/conclusions only, no reasoning.
14
+ - Scale to task: ~10–15 lines when needed, each line unique; trivial:
15
+ 1–2 sentences.
16
+ - Dense Markdown: short headers/grouped bullets/compact comparison tables;
17
+ explanations outside tables. Fence essential multiline code only; nest once;
18
+ final-only labels.
19
+ - Never dump raw tool output; blockers and failures: one clause each.
20
+ - User-language sentences; technical literals verbatim; never name this style
21
+ unless asked.
@@ -8,11 +8,9 @@ keep-coding-instructions: true
8
8
 
9
9
  # Output Style
10
10
 
11
- Extreme minimal — exactly one sentence, under 100 characters.
11
+ Extreme minimal — exactly one sentence under 100 characters.
12
12
 
13
- - A SINGLE sentence never a second one or a run-on that smuggles in extra
14
- facts.
15
- - Net result only: no file lists, methods, follow-ups, headings, bullets, or
16
- labels, even when the request says "report".
17
- - Preferred pattern: `<target> changed.` Keep one decisive path, command,
18
- symbol, or error verbatim only if it fits the limit.
13
+ - State only the net result; no second sentence, run-on, file list, method,
14
+ follow-up, heading, bullet, or label, even for reports.
15
+ - Prefer `<target> changed.` Include at most one decisive path, command, symbol,
16
+ or error verbatim if it fits.
@@ -7,11 +7,10 @@ keep-coding-instructions: true
7
7
 
8
8
  # Output Style
9
9
 
10
- Minimal — one or two sentences, nothing more.
10
+ Minimal — one or two sentences with only the net result.
11
11
 
12
- - One short sentence with the net result; a second only for a fact that
13
- genuinely needs it, never a run-on. Concept level whatever the task size.
14
- - Never itemize: no headings, bullets, labels, sections, or file-by-file
15
- detail even when the request says "report".
16
- - Preferred pattern: `<target> changed.` Keep only the single decisive path,
17
- command, symbol, API name, code, or error verbatim.
12
+ - Add the second only for one indispensable fact; no run-on.
13
+ - Stay concept-level: no headings, bullets, labels, sections, or per-file
14
+ detail, even when asked to report.
15
+ - Prefer `<target> changed.` Preserve only one decisive path, command, symbol,
16
+ API, code fragment, or error verbatim.
@@ -8,16 +8,15 @@ keep-coding-instructions: true
8
8
 
9
9
  # Output Style
10
10
 
11
- Practical concise — outcome first, never a narration of the work.
11
+ Practical concise — outcome first; no process narration.
12
12
 
13
- - Open with the outcome in one sentence: done, blocked, or awaiting a decision.
14
- - Summarize what changed at concept level, never a per-file changelog; cite
15
- `file:line` only as an anchor.
16
- - 1–3 bullets or 2–3 sentences, ~5–7 lines total, each point once.
17
- - One idea per bullet, ONE line, led by a short bold key phrase; blank line
18
- between multi-line items.
19
- - Labels like `Changes` or `Risks / next steps` in final handoffs only; never
20
- dump raw tool output.
21
- - State blockers and failures in one short clause each.
22
- - Complete sentences in the user's language; paths, commands, symbols, code,
23
- and errors verbatim. Never name this style unless asked.
13
+ - Open with done, blocked, or awaiting a decision.
14
+ - Report concepts, not files; `file:line` only anchors.
15
+ - Use 1–3 bullets or 2–3 sentences (~5–7 lines); one material fact per line,
16
+ no repetition.
17
+ - Dense Markdown: bullets/**bold keys** by default; compact comparison/number
18
+ tables when shorter; explanations outside tables.
19
+ - Final-only labels; never dump raw tool output. State blockers and failures
20
+ in one clause each.
21
+ - Complete user-language sentences; technical literals verbatim; never name
22
+ this style unless asked.
@@ -6,32 +6,33 @@ kind: retrieval
6
6
 
7
7
  # Role: explorer
8
8
 
9
- Locate and return exact coordinates and positions only. Do not analyze,
10
- evaluate, explain, recommend, or solve the task. Return only WHERE
11
- (`path:line`). You ARE `explore`; never call it. Follow the shared tool-routing
12
- rules exactly; add no routing rules or exceptions here.
9
+ Locate and return exact coordinates only. Return the minimal complete WHERE
10
+ set (`path:line`), never analysis, evaluation, explanation, recommendation, or
11
+ a solution. You ARE `explore`; never call it. Follow the shared routing rules;
12
+ add no rules or exceptions here.
13
13
 
14
14
  ## Hard budget
15
15
 
16
16
  Before EVERY tool call, check:
17
- 1. Which requested facets still have ZERO credible anchors?
18
- 2. Will this call produce a new anchor rather than confirm an existing one?
17
+ 1. Which requested targets still lack a complete direct anchor set?
18
+ 2. Will this call add a distinct matching coordinate rather than reconfirm one?
19
19
 
20
- If no facet has zero anchors, a tool call is FORBIDDEN: answer now.
21
- If the call only confirms, re-reads, verifies, counts, quotes, strengthens, or
22
- adds context to an existing anchor, it is FORBIDDEN: answer now.
20
+ A target is complete only when every distinct coordinate directly satisfying
21
+ its query is held; one anchor suffices only when the target is singular by
22
+ construction. If all targets are complete, or the call only reconfirms,
23
+ re-reads, verifies, quotes, strengthens, or adds context, answer now.
23
24
 
24
25
  Target: ONE tool turn and an answer within 10 seconds.
25
26
  Hard limit: FIVE tool turns plus ONE tool-less final-report turn. Label tool
26
27
  messages `turn 1/6` through `turn 5/6`. If turn 5 is used, the next response is
27
28
  `turn 6/6` and is the FINAL TURN.
28
29
 
29
- After turns 1-4, report immediately if every requested facet has an anchor.
30
+ After turns 1-4, report immediately if every requested target is complete.
30
31
  Do not spend another turn merely because budget remains.
31
32
 
32
- Turns 2-5 are ONLY for unresolved facets with zero anchors. Each recovery turn
33
- uses the shared maximum-fanout contract with changed concrete tokens or a new
34
- exact scope. Never repeat the same tokens and scope.
33
+ Turns 2-5 are ONLY for incomplete targets. Each recovery turn uses changed
34
+ concrete tokens or a new exact scope in maximum fanout. Page only when output
35
+ explicitly reports truncation or incompleteness; never repeat tokens and scope.
35
36
 
36
37
  If the next turn lacks a concrete anchor-producing move, stop early with
37
38
  `EXPLORATION_FAILED`.
@@ -42,22 +43,22 @@ none exist, return `EXPLORATION_FAILED`. There is no sixth tool turn.
42
43
 
43
44
  ## No reconfirmation
44
45
 
45
- A credible tool-returned anchor is FINAL. Never re-locate, re-read, reconfirm,
46
- verify, upgrade, cross-check, or route the same facet through another tool or
47
- turn. Copy returned paths and coordinates exactly; never repair, normalize,
48
- estimate, or recall them.
46
+ A credible tool-returned coordinate is FINAL. Never re-locate, re-read,
47
+ reconfirm, verify, upgrade, cross-check, or route it through another tool or
48
+ turn. Copy paths and coordinates exactly; never repair, normalize, estimate,
49
+ or recall them.
49
50
 
50
51
  A code anchor requires a tool-returned `path:line`; a bare path is valid only
51
52
  for a file/dir-location query. Generic matches and guessed coordinates are
52
53
  zero anchors. Search every supplied `<root>`; otherwise search session cwd.
53
54
 
54
- Answer in at most 3 lines:
55
+ Return one compact line per distinct direct match:
55
56
  `path:line — symbol — short reason`
56
57
 
57
- For a completeness/list/count query, copy EVERY returned matching `path:line`
58
- exactly once, use the tool-reported total, and verify the listed item count
59
- equals it; the 3-line limit does not apply. Never omit a match from the tool
60
- result or page again after a complete result.
58
+ Use no fixed item-count cap; omit incidental matches and prose. For a
59
+ completeness/list/count query, copy EVERY returned matching `path:line` once
60
+ and preserve the tool-reported total. Never omit a direct match or page after
61
+ a complete result.
61
62
 
62
63
  Return `EXPLORATION_FAILED` when the budget cannot produce a credible anchor.
63
64
  Never fabricate, soften, or return vague prose.
@@ -1,17 +1,16 @@
1
1
  # General
2
2
 
3
- - You are Mixdog, the current coding-agent CLI/TUI assistant with
4
- multi-provider agent workflows. Never identify as generic OpenAI/ChatGPT.
5
- - A preamble is at most one useful sentence, with no direct names, honorifics,
6
- headings, labels, or routine lookup narration.
7
- - Destructive/hard-to-reverse action needs explicit confirmation and explicit
8
- validated target paths — never `~`, a root, or unresolved variables/globs;
9
- report material deletions with recoverability.
3
+ - You are Mixdog, the coding-agent CLI/TUI assistant for multi-provider
4
+ workflows; never generic OpenAI/ChatGPT.
5
+ - Preamble: one useful sentence maximum; no direct names, honorifics, headings,
6
+ labels, or routine lookup narration.
7
+ - Confirm destructive/hard-to-reverse actions against explicit validated paths;
8
+ never `~`, a root, or unresolved variables/globs; report material deletion
9
+ recoverability.
10
10
  - Ask only for decisions.
11
- - Build only what the task requires; trust internal and framework guarantees.
12
- - Mid-task input: a replacement supersedes current work, an addition folds
13
- into it, a status question gets a brief answer while work continues; after
14
- context compaction continue from the summary — never restart or redo
15
- finished work.
16
- - Your final message ends the turn: answer only when the work is done. After a
17
- failed tool call, fix and re-run it, or state plainly that it is unresolved.
11
+ - Build only the requested scope; trust internal and framework guarantees.
12
+ - Mid-task: replacement supersedes; addition folds in; status gets a brief
13
+ answer while work continues. After compaction, resume the summary; never
14
+ restart or redo finished work.
15
+ - Final text ends the turn only when done. After a failed tool call, fix and
16
+ re-run it or state plainly why it remains unresolved.
@@ -1,3 +1,3 @@
1
1
  # Lead Tools
2
2
 
3
- - Use the current project/workspace unless the request or tool requires another.
3
+ - Use the current project unless the request/tool requires another.
@@ -1,35 +1,44 @@
1
1
  # Tool Use
2
2
 
3
- - Call `explore`, when exposed, only to locate unknown coordinates in
4
- repository source it is plain search over source trees and files; it
5
- returns locations, not analysis or solutions; never batch another
6
- exploration tool onto a facet already sent to `explore` in the same turn —
7
- narrow first, then route. Then route each anchored facet
8
- exactly once by the evidence required to determine the complete edit:
9
- path/name only→`find`; exact directory entries→`list`; wildcard paths→`glob`;
10
- source content/value/`path:line`→`grep`; known file/range→`read`; exact
11
- symbol/relation→`code_graph`;
12
- web/current→`search` when exposed; returned URL body→`web_fetch` when exposed;
13
- prior work→`recall` when exposed; durable compact English memory→`memory`
14
- when exposed;
15
- explicit project change→`cwd`; explicit user-requested conversation reset→
16
- `session_manage`. Use only named tools present in the current tool surface.
3
+ - Baseline routing assigns each facet directly by the evidence needed to
4
+ determine the complete edit:
5
+ path/name only→`find`; wildcard paths→`glob`; exact directory entries→`list`;
6
+ source content/value/`path:line`→`grep`; exact symbol/relation→`code_graph`;
7
+ known file/range→`read`;
8
+ web/current→`search`; returned URL body→`web_fetch`; prior work→`recall`;
9
+ durable compact English memory→`memory`; explicit project change→`cwd`;
10
+ explicit user-requested conversation reset→`session_manage`, each when exposed.
11
+ Use only named tools present in the current tool surface.
12
+ `explore`, when exposed, is a fast path only for facets whose repository
13
+ coordinates remain unknown: call it first once for all such independent
14
+ facets in one query array. It
15
+ returns the minimal complete direct `path:line` anchors, not analysis or
16
+ solutions; resume baseline routing from those anchors.
17
17
  - Use verified paths (cwd/project/user/tool); explicit paths may be outside cwd;
18
- guessed path/name fragments use `find`. Before each tool batch, extract
19
- every independent facet, deduplicate overlap, assign exactly ONE routed tool
20
- per facet, and launch all independent calls, whatever the tool, together in
21
- one maximum-fanout turn independence alone decides batching. Never send
22
- one facet to alternative tools, reserve known work, serialize independent
23
- calls, or cap facet count. Take the cheapest sufficient evidence per facet:
18
+ stay focused on the requested outcome. Avoid investigation, implementation,
19
+ or verification not required to satisfy it; once the requirements are met
20
+ and proven, stop.
21
+ Batch calls iff no call needs another's output or can change another's
22
+ inputs/state; otherwise serialize. Before each retrieval batch, deduplicate
23
+ all required facets, route each once to the cheapest sufficient tool with all
24
+ required variants/scopes, and launch every independent call together. Never
25
+ split one decision across overlapping facets, add `shell`, `apply_patch`, or
26
+ other mutation merely to widen retrieval, duplicate/broaden a facet through
27
+ another tool or `shell`, reserve known work, or cap fanout.
28
+ Take the cheapest sufficient evidence per facet:
24
29
  symbol relations end at `code_graph`, values/locations end at the context
25
30
  grep returns; `read` covers only what returned spans cannot, as an anchored
26
- offset/limit window — never a full-file read when a window suffices.
27
- Adjacent context around an edit point counts as needed evidence. A batch
28
- carries only the evidence needed to determine the edit; the moment evidence
29
- determines it, stop retrieving and patch. Known state is never re-acquired
30
- neither content already read nor the effect of your own successful call.
31
- - Once the edit is determined, finish in one assistant turn with one
32
- `apply_patch` for all edits.
33
- - After a call returns a background `task_id`, end the turn; its completion
34
- notification resumes work. Never poll; use task control only for recovery or
35
- a required blocking result.
31
+ offset/limit window — never a full-file read when a window suffices;
32
+ adjacent context around an edit point counts as needed evidence. The moment
33
+ evidence determines the edit, stop retrieving and patch.
34
+ - Once the edit is determined, finish in one assistant turn: one
35
+ `apply_patch` per file or cohesive unit, all patches first, then one batched
36
+ verification `shell` when needed; the runtime waits for every patch and skips
37
+ the shell if any fails. Retry only failed envelopes. Create or edit text only
38
+ with `apply_patch`, never `shell`.
39
+ After failure rerun only the failed check. Earlier `shell` is only for
40
+ executable/runtime/state evidence no file tool returns — an independent
41
+ facet, batched with the rest. Follow up only when prior output is required
42
+ to form the next call.
43
+ - A background `task_id` ends the turn; completion resumes work. Never poll;
44
+ use task control only for recovery or a required blocking result.