mixdog 0.9.38 → 0.9.39

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 (114) hide show
  1. package/package.json +9 -4
  2. package/scripts/abort-recovery-test.mjs +43 -2
  3. package/scripts/agent-tag-reuse-smoke.mjs +146 -6
  4. package/scripts/agent-terminal-reap-test.mjs +127 -0
  5. package/scripts/agent-trace-io-test.mjs +69 -0
  6. package/scripts/code-graph-disk-hit-test.mjs +224 -0
  7. package/scripts/execution-completion-dedup-test.mjs +157 -0
  8. package/scripts/execution-pending-resume-kick-test.mjs +57 -2
  9. package/scripts/execution-resume-esc-integration-test.mjs +174 -0
  10. package/scripts/explore-bench.mjs +38 -2
  11. package/scripts/explore-prompt-policy-test.mjs +152 -11
  12. package/scripts/find-fuzzy-hidden-test.mjs +122 -0
  13. package/scripts/internal-comms-bench-test.mjs +226 -0
  14. package/scripts/internal-comms-bench.mjs +185 -58
  15. package/scripts/internal-comms-smoke.mjs +171 -23
  16. package/scripts/live-worker-smoke.mjs +38 -2
  17. package/scripts/memory-cycle-routing-test.mjs +111 -0
  18. package/scripts/memory-rule-contract-test.mjs +93 -0
  19. package/scripts/output-style-smoke.mjs +2 -2
  20. package/scripts/rg-runner-test.mjs +240 -0
  21. package/scripts/routing-corpus-test.mjs +349 -0
  22. package/scripts/routing-corpus.mjs +211 -32
  23. package/scripts/session-orphan-sweep-test.mjs +83 -0
  24. package/scripts/steering-drain-buckets-test.mjs +179 -0
  25. package/scripts/tool-smoke.mjs +21 -13
  26. package/scripts/tool-tui-presentation-test.mjs +202 -0
  27. package/src/agents/heavy-worker/AGENT.md +10 -7
  28. package/src/agents/reviewer/AGENT.md +6 -4
  29. package/src/agents/worker/AGENT.md +7 -5
  30. package/src/rules/agent/00-common.md +4 -4
  31. package/src/rules/agent/00-core.md +11 -14
  32. package/src/rules/agent/20-skip-protocol.md +3 -3
  33. package/src/rules/agent/30-explorer.md +50 -60
  34. package/src/rules/agent/40-cycle1-agent.md +15 -24
  35. package/src/rules/agent/41-cycle2-agent.md +33 -57
  36. package/src/rules/agent/42-cycle3-agent.md +28 -42
  37. package/src/rules/lead/01-general.md +7 -10
  38. package/src/rules/lead/lead-brief.md +11 -14
  39. package/src/rules/lead/lead-tool.md +6 -5
  40. package/src/rules/shared/01-tool.md +44 -45
  41. package/src/runtime/agent/orchestrator/agent-trace-format.mjs +37 -1
  42. package/src/runtime/agent/orchestrator/agent-trace-io.mjs +20 -5
  43. package/src/runtime/agent/orchestrator/providers/codex-client-meta.mjs +21 -1
  44. package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +17 -38
  45. package/src/runtime/agent/orchestrator/session/agent-loop.mjs +17 -8
  46. package/src/runtime/agent/orchestrator/session/context-utils.mjs +270 -78
  47. package/src/runtime/agent/orchestrator/session/loop/tool-helpers.mjs +2 -1
  48. package/src/runtime/agent/orchestrator/session/manager/delivered-completions.mjs +123 -0
  49. package/src/runtime/agent/orchestrator/session/manager/idle-cleanup.mjs +15 -2
  50. package/src/runtime/agent/orchestrator/session/manager/pending-messages.mjs +41 -2
  51. package/src/runtime/agent/orchestrator/session/manager/session-close.mjs +1 -1
  52. package/src/runtime/agent/orchestrator/session/store.mjs +223 -42
  53. package/src/runtime/agent/orchestrator/tools/builtin/arg-guard.mjs +12 -1
  54. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +25 -20
  55. package/src/runtime/agent/orchestrator/tools/builtin/fs-reachability.mjs +6 -2
  56. package/src/runtime/agent/orchestrator/tools/builtin/fuzzy-match.mjs +118 -53
  57. package/src/runtime/agent/orchestrator/tools/builtin/list-tool.mjs +106 -29
  58. package/src/runtime/agent/orchestrator/tools/builtin/path-utils.mjs +8 -1
  59. package/src/runtime/agent/orchestrator/tools/builtin/read-batch.mjs +4 -2
  60. package/src/runtime/agent/orchestrator/tools/builtin/read-range-index.mjs +3 -1
  61. package/src/runtime/agent/orchestrator/tools/builtin/read-snapshot-runtime.mjs +4 -1
  62. package/src/runtime/agent/orchestrator/tools/builtin/read-tool.mjs +33 -2
  63. package/src/runtime/agent/orchestrator/tools/builtin/rg-runner.mjs +151 -64
  64. package/src/runtime/agent/orchestrator/tools/builtin/search-path-diagnostics.mjs +37 -13
  65. package/src/runtime/agent/orchestrator/tools/builtin/search-tool.mjs +84 -49
  66. package/src/runtime/agent/orchestrator/tools/code-graph/build.mjs +172 -23
  67. package/src/runtime/agent/orchestrator/tools/code-graph/constants.mjs +3 -0
  68. package/src/runtime/agent/orchestrator/tools/code-graph/disk-cache.mjs +68 -5
  69. package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +17 -3
  70. package/src/runtime/agent/orchestrator/tools/code-graph/graph-binary.mjs +24 -10
  71. package/src/runtime/agent/orchestrator/tools/code-graph-prewarm-worker.mjs +6 -3
  72. package/src/runtime/agent/orchestrator/tools/code-graph-tool-defs.mjs +4 -7
  73. package/src/runtime/agent/orchestrator/tools/code-graph.mjs +1 -0
  74. package/src/runtime/agent/orchestrator/tools/patch-tool-defs.mjs +1 -1
  75. package/src/runtime/memory/lib/memory-cycle2-gate.mjs +4 -4
  76. package/src/runtime/memory/lib/memory-cycle2-mutations.mjs +4 -3
  77. package/src/runtime/memory/lib/memory-cycle3.mjs +12 -2
  78. package/src/runtime/shared/tool-primitives.mjs +4 -1
  79. package/src/runtime/shared/tool-status.mjs +27 -0
  80. package/src/runtime/shared/tool-surface.mjs +6 -3
  81. package/src/session-runtime/config-helpers.mjs +14 -0
  82. package/src/session-runtime/context-status.mjs +1 -0
  83. package/src/session-runtime/effort.mjs +6 -2
  84. package/src/session-runtime/model-recency.mjs +5 -2
  85. package/src/session-runtime/runtime-core.mjs +35 -2
  86. package/src/session-runtime/tool-catalog.mjs +34 -0
  87. package/src/standalone/agent-tool/notify.mjs +13 -0
  88. package/src/standalone/agent-tool.mjs +45 -69
  89. package/src/standalone/explore-tool.mjs +6 -7
  90. package/src/tui/App.jsx +31 -0
  91. package/src/tui/app/model-options.mjs +5 -3
  92. package/src/tui/app/model-picker.mjs +12 -24
  93. package/src/tui/app/transcript-window.mjs +1 -0
  94. package/src/tui/components/ToolExecution.jsx +11 -6
  95. package/src/tui/components/TranscriptItem.jsx +1 -1
  96. package/src/tui/components/tool-execution/surface-detail.mjs +24 -10
  97. package/src/tui/components/tool-execution/text-format.mjs +10 -19
  98. package/src/tui/dist/index.mjs +517 -142
  99. package/src/tui/engine/agent-job-feed.mjs +144 -17
  100. package/src/tui/engine/agent-response-tail.mjs +68 -0
  101. package/src/tui/engine/notification-plan.mjs +16 -0
  102. package/src/tui/engine/session-api.mjs +8 -2
  103. package/src/tui/engine/session-flow.mjs +19 -1
  104. package/src/tui/engine/tool-card-results.mjs +54 -32
  105. package/src/tui/engine/tool-result-status.mjs +75 -21
  106. package/src/tui/engine/turn.mjs +77 -42
  107. package/src/tui/engine.mjs +63 -2
  108. package/src/workflows/bench/WORKFLOW.md +25 -35
  109. package/src/workflows/default/WORKFLOW.md +38 -32
  110. package/src/workflows/solo/WORKFLOW.md +19 -22
  111. package/scripts/_jitter-fuzz.mjs +0 -44410
  112. package/scripts/_jitter-fuzz2.mjs +0 -44400
  113. package/scripts/_jitter-probe.mjs +0 -44397
  114. package/scripts/_jp2.mjs +0 -45614
