@monoes/monomindcli 2.11.0 → 2.11.2

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 (165) hide show
  1. package/.claude/commands/coordination/agent-spawn.md +1 -1
  2. package/.claude/commands/mastermind/review.md +1 -1
  3. package/.claude/helpers/statusline.cjs +9 -4
  4. package/.claude/helpers/token-tracker.cjs +5 -2
  5. package/.claude/skills/mastermind-adapters/SKILL.md +6 -5
  6. package/.claude/skills/mastermind-agents/SKILL.md +7 -6
  7. package/.claude/skills/mastermind-createorg/SKILL.md +43 -16
  8. package/.claude/skills/mastermind-env/SKILL.md +1 -1
  9. package/.claude/skills/mastermind-invite-landing/SKILL.md +1 -1
  10. package/.claude/skills/mastermind-new-agent/SKILL.md +5 -5
  11. package/.claude/skills/mastermind-review/SKILL.md +1 -1
  12. package/.claude/skills/monomind/browse.md +1 -1
  13. package/bin/cli.js +60 -2
  14. package/dist/src/capabilities/cap-code.d.ts.map +1 -1
  15. package/dist/src/capabilities/cap-code.js +65 -3
  16. package/dist/src/capabilities/cap-code.js.map +1 -1
  17. package/dist/src/commands/analyze-diff.d.ts.map +1 -1
  18. package/dist/src/commands/analyze-diff.js +16 -6
  19. package/dist/src/commands/analyze-diff.js.map +1 -1
  20. package/dist/src/commands/autopilot.d.ts.map +1 -1
  21. package/dist/src/commands/autopilot.js +8 -1
  22. package/dist/src/commands/autopilot.js.map +1 -1
  23. package/dist/src/commands/config.d.ts.map +1 -1
  24. package/dist/src/commands/config.js +10 -4
  25. package/dist/src/commands/config.js.map +1 -1
  26. package/dist/src/commands/mcp.d.ts.map +1 -1
  27. package/dist/src/commands/mcp.js +7 -1
  28. package/dist/src/commands/mcp.js.map +1 -1
  29. package/dist/src/commands/monograph.d.ts.map +1 -1
  30. package/dist/src/commands/monograph.js +5 -3
  31. package/dist/src/commands/monograph.js.map +1 -1
  32. package/dist/src/commands/org-observe.d.ts.map +1 -1
  33. package/dist/src/commands/org-observe.js +8 -3
  34. package/dist/src/commands/org-observe.js.map +1 -1
  35. package/dist/src/commands/org.d.ts +37 -0
  36. package/dist/src/commands/org.d.ts.map +1 -1
  37. package/dist/src/commands/org.js +99 -42
  38. package/dist/src/commands/org.js.map +1 -1
  39. package/dist/src/commands/platforms.d.ts.map +1 -1
  40. package/dist/src/commands/platforms.js +83 -15
  41. package/dist/src/commands/platforms.js.map +1 -1
  42. package/dist/src/commands/security-scan.d.ts +27 -0
  43. package/dist/src/commands/security-scan.d.ts.map +1 -1
  44. package/dist/src/commands/security-scan.js +192 -127
  45. package/dist/src/commands/security-scan.js.map +1 -1
  46. package/dist/src/init/codex-generator.d.ts.map +1 -1
  47. package/dist/src/init/codex-generator.js +7 -1
  48. package/dist/src/init/codex-generator.js.map +1 -1
  49. package/dist/src/init/kimi-generator.d.ts.map +1 -1
  50. package/dist/src/init/kimi-generator.js +7 -1
  51. package/dist/src/init/kimi-generator.js.map +1 -1
  52. package/dist/src/init/managed-block.d.ts +7 -0
  53. package/dist/src/init/managed-block.d.ts.map +1 -0
  54. package/dist/src/init/managed-block.js +188 -0
  55. package/dist/src/init/managed-block.js.map +1 -0
  56. package/dist/src/init/opencode-generator.d.ts.map +1 -1
  57. package/dist/src/init/opencode-generator.js +7 -1
  58. package/dist/src/init/opencode-generator.js.map +1 -1
  59. package/dist/src/init/shared.d.ts +1 -28
  60. package/dist/src/init/shared.d.ts.map +1 -1
  61. package/dist/src/init/shared.js +4 -42
  62. package/dist/src/init/shared.js.map +1 -1
  63. package/dist/src/init/statusline-generator.d.ts.map +1 -1
  64. package/dist/src/init/statusline-generator.js +9 -4
  65. package/dist/src/init/statusline-generator.js.map +1 -1
  66. package/dist/src/knowledge/eval/model-presence.d.ts +3 -0
  67. package/dist/src/knowledge/eval/model-presence.d.ts.map +1 -1
  68. package/dist/src/knowledge/eval/model-presence.js +25 -1
  69. package/dist/src/knowledge/eval/model-presence.js.map +1 -1
  70. package/dist/src/memory/embedding-operations.d.ts.map +1 -1
  71. package/dist/src/memory/embedding-operations.js +3 -3
  72. package/dist/src/memory/embedding-operations.js.map +1 -1
  73. package/dist/src/memory/entity-name-key.d.ts +28 -0
  74. package/dist/src/memory/entity-name-key.d.ts.map +1 -0
  75. package/dist/src/memory/entity-name-key.js +71 -0
  76. package/dist/src/memory/entity-name-key.js.map +1 -0
  77. package/dist/src/memory/memory-bridge.d.ts +7 -0
  78. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  79. package/dist/src/memory/memory-bridge.js +76 -33
  80. package/dist/src/memory/memory-bridge.js.map +1 -1
  81. package/dist/src/memory/memory-kg.d.ts.map +1 -1
  82. package/dist/src/memory/memory-kg.js +61 -0
  83. package/dist/src/memory/memory-kg.js.map +1 -1
  84. package/dist/src/memory/reranker-head.d.ts +37 -0
  85. package/dist/src/memory/reranker-head.d.ts.map +1 -0
  86. package/dist/src/memory/reranker-head.js +105 -0
  87. package/dist/src/memory/reranker-head.js.map +1 -0
  88. package/dist/src/orgrt/agent-runner.d.ts +7 -0
  89. package/dist/src/orgrt/agent-runner.d.ts.map +1 -1
  90. package/dist/src/orgrt/agent-runner.js +4 -0
  91. package/dist/src/orgrt/agent-runner.js.map +1 -1
  92. package/dist/src/orgrt/cli-sandbox.d.ts +61 -0
  93. package/dist/src/orgrt/cli-sandbox.d.ts.map +1 -0
  94. package/dist/src/orgrt/cli-sandbox.js +75 -0
  95. package/dist/src/orgrt/cli-sandbox.js.map +1 -0
  96. package/dist/src/orgrt/codex-runner.d.ts.map +1 -1
  97. package/dist/src/orgrt/codex-runner.js +7 -3
  98. package/dist/src/orgrt/codex-runner.js.map +1 -1
  99. package/dist/src/orgrt/daemon.d.ts +3 -0
  100. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  101. package/dist/src/orgrt/daemon.js +27 -0
  102. package/dist/src/orgrt/daemon.js.map +1 -1
  103. package/dist/src/orgrt/git-guard.d.ts +63 -0
  104. package/dist/src/orgrt/git-guard.d.ts.map +1 -0
  105. package/dist/src/orgrt/git-guard.js +329 -0
  106. package/dist/src/orgrt/git-guard.js.map +1 -0
  107. package/dist/src/orgrt/grok-runner.d.ts.map +1 -1
  108. package/dist/src/orgrt/grok-runner.js +7 -1
  109. package/dist/src/orgrt/grok-runner.js.map +1 -1
  110. package/dist/src/orgrt/opencode-runner.d.ts.map +1 -1
  111. package/dist/src/orgrt/opencode-runner.js +60 -11
  112. package/dist/src/orgrt/opencode-runner.js.map +1 -1
  113. package/dist/src/orgrt/policy-git.d.ts +2 -0
  114. package/dist/src/orgrt/policy-git.d.ts.map +1 -0
  115. package/dist/src/orgrt/policy-git.js +216 -0
  116. package/dist/src/orgrt/policy-git.js.map +1 -0
  117. package/dist/src/orgrt/policy.d.ts.map +1 -1
  118. package/dist/src/orgrt/policy.js +15 -176
  119. package/dist/src/orgrt/policy.js.map +1 -1
  120. package/dist/src/orgrt/questions.d.ts +13 -0
  121. package/dist/src/orgrt/questions.d.ts.map +1 -1
  122. package/dist/src/orgrt/questions.js +21 -1
  123. package/dist/src/orgrt/questions.js.map +1 -1
  124. package/dist/src/orgrt/reporting.d.ts +4 -0
  125. package/dist/src/orgrt/reporting.d.ts.map +1 -1
  126. package/dist/src/orgrt/reporting.js +11 -1
  127. package/dist/src/orgrt/reporting.js.map +1 -1
  128. package/dist/src/orgrt/role-sandbox.d.ts +87 -0
  129. package/dist/src/orgrt/role-sandbox.d.ts.map +1 -0
  130. package/dist/src/orgrt/role-sandbox.js +342 -0
  131. package/dist/src/orgrt/role-sandbox.js.map +1 -0
  132. package/dist/src/orgrt/session.d.ts +17 -6
  133. package/dist/src/orgrt/session.d.ts.map +1 -1
  134. package/dist/src/orgrt/session.js +75 -40
  135. package/dist/src/orgrt/session.js.map +1 -1
  136. package/dist/src/orgrt/shell-scan.d.ts +27 -0
  137. package/dist/src/orgrt/shell-scan.d.ts.map +1 -0
  138. package/dist/src/orgrt/shell-scan.js +453 -0
  139. package/dist/src/orgrt/shell-scan.js.map +1 -0
  140. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  141. package/dist/src/orgrt/task-dag.js +8 -0
  142. package/dist/src/orgrt/task-dag.js.map +1 -1
  143. package/dist/src/orgrt/templates.d.ts.map +1 -1
  144. package/dist/src/orgrt/templates.js +11 -5
  145. package/dist/src/orgrt/templates.js.map +1 -1
  146. package/dist/src/orgrt/types.d.ts +33 -0
  147. package/dist/src/orgrt/types.d.ts.map +1 -1
  148. package/dist/src/orgrt/types.js +17 -0
  149. package/dist/src/orgrt/types.js.map +1 -1
  150. package/dist/src/orgrt/vercel-providers.d.ts +5 -0
  151. package/dist/src/orgrt/vercel-providers.d.ts.map +1 -1
  152. package/dist/src/orgrt/vercel-providers.js +6 -1
  153. package/dist/src/orgrt/vercel-providers.js.map +1 -1
  154. package/dist/src/platform-adapters/migration.d.ts.map +1 -1
  155. package/dist/src/platform-adapters/migration.js +40 -2
  156. package/dist/src/platform-adapters/migration.js.map +1 -1
  157. package/dist/src/pricing/model-pricing.d.ts +0 -12
  158. package/dist/src/pricing/model-pricing.d.ts.map +1 -1
  159. package/dist/src/pricing/model-pricing.js +19 -4
  160. package/dist/src/pricing/model-pricing.js.map +1 -1
  161. package/dist/src/ui/collector.mjs +7 -4
  162. package/dist/src/ui/routes-org.mjs +2 -1
  163. package/dist/src/ui/server.mjs +7 -4
  164. package/dist/tsconfig.tsbuildinfo +1 -1
  165. package/package.json +3 -3