@@ -5,39 +5,45 @@ description: "Default agent workflow — fan-out parallel delegation across inde
5
5
  agents: worker, heavy-worker, reviewer, debugger, maintainer
6
6
  ---
7
7
 
8
- # Default Workflow
8
+ # Default
9
9
 
10
- HARD APPROVAL GATE investigation/planning may proceed only as read-only
11
- exploration while consulting with the user. After user consultation produces a
12
- conclusion and plan, execution is still forbidden until explicit go-ahead
13
- ("do it", "proceed", "go ahead"). Diagnosis agreement, problem-pointing, or plan
14
- agreement is NOT execution approval. No changes, state mutations, or delegation
15
- before explicit go-ahead.
10
+ GATE: Before approval, only read-only investigation/planning while consulting.
11
+ Approval is a later explicit user message after the latest plan ("do it",
12
+ "proceed", "go ahead"). Initial/additional/changed requests reset planning;
13
+ approval with a scope change needs a revised plan and fresh approval. Before
14
+ approval: no edits, state mutation, or delegation.
16
15
 
17
- Lead supervises/delegates/coordinates/judges/decides. After approval route by
18
- complexity: Lead directly only one-step single-turn fixes plus coordination,
19
- config, and git deployment; everything else delegates. Worker = multi-step or
20
- multi-file implementation; Heavy Worker = high-complexity scopes; Reviewer =
21
- implementation verification; Debugger = very high complexity or root-cause
22
- after a failed fix.
16
+ Lead supervises, delegates, coordinates, judges, decides. After approval,
17
+ delegate by default; Lead only coordinates, does git, or an obvious 1-edit/
18
+ 1-check change. Route other implementation/research/debugging to its matching
19
+ agent. Worker: bounded established path, low local risk/coupling/verification,
20
+ clear local check. Heavy Worker: high risk/coupling/verification (including any
21
+ high-risk scope), or coupled staged work needing coordinated verification.
22
+ Architecture, contracts, storage, concurrency, security, lifecycle are
23
+ indicators, not automatic categories. Reviewer verifies an implementation;
24
+ Debugger handles requested debugging or root cause after a failed fix.
23
25
 
24
- 1. Plan — present a draft before ANY implementation; revise/re-present until
25
- user consultation is complete and a conclusion/plan is agreed. Then wait for
26
- explicit go-ahead before executing. If ambiguous, restate the plan and ask.
27
- 2. Delegate maximize parallel distribution: split independent implementation
28
- scopes to separate worker/heavy-worker agents, all spawned in the SAME turn.
29
- Sequential steps only inside one inseparable complex scope, gated
30
- build/test-green; say when a scope is inseparable. Briefs follow Lead brief
31
- contract. After spawning async agents, END THE TURN.
32
- 3. Review once scopes land, spawn one reviewer per implementation scope, all
33
- in the same turn. Cross-check results yourself; send fixes to the original
34
- scope and loop fix -> re-verify until clean. Skip only simple low-risk work.
35
- Use Debugger first when asked for debugging or a bug survives 2+ fix cycles.
36
- On each agent report, relay scope+verdict and next work as in-progress,
37
- never as a conclusion.
38
- 4. Report final report covers work vs approved plan and verified result,
39
- separate from interim updates. Never forward raw agent output. Ask about
40
- ship/deploy when relevant; deploy/build/commit only on explicit user request
41
- after feedback with no issues.
26
+ 1. Plan: draft before any implementation; settle scope/plan, ask if ambiguous,
27
+ then await the gate.
28
+ 2. Delegate: maximize useful fan-out—one suitable Worker/Heavy Worker per ready
29
+ independent scope whose parallel gain exceeds coordination/merge cost; spawn
30
+ all in one turn, with no count cap. Serialize only a real dependency,
31
+ overlapping write, or inseparable coupling. Briefs follow the Lead brief
32
+ contract. After async spawn, end the turn.
33
+ 3. Review: after approval, complete delegation, review, self-verification, and
34
+ in-scope fixes without reapproval. Every delegated implementation gets one
35
+ Reviewer (all ready reviewers in one turn) and Lead integration/cross-scope
36
+ verification in parallel. Reviewer independently judges risk, intent,
37
+ boundaries; Lead checks acceptance/interactions, not duplicate same-scope
38
+ work. High-risk scopes add distinct lenses. Synthesize one verdict; send
39
+ merged fixes to the original live session; loop fix -> re-verify (same
40
+ Reviewer + Lead re-check) until clean. Debugger first for requested debugging
41
+ or a bug surviving 2+ fix cycles. Agent reports relay scope, verdict, next
42
+ work as in-progress, never conclusions.
43
+ 4. Report: final (not interim) report compares work to approved plan and gives
44
+ verified result; never forward raw agent output. Ask about ship/deploy when
45
+ relevant. Build/deploy/commit/push require an explicit user request after
46
+ issue-free feedback; implementation approval alone is insufficient.
42
47
 