@@ -32,7 +32,7 @@ npx monomind agent spawn --type coder --name bot-1
32
32
  npx monomind agent spawn --type researcher --task "Research React 19 concurrent features"
33
33
 
34
34
  # Spawn with specific provider and model
35
- npx monomind agent spawn --type architect --provider anthropic --model claude-sonnet-4-6
35
+ npx monomind agent spawn --type architect --provider anthropic --model claude-sonnet-5
36
36
 
37
37
  # Spawn with auto tools and timeout
38
38
  npx monomind agent spawn --type coder --auto-tools --timeout 300
@@ -1,4 +1,4 @@
1
- <!-- Mastermind review domain — code review, security audit, content and strategy review. Default mode: auto. -->
1
+ <!-- Mastermind review domain — code review, security audit, content and strategy review. Trigger on "review this session's work," "full review of this session," or "review this worktree" — add --tillend for exhaustive find-fix-verify looping. Default mode: auto. -->
2
2
 
3
3
  **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check and intake below.
4
4
 
@@ -209,9 +209,14 @@ function getGitInfo() {
209
209
 
210
210
  // Normalise a model ID string to a short display name
211
211
  function modelLabel(id) {
212
- if (id.includes('opus')) return 'Opus 4.6';
213
- if (id.includes('sonnet')) return 'Sonnet 4.6';
214
- if (id.includes('haiku')) return 'Haiku 4.5';
212
+ // Derive the version from the id (claude-sonnet-5 -> "Sonnet 5", claude-opus-4-6 -> "Opus 4.6")
213
+ // instead of assuming every sonnet/opus id is one fixed release.
214
+ const m = id.match(/(fable|opus|sonnet|haiku)(?:-(\d+)(?:-(\d{1,2}))?(?!\d))?/);
215
+ if (m) {
216
+ const family = m[1][0].toUpperCase() + m[1].slice(1);
217
+ if (!m[2]) return family;
218
+ return family + ' ' + (m[3] ? m[2] + '.' + m[3] : m[2]);
219
+ }
215
220
  return id.split('-').slice(1, 3).join(' ');
216
221
  }
217
222
 
@@ -302,7 +307,7 @@ function getModelName() {
302
307
  const claudeModel = process.env.CLAUDE_CODE_MODEL;
303
308
  if (claudeModel) return modelLabel(claudeModel);
304
309
 
305
- return 'Sonnet 4.6'; // known current default rather than the generic "Claude Code"
310
+ return 'Sonnet 5'; // known current default rather than the generic "Claude Code"
306
311
  }
307
312
 
308
313
  // Get learning stats from memory database (pure stat calls)
@@ -14,9 +14,10 @@ const path = require('path');
14
14
  const WEB_SEARCH_COST = 0.01;
15
15
 
16
16
  const FALLBACK_PRICING = {
17
+ 'claude-fable-5-1': { in: 10e-6, out: 50e-6, cw: 12.5e-6, cr: 0.25e-6, fast: 1 },
17
18
  'claude-opus-5': { in: 5e-6, out: 25e-6, cw: 6.25e-6, cr: 0.5e-6, fast: 6 },
18
19
  'claude-opus-4-7': { in: 5e-6, out: 25e-6, cw: 6.25e-6, cr: 0.5e-6, fast: 6 },
19
- 'claude-sonnet-5': { in: 3e-6, out: 15e-6, cw: 3.75e-6, cr: 0.3e-6, fast: 1 },
20
+ 'claude-sonnet-5': { in: 2e-6, out: 10e-6, cw: 2.5e-6, cr: 0.2e-6, fast: 1 },
20
21
  'claude-opus-4-6': { in: 5e-6, out: 25e-6, cw: 6.25e-6, cr: 0.5e-6, fast: 6 },
21
22
  'claude-opus-4-5': { in: 5e-6, out: 25e-6, cw: 6.25e-6, cr: 0.5e-6, fast: 1 },
22
23
  'claude-opus-4-1': { in: 15e-6, out: 75e-6, cw: 18.75e-6, cr: 1.5e-6, fast: 1 },
@@ -36,6 +37,7 @@ const FALLBACK_PRICING = {
36
37
  };
37
38
 
38
39
  const SHORT_MODEL_NAMES = {
40
+ 'claude-fable-5-1': 'Fable 5.1',
39
41
  'claude-opus-5': 'Opus 5',
40
42
  'claude-opus-4-7': 'Opus 4.7',
41
43
  'claude-sonnet-5': 'Sonnet 5',
@@ -62,7 +64,8 @@ const SHORT_MODEL_NAMES = {
62
64
  // carry this map; this file previously lacked it entirely, so a caller
63
65
  // using a bare "--model sonnet"/"haiku"/"opus" string went unpriced here
64
66
  // even though every sibling table would have resolved it.
65
- var MODEL_ALIAS = { haiku: 'claude-haiku-4-5', sonnet: 'claude-sonnet-4-6', opus: 'claude-opus-4-6' };
67
+ // sonnet -> claude-sonnet-5 = DEFAULT_CLAUDE_MODEL (src/orgrt/vercel-providers.ts); .cjs can't import TS.
68
+ var MODEL_ALIAS = { haiku: 'claude-haiku-4-5-20251001', sonnet: 'claude-sonnet-5', opus: 'claude-opus-5', fable: 'claude-fable-5-1' };
66
69
 
67
70
  function getCanonical(model) {
68
71
  var stripped = model.replace(/@.*$/, '').replace(/-\d{8}$/, '');
@@ -33,9 +33,10 @@ If `caller` is not "command", load brain context following mastermind-protocol/S
33
33
  | Type | Label | Source | Notes |
34
34
  |------|-------|--------|-------|
35
35
  | `claude-local` | Claude (local CLI) | built-in | Uses `claude` CLI |
36
- | `claude-opus-4-7` | Claude Opus 4.7 | built-in | High capability |
37
- | `claude-sonnet-4-6` | Claude Sonnet 4.6 | built-in | Balanced (default) |
38
- | `claude-haiku-4-5` | Claude Haiku 4.5 | built-in | Fast, low cost |
36
+ | `claude-fable-5-1` | Claude Fable 5.1 | built-in | Most capable, highest cost |
37
+ | `claude-opus-5` | Claude Opus 5 | built-in | High capability |
38
+ | `claude-sonnet-5` | Claude Sonnet 5 | built-in | Balanced (default — the org runtime default, `DEFAULT_CLAUDE_MODEL`) |
39
+ | `claude-haiku-4-5-20251001` | Claude Haiku 4.5 | built-in | Fast, low cost |
39
40
  | `gemini-local` | Gemini (local) | built-in | Uses `gemini` CLI |
40
41
  | `codex-local` | Codex (local) | built-in | Uses `codex` CLI |
41
42
  | `cursor` | Cursor | built-in | Uses Cursor agent |
@@ -54,7 +55,7 @@ orgFile=".monomind/orgs/${org_name}.json"
54
55
  adaptersFile=".monomind/orgs/${org_name}-adapters.json"
55
56
  if [ ! -f "$adaptersFile" ]; then
56
57
  # Bootstrap from org config adapter_config if present
57
- defaultModel=$(jq -r '.run_config.ceo_adapter // "claude-sonnet-4-6"' "$orgFile")
58
+ defaultModel=$(jq -r '.run_config.ceo_adapter // "claude-sonnet-5"' "$orgFile")
58
59
  cat > "$adaptersFile" <<EOF
59
60
  {
60
61
  "org": "${org_name}",
@@ -81,7 +82,7 @@ echo "────────────────────────
81
82
  printf "%-22s %-28s %-10s %-8s %s\n" "TYPE" "LABEL" "SOURCE" "MODELS" "STATUS"
82
83
  echo "──────────────────────────────────────────────────────"
83
84
 
84
- defaultAdap=$(jq -r '.default_adapter // "claude-sonnet-4-6"' "$adaptersFile")
85
+ defaultAdap=$(jq -r '.default_adapter // "claude-sonnet-5"' "$adaptersFile")
85
86
 
86
87
  jq -r --arg def "$defaultAdap" '
87
88
  (.adapters // [])[] |
@@ -94,20 +94,21 @@ Add a new role to the org. Prompt the user for:
94
94
  ADAPTER / MODEL
95
95
  ───────────────
96
96
  Available Claude models:
97
- 1. claude-sonnet-4-6 → balanced capability + speed (Recommended)
98
- 2. claude-opus-4-7 → highest capability, slower
99
- 3. claude-haiku-4-5 → fastest, lowest cost
97
+ 1. claude-sonnet-5 → balanced capability + speed (Recommended)
98
+ 2. claude-opus-5 → high capability, slower
99
+ 3. claude-fable-5-1 → most capable, highest cost
100
+ 4. claude-haiku-4-5-20251001 → fastest, lowest cost
100
101
 
101
102
  Enter choice [1]:
102
103
  ```
103
104
 
104
- Set `adapter_config.model` from selection. Default: `claude-sonnet-4-6`.
105
+ Set `adapter_config.model` from selection. Default: `claude-sonnet-5` (the org runtime default, `DEFAULT_CLAUDE_MODEL`).
105
106
 
106
107
  Append to `.monomind/orgs/<org_name>.json` roles array using jq:
107
108
 
108
109
  ```bash
109
- # model from adapter picker (default: claude-sonnet-4-6)
110
- adapter_model="${selected_model:-claude-sonnet-4-6}"
110
+ # model from adapter picker (default: claude-sonnet-5)
111
+ adapter_model="${selected_model:-claude-sonnet-5}"
111
112
 
112
113
  tmp="${orgFile}.tmp"
113
114
  jq --arg id "$agent_id" \
@@ -83,11 +83,30 @@ Skip `ui.icon` whenever there isn't a clean match — an unmatched or omitted `i
83
83
 
84
84
  ---
85
85
 
86
- ## Step 2.4 — Optional Per-Role Settings
86
+ ## Step 2.4 — Per-Role Model and Optional Settings
87
87
 
88
- For any role that needs non-default behavior, set (all optional — omit to inherit defaults):
88
+ **`adapter_config.model` — REQUIRED on every role.** Always write an explicit model; never leave a role to inherit a runtime default. A role without one silently moves to whatever model a later release makes the default, and the Step 4 MODELS table can't show what the role will really run on.
89
+
90
+ - If the user named or clearly implied a model for a role ("the researcher should use Opus" → `"claude-opus-5"`), use it.
91
+ - Otherwise set the **latest model for that role's runtime/vendor**:
92
+ - Claude runtime (the default — no `provider`/`runtime`, or `provider.kind` `subscription` / `api-key`): **`"claude-sonnet-5"`** — the org runtime default, `DEFAULT_CLAUDE_MODEL` in `orgrt/vercel-providers.ts`.
93
+ - Any other runtime or vendor: use the value the runtime itself falls back to, read from the installed CLI package rather than from memory — `VENDOR_DEFAULTS[vendor]` (when the role has `provider.vendor`) or the `runtime` switch in `resolveModel()` (`orgrt/session.ts`), and `VERCEL_PROVIDERS[vendor].defaultModel` (`orgrt/vercel-providers.ts`). Source files live under `packages/@monomind/cli/src/orgrt/` in the source repository; in an installed package read `dist/src/orgrt/session.js` and `dist/src/orgrt/vercel-providers.js`. At this release those resolve to:
94
+
95
+ | Runtime / vendor | Latest model |
96
+ |------------------|--------------|
97
+ | `claude` (default), vendor `anthropic` | `claude-sonnet-5` |
98
+ | `codex` | `gpt-5.6-terra` |
99
+ | `antigravity` | `gemini-3.6-flash-high` |
100
+ | `kimicode` | `kimi-code/k3` |
101
+ | `opencode` (no vendor) | `glm-5.2` |
102
+ | `vercel` (no vendor), vendor `openai` | `gpt-5.5` |
103
+ | vendor `glm` / `google` / `xai` / `deepseek` | `glm-5.2` / `gemini-3.1-pro` / `grok-4.5` / `deepseek-chat` |
104
+
105
+ If the source you read disagrees with this table, the source wins. For vendor `openai-compatible` there is no default (it is `''`) — ask the user for the model id.
106
+ - A role may deliberately run a different current model than its runtime's latest when that fits the role (e.g. `claude-opus-5` or `claude-fable-5-1` for a planner, `claude-haiku-4-5-20251001` for a checklist-style reviewer, as the `org create` templates do) — still an explicit value, and still a model from the current family, never a superseded id.
107
+
108
+ For any role that needs non-default behavior, also set (all optional — omit to inherit defaults):
89
109
 
90
- - `adapter_config.model`: a model id (e.g. `"claude-opus-5"`, `"glm-5.2"`, `"gpt-5.6-terra"`) — default depends on runtime/vendor (see `resolveModel()` in `orgrt/session.ts`); explicit value always wins
91
110
  - `provider`: `{ kind, vendor?, apiKeyEnv?, baseUrl?, authTokenEnv? }` — default `subscription` (local Claude Code login). `kind` is one of:
92
111
  - `"subscription"` (default) — Claude Pro/Max via `claude login`
93
112
  - `"api-key"` — Anthropic API key
@@ -100,7 +119,7 @@ For any role that needs non-default behavior, set (all optional — omit to inhe
100
119
  - `webAllow: ["*"]` (or specific domains) for a role that does WebSearch/WebFetch as part of its job — an empty/unset `webAllow` silently blocks the exact task you just assigned it.
101
120
  - `autoApproveTools: [...]` — tool/action names this role may use without pausing for a human approval, even though they're normally on the sensitive-actions list (`Bash`, `WebFetch`, `WebSearch`, `org_complete`). **Mandatory, not optional, for any org with a `schedule` set** (an unattended/scheduled org): a role that pauses on `WebSearch` or `org_complete` waiting for a human who isn't there to click approve will deadlock forever on every scheduled run, repeatedly re-asking through both `ask_human` and `org_gate` with nothing to show for it. Grant every tool a scheduled org's roles routinely need — including `org_complete` for the boss role — rather than leaving the default human-approval gate in place for automation that's supposed to run with nobody watching.
102
121
 
103
- Do not invent values for these — only populate a field the user actually specified or clearly implied (e.g. "the researcher should use Opus" → that role's `adapter_config.model`).
122
+ Apart from `adapter_config.model` (always set, per above), do not invent values for these — only populate `provider`, `runtime`, or `policy` when the user actually specified or clearly implied it, or when a role's responsibilities require it (the `webAllow`/`autoApproveTools` cases above).
104
123
 
105
124
  ---
106
125
 
@@ -127,7 +146,8 @@ Produce an org config object matching `OrgDefSchema` exactly:
127
146
  "title": "<display title>",
128
147
  "type": "boss | specialist | <domain synonym>",
129
148
  "reports_to": "<role id, or null for the single boss>",
130
- "responsibilities": ["<3-6 specific duties — this text becomes part of the agent's role briefing>"]
149
+ "responsibilities": ["<3-6 specific duties — this text becomes part of the agent's role briefing>"],
150
+ "adapter_config": { "model": "<explicit model from Step 2.4, e.g. claude-sonnet-5>" }
131
151
  }
132
152
  ]
133
153
  }
@@ -135,7 +155,7 @@ Produce an org config object matching `OrgDefSchema` exactly:
135
155
 
136
156
  `status` starts `"stopped"` regardless of whether `schedule` is set — the org does not run until `monomind org run <name>` (one-shot) or `monomind org serve` (picks up any org whose `schedule` is set) is invoked.
137
157
 
138
- Only include `adapter_config`, `provider`, `policy`, or `ui` on a role when Step 2.3/2.4 populated them for it — leave them out entirely rather than writing empty objects.
158
+ Every role carries `adapter_config.model` (Step 2.4). Only include `provider`, `policy`, or `ui` on a role when Step 2.3/2.4 populated them for it — leave them out entirely rather than writing empty objects.
139
159
 
140
160
  ---
141
161
 
@@ -153,14 +173,14 @@ MODELS ← review this first
153
173
  ────────────────────────────────────────────────────
154
174
  ROLE MODEL
155
175
  ────────────────── ────────────────────────────
156
- boss claude-opus-5
157
- content-writer (runtime default)
158
- content-reviewer (runtime default)
176
+ boss claude-sonnet-5
177
+ content-writer claude-sonnet-5
178
+ content-reviewer claude-sonnet-5
159
179
 
160
- Only roles with an explicit adapter_config.model show a value; "(runtime
161
- default)" roles inherit whatever resolveModel() picks for their
162
- runtime/vendor at run time. To pin a role to a specific model, say so now
163
- (e.g. "put content-writer on glm-5.2").
180
+ Every role shows the explicit adapter_config.model that will be saved —
181
+ the latest model for its runtime unless you asked for another. To put a
182
+ role on a different model, say so now (e.g. "put content-writer on
183
+ claude-opus-5").
164
184
 
165
185
  ROLES (N roles — exactly one boss, every reports_to resolves to a real role id)
166
186
  ─────
@@ -237,6 +257,13 @@ else
237
257
  fi
238
258
  echo "✓ Structural checks passed (upgrade monomind for full schema validation)"
239
259
  fi
260
+
261
+ # Every agent role must pin its model explicitly (Step 2.4).
262
+ missing_model=$(jq -r '[.roles[] | select(.kind != "endpoint" and ((.adapter_config.model // "") == "")) | .id] | join(", ")' "$orgJson")
263
+ if [ -n "$missing_model" ]; then
264
+ echo "ERROR: roles without an explicit adapter_config.model: ${missing_model} — set the latest model for their runtime (Step 2.4) and re-save."
265
+ exit 1
266
+ fi
240
267
  ```
241
268
 
242
269
  ---
@@ -280,9 +307,9 @@ If `schedule` was set, also print:
280
307
  In **auto** mode (where Step 4's plan/model confirmation was skipped), always also print the models table so the user still sees — after the fact — what each role will run on, even though nothing blocked on it:
281
308
  ```
282
309
  Models:
283
- boss claude-opus-5
284
- content-writer (runtime default)
285
- content-reviewer (runtime default)
310
+ boss claude-sonnet-5
311
+ content-writer claude-sonnet-5
312
+ content-reviewer claude-sonnet-5
286
313
  Adjust with: /mastermind:org-settings, or edit .monomind/orgs/<org_name>.json directly
287
314
  ```
288
315
  In **confirm** mode this table was already shown and accepted in Step 4 — do not repeat it here.
@@ -55,7 +55,7 @@ echo ""
55
55
  # LLM / Adapter config
56
56
  echo "LLM PROVIDER"
57
57
  echo "────────────"
58
- ceo_model=$(jq -r '.run_config.ceo_adapter // "claude-sonnet-4-6"' "$orgFile")
58
+ ceo_model=$(jq -r '.run_config.ceo_adapter // "claude-sonnet-5"' "$orgFile")
59
59
  echo " CEO adapter model: $ceo_model"
60
60
  jq -r '(.roles // [])[] | " \(.id): \(.adapter_config.model // "inherited from CEO")"' "$orgFile" 2>/dev/null
61
61
  echo ""
@@ -148,7 +148,7 @@ esac
148
148
  modelId="${model}"
149
149
  if [ -z "$modelId" ]; then
150
150
  case "$adapterType" in
151
- claude-local) modelId="claude-sonnet-4-6" ;;
151
+ claude-local) modelId="claude-sonnet-5" ;;
152
152
  gemini-local) modelId="gemini-2.0-flash" ;;
153
153
  codex-local) modelId="gpt-4o" ;;
154
154
  cursor) modelId="cursor-default" ;;
@@ -19,7 +19,7 @@ This skill is invoked by `mastermind:new-agent` or directly via `/mastermind:new
19
19
  - `agent_id`: unique slug for the new agent (required for create; auto-generated if omitted)
20
20
  - `title`: display title for the agent (required for create)
21
21
  - `adapter_type`: claude-local | gemini-local | codex-local | cursor | opencode | hermes | http | acpx (default: claude-local)
22
- - `model`: model identifier (e.g. claude-sonnet-4-6, claude-opus-4-7, gemini-2.0-flash)
22
+ - `model`: model identifier (e.g. claude-sonnet-5, claude-opus-5, gemini-2.0-flash)
23
23
  - `max_tokens`: max tokens per run (default: 8192)
24
24
  - `reports_to`: parent agent id in the hierarchy (null = top-level)
25
25
  - `governance`: auto | board | strict (default: inherit from org)
@@ -36,7 +36,7 @@ This skill is invoked by `mastermind:new-agent` or directly via `/mastermind:new
36
36
 
37
37
  | Type | Description | Default Model |
38
38
  |------|-------------|---------------|
39
- | `claude-local` | Claude via Anthropic API | claude-sonnet-4-6 |
39
+ | `claude-local` | Claude via Anthropic API | claude-sonnet-5 |
40
40
  | `gemini-local` | Gemini via Google API | gemini-2.0-flash |
41
41
  | `codex-local` | OpenAI Codex | gpt-4o |
42
42
  | `cursor` | Cursor IDE agent | cursor-default |
@@ -71,7 +71,7 @@ echo "AVAILABLE ADAPTERS"
71
71
  echo "────────────────────────────────────────────────────────"
72
72
  cat <<'ADAPTERS'
73
73
  claude-local Claude via Anthropic API (recommended)
74
- Models: claude-sonnet-4-6, claude-opus-4-7, claude-haiku-4-5
74
+ Models: claude-sonnet-5, claude-opus-5, claude-fable-5-1, claude-haiku-4-5-20251001
75
75
  gemini-local Gemini via Google AI
76
76
  Models: gemini-2.0-flash, gemini-1.5-pro
77
77
  codex-local OpenAI Codex
@@ -108,7 +108,7 @@ modelId="${model}"
108
108
  # Default model per adapter
109
109
  if [ -z "$modelId" ]; then
110
110
  case "$adapterType" in
111
- claude-local) modelId="claude-sonnet-4-6" ;;
111
+ claude-local) modelId="claude-sonnet-5" ;;
112
112
  gemini-local) modelId="gemini-2.0-flash" ;;
113
113
  codex-local) modelId="gpt-4o" ;;
114
114
  cursor) modelId="cursor-default" ;;
@@ -149,7 +149,7 @@ adapterType="${adapter_type:-claude-local}"
149
149
  modelId="${model}"
150
150
  if [ -z "$modelId" ]; then
151
151
  case "$adapterType" in
152
- claude-local) modelId="claude-sonnet-4-6" ;;
152
+ claude-local) modelId="claude-sonnet-5" ;;
153
153
  gemini-local) modelId="gemini-2.0-flash" ;;
154
154
  codex-local) modelId="gpt-4o" ;;
155
155
  cursor) modelId="cursor-default" ;;
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mastermind-review
3
- description: Mastermind review domain — code review, content review, strategy review, security audit. Spawns a Review Manager coordinating a mesh of specialist reviewers for multi-angle assessment.
3
+ description: Mastermind review domain — code review, content review, strategy review, security audit. Use for "review this session's work," "full review of this session," or "review this worktree" — add --tillend to loop find-fix-verify rounds until a round finds nothing left to fix, not just once. Spawns a Review Manager coordinating a mesh of specialist reviewers for multi-angle assessment.
4
4
  type: domain-skill
5
5
  default_mode: auto
6
6
  ---
@@ -652,7 +652,7 @@ AGENT_BROWSER_CONTENT_BOUNDARIES=1 # LLM-safe output delimiters
652
652
  AGENT_BROWSER_HEADED=1 # visible browser (debugging)
653
653
  AGENT_BROWSER_STREAM_PORT=9223 # fixed WebSocket stream port
654
654
  # No API key needed — monomind browse is built-in
655
- AI_GATEWAY_MODEL=anthropic/claude-sonnet-4-6
655
+ AI_GATEWAY_MODEL=anthropic/claude-sonnet-5
656
656
  ```
657
657
 
658
658
  ---
package/bin/cli.js CHANGED
@@ -16,10 +16,22 @@ import { randomUUID } from 'crypto';
16
16
  // Previously any `monomind` invocation with redirected stdin (CI pipes, xargs,
17
17
  // editor integrations) silently flipped into MCP server mode and accepted
18
18
  // JSON-RPC tools/call — privilege escalation by environment.
19
+ //
20
+ // Only the *bare* invocation (`mcp` or `mcp start`, no further args) takes
21
+ // this fast path — which is also exactly what real MCP clients (Claude
22
+ // Desktop, etc.) actually spawn. Any additional argument defers to the full
23
+ // CLI (dist/src/index.js) instead. This fast path is a raw stdio JSON-RPC
24
+ // loop that does not implement --help, --transport/-t, --port/-p, --daemon,
25
+ // --force, or --tools at all — it used to swallow them silently and always
26
+ // behave the same way regardless of what was passed, including printing
27
+ // nothing for `mcp start --help` and starting a real server instead
28
+ // (release 2.11.1 QA repro). The full CLI's `mcp start` command (mcp.ts)
29
+ // is the only implementation of any of those flags.
19
30
  const cliArgs = process.argv.slice(2);
20
- const isExplicitMCP = cliArgs.length >= 1 && cliArgs[0] === 'mcp' && (cliArgs.length === 1 || cliArgs[1] === 'start');
31
+ const isBareMCPInvocation =
32
+ cliArgs.length === 1 ? cliArgs[0] === 'mcp' : cliArgs.length === 2 && cliArgs[0] === 'mcp' && cliArgs[1] === 'start';
21
33
  const allowAutoDetect = process.env.MONOMIND_MCP_AUTODETECT === '1';
22
- const isMCPMode = !process.stdin.isTTY && (isExplicitMCP || (allowAutoDetect && process.argv.length === 2));
34
+ const isMCPMode = !process.stdin.isTTY && (isBareMCPInvocation || (allowAutoDetect && process.argv.length === 2));
23
35
 
24
36
  if (isMCPMode) {
25
37
  // Run MCP server mode
@@ -50,6 +62,52 @@ if (isMCPMode) {
50
62
  );
51
63
  }
52
64
 
65
+ // Mirror the PID-file mechanism `mcp status`/`mcp health` read from a
66
+ // separate process (see MCPServerManager.writePidFile()/getStatus() in
67
+ // mcp-server.ts). Without this, this fast path was invisible to `mcp
68
+ // status`: it never goes through MCPServerManager.start(), so no PID file
69
+ // was ever written and status/health always reported "not running" even
70
+ // while a live stdio server was up (confirmed via `ps` at the same instant
71
+ // — release 2.11.1 QA repro). Same path/format/flags as
72
+ // MCPServerManager.writePidFile(): O_CREAT|O_EXCL so a pre-existing path
73
+ // (including a symlinked one) is never followed, with a stale-PID-file
74
+ // replace fallback on EEXIST.
75
+ try {
76
+ const { mkdirSync, writeFileSync, unlinkSync } = await import('fs');
77
+ const { homedir } = await import('os');
78
+ const { join: pathJoin } = await import('path');
79
+ const stateDir = pathJoin(homedir(), '.monomind');
80
+ mkdirSync(stateDir, { recursive: true, mode: 0o700 });
81
+ const pidFilePath = pathJoin(stateDir, 'mcp.pid');
82
+ try {
83
+ writeFileSync(pidFilePath, String(process.pid), { flag: 'wx', mode: 0o600 });
84
+ } catch (e) {
85
+ if (e && e.code === 'EEXIST') {
86
+ unlinkSync(pidFilePath);
87
+ writeFileSync(pidFilePath, String(process.pid), { flag: 'wx', mode: 0o600 });
88
+ } else {
89
+ throw e;
90
+ }
91
+ }
92
+ // 'exit' handlers must finish synchronously, so this uses unlinkSync
93
+ // rather than the fs.promises API used elsewhere in this file.
94
+ process.on('exit', () => {
95
+ try {
96
+ unlinkSync(pidFilePath);
97
+ } catch {
98
+ /* already gone, or never successfully written */
99
+ }
100
+ });
101
+ } catch (e) {
102
+ // Best-effort: `mcp status` falling back to "not running" is far better
103
+ // than refusing to start the server over a PID-file write error.
104
+ if (process.env.MONOMIND_LOG_LEVEL === 'debug') {
105
+ console.error(
106
+ `[${new Date().toISOString()}] WARN [monomind-mcp] (${sessionId}) could not write PID file: ${e && e.message ? e.message : e}`
107
+ );
108
+ }
109
+ }
110
+
53
111
  // Top-level safety nets — without these, an unhandled async error in a tool
54
112
  // handler crashes the process with no observable cleanup.
55
113
  process.on('uncaughtException', (err) => {
@@ -1 +1 @@
1
- {"version":3,"file":"cap-code.d.ts","sourceRoot":"","sources":["../../../src/capabilities/cap-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAKjB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,cAAc,EAAE,gBAsB5B,CAAC"}
1
+ {"version":3,"file":"cap-code.d.ts","sourceRoot":"","sources":["../../../src/capabilities/cap-code.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAMjB,MAAM,YAAY,CAAC;AAcpB,eAAO,MAAM,cAAc,EAAE,gBAuE5B,CAAC"}
@@ -1,16 +1,78 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ /**
4
+ * Root directory to search under, captured from activate(). The
5
+ * CapabilityModule.search() signature takes only (query, limit) — no
6
+ * rootDir — so it has to be stashed somewhere between activate() and
7
+ * search() the same way cap-documents.ts stashes its in-memory index.
8
+ */
9
+ let codeRootDir = '';
10
+ function getMonographDbPath(rootDir) {
11
+ return path.join(rootDir, '.monomind', 'monograph.db');
12
+ }
1
13
  export const codeCapability = {
2
14
  name: 'code',
3
15
  detect(scan) {
4
16
  return scan.capabilities.code.confidence;
5
17
  },
6
- async activate(_rootDir) {
7
- // monolean: no-op — existing init/monograph handles code projects
8
- // This module exists so the manager can track code as a capability
18
+ async activate(rootDir) {
19
+ // monolean: no separate index of our own — code content is indexed by
20
+ // the existing monograph knowledge graph. search() below queries that
21
+ // graph directly, so activate() only needs to remember where it lives.
22
+ codeRootDir = rootDir;
9
23
  },
10
24
  async index(_files) {
11
25
  // monolean: existing monograph handles code indexing
12
26
  return { indexed: 0, skipped: 0, errors: [] };
13
27
  },
28
+ /**
29
+ * Delegates to monograph's FTS index rather than re-scanning files.
30
+ *
31
+ * Previously this method did not exist at all: CapabilityManager.search()
32
+ * only calls `module.search()` when a module defines one (it's optional
33
+ * on CapabilityModule), so the `code` capability silently contributed
34
+ * zero results to every top-level `monomind search` — including
35
+ * `--type code`, which is documented as a supported value — even though
36
+ * `monomind monograph search` found the exact same symbol via the same
37
+ * database.
38
+ */
39
+ async search(query, limit = 20) {
40
+ if (!codeRootDir)
41
+ return [];
42
+ const dbPath = getMonographDbPath(codeRootDir);
43
+ if (!fs.existsSync(dbPath))
44
+ return [];
45
+ try {
46
+ const { openDb, closeDb, ftsSearch } = await import('@monoes/monograph');
47
+ const db = openDb(dbPath);
48
+ try {
49
+ const rows = ftsSearch(db, query, limit);
50
+ return rows
51
+ .filter((r) => r.filePath)
52
+ .map((r) => ({
53
+ path: r.filePath,
54
+ // FTS5 rank is <= 0, more negative = better match; flip the sign
55
+ // so higher score = better, matching CapabilityManager.search()'s
56
+ // sort order across capabilities.
57
+ score: -r.rank,
58
+ snippet: r.startLine && r.startLine > 0
59
+ ? `${r.label} ${r.name} (line ${r.startLine})`
60
+ : `${r.label} ${r.name}`,
61
+ type: 'code',
62
+ metadata: { label: r.label, startLine: r.startLine, endLine: r.endLine },
63
+ }))
64
+ .slice(0, limit);
65
+ }
66
+ finally {
67
+ closeDb(db);
68
+ }
69
+ }
70
+ catch {
71
+ // monograph unavailable or the DB is unreadable — the code capability
72
+ // just contributes no results rather than failing the whole search.
73
+ return [];
74
+ }
75
+ },
14
76
  async healthChecks() {
15
77
  // monolean: delegates to existing doctor checks when cap/code is active
16
78
  // The doctor command checks isActive('code') to decide which checks to run
@@ -1 +1 @@
1
- {"version":3,"file":"cap-code.js","sourceRoot":"","sources":["../../../src/capabilities/cap-code.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,IAAI,EAAE,MAAM;IAEZ,MAAM,CAAC,IAAmB;QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB;QAC7B,kEAAkE;QAClE,mEAAmE;IACrE,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,MAAmB;QAC7B,qDAAqD;QACrD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,wEAAwE;QACxE,2EAA2E;QAC3E,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"cap-code.js","sourceRoot":"","sources":["../../../src/capabilities/cap-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B;;;;;GAKG;AACH,IAAI,WAAW,GAAG,EAAE,CAAC;AAErB,SAAS,kBAAkB,CAAC,OAAe;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,IAAI,EAAE,MAAM;IAEZ,MAAM,CAAC,IAAmB;QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,sEAAsE;QACtE,sEAAsE;QACtE,uEAAuE;QACvE,WAAW,GAAG,OAAO,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,MAAmB;QAC7B,qDAAqD;QACrD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAChD,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE;QACpC,IAAI,CAAC,WAAW;YAAE,OAAO,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,CAAC;QAEtC,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;YACzE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAC1B,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;gBACzC,OAAO,IAAI;qBACR,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;qBACzB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBACX,IAAI,EAAE,CAAC,CAAC,QAAkB;oBAC1B,iEAAiE;oBACjE,kEAAkE;oBAClE,kCAAkC;oBAClC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI;oBACd,OAAO,EACL,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC;wBAC5B,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,SAAS,GAAG;wBAC9C,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE;oBAC5B,IAAI,EAAE,MAAe;oBACrB,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;iBACzE,CAAC,CAAC;qBACF,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YACrB,CAAC;oBAAS,CAAC;gBACT,OAAO,CAAC,EAAE,CAAC,CAAC;YACd,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,sEAAsE;YACtE,oEAAoE;YACpE,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,wEAAwE;QACxE,2EAA2E;QAC3E,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-diff.d.ts","sourceRoot":"","sources":["../../../src/commands/analyze-diff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAkC1E,eAAO,MAAM,WAAW,EAAE,OAwTzB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,OAsPzB,CAAC"}
1
+ {"version":3,"file":"analyze-diff.d.ts","sourceRoot":"","sources":["../../../src/commands/analyze-diff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAkC1E,eAAO,MAAM,WAAW,EAAE,OAyUzB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,OAsPzB,CAAC"}
@@ -139,15 +139,19 @@ export const diffCommand = {
139
139
  risk.breakdown.breakingChanges = risk.breakdown.breakingChanges || [];
140
140
  }
141
141
  const classification = result.classification || {
142
- category: 'unknown',
142
+ primary: 'unknown',
143
+ secondary: [],
143
144
  confidence: 0,
144
- reasoning: '',
145
+ impactLevel: 'low',
146
+ suggestedReviewers: [],
147
+ testingStrategy: [],
148
+ riskFactors: [],
145
149
  };
146
150
  output.printBox([
147
151
  `Ref: ${result.ref || 'HEAD'}`,
148
152
  `Files: ${files.length}`,
149
153
  `Risk: ${getRiskDisplay(risk.overall)} (${risk.score}/100)`,
150
- `Type: ${classification.category}${classification.subcategory ? ` (${classification.subcategory})` : ''}`,
154
+ `Type: ${classification.primary}${classification.secondary.length ? ` (${classification.secondary.join(', ')})` : ''}`,
151
155
  ``,
152
156
  result.summary || 'No summary available',
153
157
  ].join('\n'), 'Diff Analysis');
@@ -199,13 +203,19 @@ export const diffCommand = {
199
203
  { key: 'value', header: 'Value', width: 40 },
200
204
  ],
201
205
  data: [
202
- { field: 'Category', value: classification.category },
203
- { field: 'Subcategory', value: classification.subcategory || '-' },
206
+ { field: 'Category', value: classification.primary },
207
+ {
208
+ field: 'Subcategory',
209
+ value: classification.secondary.length ? classification.secondary.join(', ') : '-',
210
+ },
204
211
  { field: 'Confidence', value: `${(classification.confidence * 100).toFixed(0)}%` },
212
+ { field: 'Impact Level', value: classification.impactLevel },
205
213
  ],
206
214
  });
207
215
  output.writeln();
208
- output.writeln(output.dim(`Reasoning: ${classification.reasoning}`));
216
+ output.writeln(output.dim(classification.riskFactors.length
217
+ ? `Risk factors: ${classification.riskFactors.join(', ')}`
218
+ : 'No specific risk factors identified.'));
209
219
  }
210
220
  // Reviewers
211
221
  if (showReviewers || showAll) {