43
- On major direction shifts mid-work, pause and re-consult the user.
48
+ On outcome/direction change, pause and re-consult; otherwise continue approved
49
+ work without reapproval.
@@ -1,31 +1,28 @@
1
1
  ---
2
2
  id: solo
3
3
  name: Solo
4
- description: "Solo workflow — Lead handles everything directly; delegation forbidden."
4
+ description: "Solo workflow — Lead handles everything directly."
5
5
  agents:
6
6
  ---
7
7
 
8
- # Solo Workflow
8
+ # Solo
9
9
 
10
- HARD APPROVAL GATE investigation/planning may proceed only as read-only
11
- exploration while consulting with the user. After user consultation produces a
12
- conclusion and plan, execution is still forbidden until explicit go-ahead
13
- ("do it", "proceed", "go ahead"). Diagnosis agreement, problem-pointing, or plan
14
- agreement is NOT execution approval. No changes or state mutations before
15
- explicit go-ahead.
10
+ GATE: Before approval, only read-only investigation/planning while consulting.
11
+ Approval is a later explicit user message after the latest plan ("do it",
12
+ "proceed", "go ahead"). Initial/additional/changed requests reset planning;
13
+ approval with a scope change needs a revised plan and fresh approval. Before
14
+ approval: no edits or state mutation.
16
15
 
17
- 1. Plan — present a draft before ANY implementation; revise/re-present until
18
- user consultation is complete and a conclusion/plan is agreed. Then wait for
19
- explicit go-ahead before executing. If ambiguous, restate the plan and ask.
20
- 2. Execute Lead does all work directly; delegation forbidden. Interim updates
21
- are in-progress, never conclusions.
22
- 3. Verify check and fix directly until clean or a blocker is reported.
23
- 4. Report final report covers work vs approved plan, verification result, and
24
- remaining risk/next step, distinct from interim updates. Deploy/build/commit
25
- only after user feedback with no issues.
16
+ 1. Plan: draft before any implementation; settle scope/plan, ask if ambiguous,
17
+ then await the gate.
18
+ 2. Execute: after approval, Lead does all work. Never spawn, send, delegate, or
19
+ ask agents to work. Complete execution/in-scope fixes without reapproval;
20
+ interim updates are in-progress, never conclusions.
21
+ 3. Verify: Lead checks/fixes directly until clean or reports a blocker.
22
+ 4. Report: final (not interim) report compares work to approved plan and gives
23
+ verification, remaining risk/next step. Build/deploy/commit/push require an
24
+ explicit user request after issue-free feedback; implementation approval
25
+ alone is insufficient.
26
26
 
27
- On major direction shifts mid-work, pause and re-consult the user.
28
-
29
- Delegation rule:
30
- - Never delegate/spawn/send or ask agents to work; ignore available-agent
31
- sections while this workflow is active.
27
+ On outcome/direction change, pause and re-consult; otherwise continue approved
28
+ work without reapproval.