@monoes/monomindcli 2.10.9 → 2.10.13

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 (265) hide show
  1. package/.claude/commands/mastermind/brain.md +14 -14
  2. package/.claude/commands/mastermind/help.md +2 -2
  3. package/.claude/commands/mastermind/master.md +24 -19
  4. package/.claude/commands/mastermind/memory.md +8 -8
  5. package/.claude/commands/mastermind/monoswarm.md +4 -4
  6. package/.claude/commands/mastermind.md +7 -7
  7. package/.claude/commands/truth/start.md +3 -3
  8. package/.claude/settings.json +0 -4
  9. package/.claude/skills/mastermind/SKILL.md +7 -16
  10. package/.claude/skills/mastermind/references/antigravity-tools.md +0 -62
  11. package/.claude/skills/mastermind/references/claude-code-tools.md +0 -52
  12. package/.claude/skills/mastermind/references/codex-tools.md +0 -66
  13. package/.claude/skills/mastermind/references/copilot-tools.md +0 -51
  14. package/.claude/skills/mastermind/references/gemini-tools.md +0 -65
  15. package/.claude/skills/mastermind/references/pi-tools.md +0 -30
  16. package/.claude/skills/mastermind-createorg/SKILL.md +3 -1
  17. package/.claude/skills/mastermind-debug/SKILL.md +3 -277
  18. package/.claude/skills/mastermind-design/SKILL.md +2 -0
  19. package/.claude/skills/mastermind-execute/SKILL.md +59 -103
  20. package/.claude/skills/mastermind-idea/SKILL.md +9 -2
  21. package/.claude/skills/mastermind-intake/SKILL.md +31 -7
  22. package/.claude/skills/mastermind-issue-detail/SKILL.md +70 -16
  23. package/.claude/skills/mastermind-issues/SKILL.md +111 -16
  24. package/.claude/skills/mastermind-liveness/SKILL.md +96 -26
  25. package/.claude/skills/mastermind-memory/SKILL.md +0 -316
  26. package/.claude/skills/mastermind-my-issues/SKILL.md +40 -8
  27. package/.claude/skills/mastermind-org/SKILL.md +1 -12
  28. package/.claude/skills/mastermind-plan/SKILL.md +7 -228
  29. package/.claude/skills/mastermind-plan-to-tasks/SKILL.md +132 -24
  30. package/.claude/skills/mastermind-protocol/SKILL.md +33 -22
  31. package/.claude/skills/mastermind-research/SKILL.md +0 -163
  32. package/.claude/skills/mastermind-review/SKILL.md +0 -228
  33. package/.claude/skills/mastermind-runorg/SKILL.md +22 -3
  34. package/.claude/skills/mastermind-skill-builder/SKILL.md +1 -1
  35. package/.claude/skills/mastermind-tasks/SKILL.md +5 -0
  36. package/.claude/skills/mastermind-techport/SKILL.md +1 -1
  37. package/.claude/skills/performance-analysis/SKILL.md +1 -1
  38. package/.claude/skills/verification-quality/SKILL.md +2 -3
  39. package/README.md +2 -2
  40. package/dist/src/commands/agent-exec.d.ts +2 -0
  41. package/dist/src/commands/agent-exec.d.ts.map +1 -1
  42. package/dist/src/commands/agent-exec.js +16 -0
  43. package/dist/src/commands/agent-exec.js.map +1 -1
  44. package/dist/src/commands/doc.js +2 -2
  45. package/dist/src/commands/doc.js.map +1 -1
  46. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  47. package/dist/src/commands/doctor-project-checks.js +20 -1
  48. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  49. package/dist/src/commands/init-wizard.d.ts.map +1 -1
  50. package/dist/src/commands/init-wizard.js +6 -0
  51. package/dist/src/commands/init-wizard.js.map +1 -1
  52. package/dist/src/commands/init.d.ts.map +1 -1
  53. package/dist/src/commands/init.js +12 -2
  54. package/dist/src/commands/init.js.map +1 -1
  55. package/dist/src/commands/monograph.d.ts.map +1 -1
  56. package/dist/src/commands/monograph.js +11 -4
  57. package/dist/src/commands/monograph.js.map +1 -1
  58. package/dist/src/commands/org-observe.d.ts +2 -0
  59. package/dist/src/commands/org-observe.d.ts.map +1 -1
  60. package/dist/src/commands/org-observe.js +115 -6
  61. package/dist/src/commands/org-observe.js.map +1 -1
  62. package/dist/src/commands/org.d.ts +26 -0
  63. package/dist/src/commands/org.d.ts.map +1 -1
  64. package/dist/src/commands/org.js +186 -28
  65. package/dist/src/commands/org.js.map +1 -1
  66. package/dist/src/init/codex-generator.d.ts +5 -0
  67. package/dist/src/init/codex-generator.d.ts.map +1 -1
  68. package/dist/src/init/codex-generator.js +12 -3
  69. package/dist/src/init/codex-generator.js.map +1 -1
  70. package/dist/src/init/executor.d.ts.map +1 -1
  71. package/dist/src/init/executor.js +10 -9
  72. package/dist/src/init/executor.js.map +1 -1
  73. package/dist/src/init/settings-generator.d.ts.map +1 -1
  74. package/dist/src/init/settings-generator.js +0 -5
  75. package/dist/src/init/settings-generator.js.map +1 -1
  76. package/dist/src/init/write-codex.d.ts.map +1 -1
  77. package/dist/src/init/write-codex.js +6 -5
  78. package/dist/src/init/write-codex.js.map +1 -1
  79. package/dist/src/knowledge/document-pipeline.d.ts +5 -0
  80. package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
  81. package/dist/src/knowledge/document-pipeline.js +32 -16
  82. package/dist/src/knowledge/document-pipeline.js.map +1 -1
  83. package/dist/src/mcp-tools/hooks-routing.d.ts +9 -0
  84. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  85. package/dist/src/mcp-tools/hooks-routing.js +12 -1
  86. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  87. package/dist/src/mcp-tools/knowledge-tools.d.ts.map +1 -1
  88. package/dist/src/mcp-tools/knowledge-tools.js +105 -13
  89. package/dist/src/mcp-tools/knowledge-tools.js.map +1 -1
  90. package/dist/src/mcp-tools/memory-tools.d.ts +13 -0
  91. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  92. package/dist/src/mcp-tools/memory-tools.js +257 -31
  93. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  94. package/dist/src/mcp-tools/monograph/health-tools.d.ts.map +1 -1
  95. package/dist/src/mcp-tools/monograph/health-tools.js +99 -42
  96. package/dist/src/mcp-tools/monograph/health-tools.js.map +1 -1
  97. package/dist/src/mcp-tools/monograph/impact-tools.d.ts.map +1 -1
  98. package/dist/src/mcp-tools/monograph/impact-tools.js +123 -51
  99. package/dist/src/mcp-tools/monograph/impact-tools.js.map +1 -1
  100. package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
  101. package/dist/src/mcp-tools/monograph/query-tools.js +113 -96
  102. package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
  103. package/dist/src/mcp-tools/monograph/shared.d.ts +37 -4
  104. package/dist/src/mcp-tools/monograph/shared.d.ts.map +1 -1
  105. package/dist/src/mcp-tools/monograph/shared.js +75 -56
  106. package/dist/src/mcp-tools/monograph/shared.js.map +1 -1
  107. package/dist/src/memory/embedding-operations.d.ts.map +1 -1
  108. package/dist/src/memory/embedding-operations.js +9 -4
  109. package/dist/src/memory/embedding-operations.js.map +1 -1
  110. package/dist/src/memory/memory-bridge.d.ts +60 -1
  111. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  112. package/dist/src/memory/memory-bridge.js +185 -42
  113. package/dist/src/memory/memory-bridge.js.map +1 -1
  114. package/dist/src/memory/memory-kg.d.ts +495 -28
  115. package/dist/src/memory/memory-kg.d.ts.map +1 -1
  116. package/dist/src/memory/memory-kg.js +2186 -251
  117. package/dist/src/memory/memory-kg.js.map +1 -1
  118. package/dist/src/memory/query-router.d.ts +51 -0
  119. package/dist/src/memory/query-router.d.ts.map +1 -1
  120. package/dist/src/memory/query-router.js +38 -2
  121. package/dist/src/memory/query-router.js.map +1 -1
  122. package/dist/src/orgrt/agent-exec.d.ts +14 -0
  123. package/dist/src/orgrt/agent-exec.d.ts.map +1 -1
  124. package/dist/src/orgrt/agent-exec.js +88 -4
  125. package/dist/src/orgrt/agent-exec.js.map +1 -1
  126. package/dist/src/orgrt/agent-runner.d.ts +26 -1
  127. package/dist/src/orgrt/agent-runner.d.ts.map +1 -1
  128. package/dist/src/orgrt/agent-runner.js +73 -22
  129. package/dist/src/orgrt/agent-runner.js.map +1 -1
  130. package/dist/src/orgrt/antigravity-runner.d.ts +1 -1
  131. package/dist/src/orgrt/antigravity-runner.d.ts.map +1 -1
  132. package/dist/src/orgrt/antigravity-runner.js +36 -19
  133. package/dist/src/orgrt/antigravity-runner.js.map +1 -1
  134. package/dist/src/orgrt/approvals.d.ts +26 -2
  135. package/dist/src/orgrt/approvals.d.ts.map +1 -1
  136. package/dist/src/orgrt/approvals.js +67 -7
  137. package/dist/src/orgrt/approvals.js.map +1 -1
  138. package/dist/src/orgrt/broker.d.ts +21 -2
  139. package/dist/src/orgrt/broker.d.ts.map +1 -1
  140. package/dist/src/orgrt/broker.js +56 -8
  141. package/dist/src/orgrt/broker.js.map +1 -1
  142. package/dist/src/orgrt/bus.d.ts +8 -0
  143. package/dist/src/orgrt/bus.d.ts.map +1 -1
  144. package/dist/src/orgrt/bus.js +27 -0
  145. package/dist/src/orgrt/bus.js.map +1 -1
  146. package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
  147. package/dist/src/orgrt/checkpoint-ops.js +15 -5
  148. package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
  149. package/dist/src/orgrt/checkpoint.d.ts +42 -4
  150. package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
  151. package/dist/src/orgrt/checkpoint.js +75 -4
  152. package/dist/src/orgrt/checkpoint.js.map +1 -1
  153. package/dist/src/orgrt/codex-runner.d.ts +1 -1
  154. package/dist/src/orgrt/codex-runner.d.ts.map +1 -1
  155. package/dist/src/orgrt/codex-runner.js +50 -23
  156. package/dist/src/orgrt/codex-runner.js.map +1 -1
  157. package/dist/src/orgrt/copilot-runner.d.ts +24 -2
  158. package/dist/src/orgrt/copilot-runner.d.ts.map +1 -1
  159. package/dist/src/orgrt/copilot-runner.js +257 -157
  160. package/dist/src/orgrt/copilot-runner.js.map +1 -1
  161. package/dist/src/orgrt/cross-org.d.ts +10 -3
  162. package/dist/src/orgrt/cross-org.d.ts.map +1 -1
  163. package/dist/src/orgrt/cross-org.js +225 -10
  164. package/dist/src/orgrt/cross-org.js.map +1 -1
  165. package/dist/src/orgrt/crush-runner.d.ts +22 -2
  166. package/dist/src/orgrt/crush-runner.d.ts.map +1 -1
  167. package/dist/src/orgrt/crush-runner.js +227 -120
  168. package/dist/src/orgrt/crush-runner.js.map +1 -1
  169. package/dist/src/orgrt/daemon.d.ts +77 -7
  170. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  171. package/dist/src/orgrt/daemon.js +989 -385
  172. package/dist/src/orgrt/daemon.js.map +1 -1
  173. package/dist/src/orgrt/decisions.d.ts +2 -2
  174. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  175. package/dist/src/orgrt/decisions.js +90 -18
  176. package/dist/src/orgrt/decisions.js.map +1 -1
  177. package/dist/src/orgrt/grok-runner.d.ts +29 -3
  178. package/dist/src/orgrt/grok-runner.d.ts.map +1 -1
  179. package/dist/src/orgrt/grok-runner.js +286 -150
  180. package/dist/src/orgrt/grok-runner.js.map +1 -1
  181. package/dist/src/orgrt/kimicode-runner.d.ts +5 -5
  182. package/dist/src/orgrt/kimicode-runner.d.ts.map +1 -1
  183. package/dist/src/orgrt/kimicode-runner.js +53 -32
  184. package/dist/src/orgrt/kimicode-runner.js.map +1 -1
  185. package/dist/src/orgrt/mailbox.d.ts +15 -0
  186. package/dist/src/orgrt/mailbox.d.ts.map +1 -1
  187. package/dist/src/orgrt/mailbox.js +29 -1
  188. package/dist/src/orgrt/mailbox.js.map +1 -1
  189. package/dist/src/orgrt/migrate.d.ts.map +1 -1
  190. package/dist/src/orgrt/migrate.js +8 -5
  191. package/dist/src/orgrt/migrate.js.map +1 -1
  192. package/dist/src/orgrt/opencode-runner.d.ts +1 -1
  193. package/dist/src/orgrt/opencode-runner.d.ts.map +1 -1
  194. package/dist/src/orgrt/opencode-runner.js +29 -3
  195. package/dist/src/orgrt/opencode-runner.js.map +1 -1
  196. package/dist/src/orgrt/org-memory.d.ts +19 -3
  197. package/dist/src/orgrt/org-memory.d.ts.map +1 -1
  198. package/dist/src/orgrt/org-memory.js +110 -38
  199. package/dist/src/orgrt/org-memory.js.map +1 -1
  200. package/dist/src/orgrt/pi-rpc-runner.d.ts +3 -1
  201. package/dist/src/orgrt/pi-rpc-runner.d.ts.map +1 -1
  202. package/dist/src/orgrt/pi-rpc-runner.js +35 -3
  203. package/dist/src/orgrt/pi-rpc-runner.js.map +1 -1
  204. package/dist/src/orgrt/pi-runner.d.ts +25 -2
  205. package/dist/src/orgrt/pi-runner.d.ts.map +1 -1
  206. package/dist/src/orgrt/pi-runner.js +271 -152
  207. package/dist/src/orgrt/pi-runner.js.map +1 -1
  208. package/dist/src/orgrt/policy.d.ts +1 -0
  209. package/dist/src/orgrt/policy.d.ts.map +1 -1
  210. package/dist/src/orgrt/policy.js +199 -39
  211. package/dist/src/orgrt/policy.js.map +1 -1
  212. package/dist/src/orgrt/provider.d.ts +4 -0
  213. package/dist/src/orgrt/provider.d.ts.map +1 -1
  214. package/dist/src/orgrt/provider.js +16 -0
  215. package/dist/src/orgrt/provider.js.map +1 -1
  216. package/dist/src/orgrt/qwen-rpc-runner.d.ts +3 -1
  217. package/dist/src/orgrt/qwen-rpc-runner.d.ts.map +1 -1
  218. package/dist/src/orgrt/qwen-rpc-runner.js +35 -3
  219. package/dist/src/orgrt/qwen-rpc-runner.js.map +1 -1
  220. package/dist/src/orgrt/qwen-runner.d.ts +30 -3
  221. package/dist/src/orgrt/qwen-runner.d.ts.map +1 -1
  222. package/dist/src/orgrt/qwen-runner.js +282 -142
  223. package/dist/src/orgrt/qwen-runner.js.map +1 -1
  224. package/dist/src/orgrt/role-slot.d.ts +88 -0
  225. package/dist/src/orgrt/role-slot.d.ts.map +1 -0
  226. package/dist/src/orgrt/role-slot.js +133 -0
  227. package/dist/src/orgrt/role-slot.js.map +1 -0
  228. package/dist/src/orgrt/runtime-options.d.ts +17 -0
  229. package/dist/src/orgrt/runtime-options.d.ts.map +1 -0
  230. package/dist/src/orgrt/runtime-options.js +32 -0
  231. package/dist/src/orgrt/runtime-options.js.map +1 -0
  232. package/dist/src/orgrt/scheduler-integration.d.ts +11 -0
  233. package/dist/src/orgrt/scheduler-integration.d.ts.map +1 -1
  234. package/dist/src/orgrt/scheduler-integration.js +75 -17
  235. package/dist/src/orgrt/scheduler-integration.js.map +1 -1
  236. package/dist/src/orgrt/scheduler.d.ts +4 -0
  237. package/dist/src/orgrt/scheduler.d.ts.map +1 -1
  238. package/dist/src/orgrt/scheduler.js +7 -1
  239. package/dist/src/orgrt/scheduler.js.map +1 -1
  240. package/dist/src/orgrt/server.d.ts +8 -3
  241. package/dist/src/orgrt/server.d.ts.map +1 -1
  242. package/dist/src/orgrt/server.js +48 -13
  243. package/dist/src/orgrt/server.js.map +1 -1
  244. package/dist/src/orgrt/session.d.ts +26 -2
  245. package/dist/src/orgrt/session.d.ts.map +1 -1
  246. package/dist/src/orgrt/session.js +99 -5
  247. package/dist/src/orgrt/session.js.map +1 -1
  248. package/dist/src/orgrt/task-dag.d.ts +5 -0
  249. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  250. package/dist/src/orgrt/task-dag.js +41 -0
  251. package/dist/src/orgrt/task-dag.js.map +1 -1
  252. package/dist/src/orgrt/test-loop.js +2 -2
  253. package/dist/src/orgrt/test-loop.js.map +1 -1
  254. package/dist/src/orgrt/types.d.ts +14 -2
  255. package/dist/src/orgrt/types.d.ts.map +1 -1
  256. package/dist/src/orgrt/types.js +15 -1
  257. package/dist/src/orgrt/types.js.map +1 -1
  258. package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
  259. package/dist/src/orgrt/vercel-runner.js +4 -0
  260. package/dist/src/orgrt/vercel-runner.js.map +1 -1
  261. package/dist/src/ui/routes-org.mjs +27 -7
  262. package/dist/src/ui/server.mjs +82 -48
  263. package/dist/tsconfig.tsbuildinfo +1 -1
  264. package/package.json +2 -1
  265. package/dist/src/ui/data/mastermind-sessions.json +0 -1
@@ -172,9 +172,16 @@ user_market_agents=$(jq \
172
172
  | {name: .name, slug: .slug, category: .category,
173
173
  score: (
174
174
  (.name | ascii_downcase) as $n |
175
- # Score on ANY keyword match (mirrors master.md pick_domain_manager scoring)
175
+ (.description // "" | ascii_downcase) as $desc |
176
+ # Score keyword matches against both name (weight 2) and description (weight 1) —
177
+ # name match is a stronger signal (mirrors master.md pick_domain_manager scoring).
178
+ # Bind each word to $w before contains(): piping into contains(.) rebinds "." to the
179
+ # piped value, which would silently match everything.
176
180
  (if ($kw | length) > 0
177
- then ([$kw | split(" ")[] | select(length > 0) | if ($n | contains(.)) then 1 else 0 end] | add // 0)
181
+ then ([$kw | split(" ")[] | select(length > 0) | . as $w |
182
+ (if ($n | contains($w)) then 2 else 0 end) +
183
+ (if ($desc | contains($w)) then 1 else 0 end)
184
+ ] | add // 0)
178
185
  else 0 end)
179
186
  )}
180
187
  ] | sort_by(-.score) | unique_by(.slug) | .[0:$n] | [.[].name]' \
@@ -14,12 +14,16 @@ This file is referenced by `master.md` and domain commands. Never invoke directl
14
14
 
15
15
  Count the words in `$ARGUMENTS` and scan for domain signals.
16
16
 
17
- **Rich prompt** (skip all intake questions → proceed to execution):
18
- - Word count ≥ 20 AND
19
- - Contains at least one domain signal (build, ship, feature, bug, fix, campaign, marketing, SEO, content, review, audit, research, launch, release, sales, outreach, ops, finance, report) AND
20
- - Contains a goal or outcome phrase (e.g. "so that", "by end of", "targeting", "for our", "to improve")
17
+ **Rich prompt** (skip all intake questions → proceed to execution) if EITHER of these holds:
21
18
 
22
- **Vague prompt** (run intake): anything that doesn't meet rich-prompt criteria.
19
+ - **A. Long + domain-signaled:** word count ≥ 20 AND contains at least one domain signal (build, ship, feature, bug, fix, campaign, marketing, SEO, content, review, audit, research, launch, release, sales, outreach, ops, finance, report).
20
+ - **B. Concrete imperative:** contains a clear imperative verb (fix, add, remove, rename, update, refactor, migrate, upgrade, revert, patch, bump) AND names something specific enough that no reasonable person would need clarifying questions — a file/path, a function/class/component name, an error message or stack-trace fragment, a bug symptom with a concrete detail (a number, duration, status code, version), or a named third-party service/library. This counts as rich even under 20 words and without a goal/outcome phrase. Examples:
21
+ - "Fix the login bug where sessions expire after 5 minutes instead of 30"
22
+ - "Rename `getUserData` to `fetchUserProfile` in src/api/users.ts"
23
+ - "Update the Stripe webhook handler to retry on 502s"
24
+ - "Remove the unused `legacyAuth` middleware"
25
+
26
+ **Vague prompt** (run intake): anything that meets neither A nor B.
23
27
 
24
28
  Even with a rich prompt, if `--confirm` flag is present: skip to execution but show the plan before spawning agents and wait for "go".
25
29
 
@@ -30,9 +34,29 @@ Even with a rich prompt, if `--confirm` flag is present: skip to execution but s
30
34
  Ask ONE question at a time. Wait for the answer before asking the next. Stop asking as soon as you have enough to proceed.
31
35
 
32
36
  **Q1 — Goal:**
33
- > "What outcome defines success for this run? Be as specific as you can — what will be done or produced when we're finished?"
37
+ > "What outcome defines success for this run? Be as specific as you can — what will be done or produced when we're finished? (Or just say 'you decide' at any point and I'll infer the rest.)"
34
38
 
35
39
  **Q2 — Scope:**
40
+
41
+ Infer the likely domain(s) from the Q1 answer using this keyword mapping (case-insensitive substring match; a "don't over-engineer" heuristic, not a classifier):
42
+
43
+ | Domain | Keyword signals |
44
+ |---|---|
45
+ | build | build, ship, feature, implement, code, bug, fix, develop |
46
+ | idea | idea, brainstorm, concept, pivot, explore |
47
+ | marketing | marketing, campaign, SEO, ads, brand, positioning |
48
+ | review | review, audit, evaluate, assess, critique |
49
+ | research | research, investigate, analyze, study, benchmark |
50
+ | content | content, blog, copy, article, docs, documentation |
51
+ | release | release, launch, deploy, version, publish |
52
+ | sales | sales, outreach, deal, pipeline, prospect |
53
+ | ops | ops, operations, process, workflow, infra |
54
+ | finance | finance, budget, cost, revenue, pricing |
55
+
56
+ If one or more domains match, ask a single yes/no-shaped confirmation instead of the raw menu:
57
+ > "This looks like <inferred domain(s), comma-joined> work — sound right, or something else?"
58
+
59
+ If the user confirms, use the inferred domain(s) and move on. If the user says "something else" (or nothing matched in the first place), fall back to the raw menu:
36
60
  > "Which business domains should this touch? Options: build, idea, marketing, review, research, content, release, sales, ops, finance — or should I decide based on the goal?"
37
61
 
38
62
  **Q3 — Constraints:**
@@ -42,7 +66,7 @@ Ask ONE question at a time. Wait for the answer before asking the next. Stop ask
42
66
  > "Should I execute automatically once I have a plan, or show you the plan first and wait for your approval before spawning agents?"
43
67
 
44
68
  **Q5 — Project:**
45
- > "Which project is this for? I'll create or find a monotask space with that name. (Or I can infer it from context.)"
69
+ > "Which project is this for? I'll create or find a workspace with that name. (Or I can infer it from context.)"
46
70
 
47
71
  Skip Q4 if `--auto` or `--confirm` flag was provided. Skip Q5 if `--project <name>` flag was provided.
48
72
 
@@ -28,7 +28,7 @@ This skill is invoked by `mastermind:issue-detail` or directly via `/mastermind:
28
28
  ## Issue Status Flow
29
29
 
30
30
  ```
31
- open → in_progress → done
31
+ todo → in_progress → in_review → done
32
32
  ↓
33
33
  blocked → in_progress
34
34
  ↓
@@ -52,7 +52,7 @@ orgFile=".monomind/orgs/${org_name}.json"
52
52
  [ ! -f "$orgFile" ] && { echo "ERROR: Org '${org_name}' not found."; exit 1; }
53
53
 
54
54
  issuesFile=".monomind/orgs/${org_name}-issues.json"
55
- [ ! -f "$issuesFile" ] && { echo "ERROR: No issues file for org '$org_name'. Create tasks via /mastermind:tasks."; exit 1; }
55
+ [ ! -f "$issuesFile" ] && { echo "ERROR: No issues file for org '$org_name'. Create issues via /mastermind:issues --action create."; exit 1; }
56
56
 
57
57
  issueDef=$(jq -r --arg id "$issue_id" '(.issues // [])[] | select(.id == $id or .slug == $id)' "$issuesFile")
58
58
  [ -z "$issueDef" ] && { echo "ERROR: Issue '$issue_id' not found in org '$org_name'."; exit 1; }
@@ -64,6 +64,38 @@ days=${days:-14}
64
64
  cutoff=$(date -u -v-${days}d +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -d "${days} days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || echo "")
65
65
  ```
66
66
 
67
+ Normalize any legacy records written by a pre-2.10 version of these skills. Idempotent — safe to run on every load.
68
+
69
+ ```bash
70
+ python3 - "$issuesFile" <<'PYEOF'
71
+ import json, sys
72
+ path = sys.argv[1]
73
+ data = json.load(open(path))
74
+ RENAME = {
75
+ "assignee_id": "assigneeId", "assigned_to": "assigneeId",
76
+ "created_at": "createdAt", "updated_at": "updatedAt",
77
+ "closed_at": "closedAt", "project_id": "projectId",
78
+ "parent_id": "parentId", "recovery_status": "recoveryStatus",
79
+ "lastActivityAt": "updatedAt",
80
+ }
81
+ changed = False
82
+ for iss in data.get("issues", []):
83
+ for old, new in RENAME.items():
84
+ if old in iss:
85
+ iss.setdefault(new, iss.pop(old))
86
+ iss.pop(old, None)
87
+ changed = True
88
+ if iss.get("status") == "open":
89
+ iss["status"] = "todo"
90
+ changed = True
91
+ if changed:
92
+ tmp = path + ".tmp"
93
+ with open(tmp, "w") as f:
94
+ json.dump(data, f, indent=2)
95
+ import os; os.replace(tmp, path)
96
+ PYEOF
97
+ ```
98
+
67
99
  ---
68
100
 
69
101
  ## Step 2 — Execute Action
@@ -77,16 +109,17 @@ echo "────────────────────────
77
109
  echo "$issueDef" | jq -r '
78
110
  " ID: \(.id)",
79
111
  " Title: \(.title // "(no title)")",
80
- " Status: \(.status // "open")",
112
+ " Status: \(.status // "todo")",
81
113
  " Priority: \(.priority // "medium")",
82
- " Assignee: \(.assignee_id // "(unassigned)")",
83
- " Project: \(.project_id // "(none)")",
84
- " Created: \(.created_at // "-")",
85
- " Updated: \(.updated_at // "-")"
114
+ " Assignee: \(.assigneeId // "(unassigned)")",
115
+ " Agent: \(.assigneeAgentId // "(none)")",
116
+ " Project: \(.projectId // "(none)")",
117
+ " Created: \(.createdAt // "-")",
118
+ " Updated: \(.updatedAt // "-")"
86
119
  '
87
120
 
88
121
  # Sub-issues
89
- subCount=$(jq --arg pid "$resolvedId" '[(.issues // [])[] | select(.parent_id == $pid)] | length' "$issuesFile" 2>/dev/null || echo 0)
122
+ subCount=$(jq --arg pid "$resolvedId" '[(.issues // [])[] | select(.parentId == $pid)] | length' "$issuesFile" 2>/dev/null || echo 0)
90
123
  echo " Sub-issues: $subCount"
91
124
 
92
125
  # Attachments
@@ -94,7 +127,7 @@ attCount=$(echo "$issueDef" | jq -r '(.attachments // []) | length')
94
127
  echo " Attachments: $attCount"
95
128
 
96
129
  # Recovery
97
- recoveryStatus=$(echo "$issueDef" | jq -r '.recovery_status // "none"')
130
+ recoveryStatus=$(echo "$issueDef" | jq -r '.recoveryStatus // "none"')
98
131
  [ "$recoveryStatus" != "none" ] && echo "" && echo " RECOVERY STATUS: $recoveryStatus"
99
132
 
100
133
  # Description
@@ -169,15 +202,15 @@ printf "%-24s %-12s %-10s %s\n" "ID" "STATUS" "PRIORITY" "TITLE"
169
202
  echo "────────────────────────────────────────────────────────"
170
203
 
171
204
  count=0
172
- jq -r --arg pid "$resolvedId" '(.issues // [])[] | select(.parent_id == $pid) |
173
- [.id, (.status // "open"), (.priority // "medium"), (.title // "(no title)")] | @tsv' \
205
+ jq -r --arg pid "$resolvedId" '(.issues // [])[] | select(.parentId == $pid) |
206
+ [.id, (.status // "todo"), (.priority // "medium"), (.title // "(no title)")] | @tsv' \
174
207
  "$issuesFile" 2>/dev/null | while IFS=$'\t' read -r id st pri title; do
175
208
  printf "%-24s %-12s %-10s %s\n" "$id" "$st" "$pri" "$title"
176
209
  count=$((count + 1))
177
210
  done
178
211
 
179
212
  echo ""
180
- echo "To create a sub-issue: /mastermind:tasks --org $org_name --action create --parent-id $issue_id"
213
+ echo "To create a sub-issue: /mastermind:issues --org $org_name --action create --title '<title>' --parent-id $issue_id"
181
214
  ```
182
215
 
183
216
  ### attachments
@@ -221,10 +254,16 @@ exists=$(jq --arg id "$assignee_id" '[(.roles // [])[] | select(.id == $id)] | l
221
254
  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
222
255
  tmp="${issuesFile}.tmp"
223
256
  jq --arg id "$resolvedId" --arg ag "$assignee_id" --arg ts "$ts" \
224
- '.issues = [(.issues // [])[] | if .id == $id then .assignee_id = $ag | .updated_at = $ts else . end]' \
257
+ '.issues = [(.issues // [])[] | if .id == $id then .assigneeId = $ag | .assigneeAgentId = $ag | .assigneeUserId = null | .updatedAt = $ts else . end]' \
225
258
  "$issuesFile" > "$tmp" && mv "$tmp" "$issuesFile"
226
259
 
227
260
  echo "Issue '$issue_id' assigned to '$assignee_id'."
261
+
262
+ activityFile=".monomind/orgs/${org_name}-activity.jsonl"
263
+ currentStatus=$(jq -r --arg id "$resolvedId" '(.issues // [])[] | select(.id == $id) | .status // "todo"' "$issuesFile")
264
+ jq -cn --arg iid "$resolvedId" --arg ts "$ts" --arg st "$currentStatus" --arg ag "$assignee_id" --arg sm "assign $resolvedId" \
265
+ '{issue_id:$iid, ts:$ts, status:$st, tokens:null, agent:$ag, type:"assign", summary:$sm}' \
266
+ >> "$activityFile"
228
267
  ```
229
268
 
230
269
  ### close
@@ -233,9 +272,14 @@ echo "Issue '$issue_id' assigned to '$assignee_id'."
233
272
  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
234
273
  tmp="${issuesFile}.tmp"
235
274
  jq --arg id "$resolvedId" --arg ts "$ts" \
236
- '.issues = [(.issues // [])[] | if .id == $id then .status = "done" | .updated_at = $ts | .closed_at = $ts else . end]' \
275
+ '.issues = [(.issues // [])[] | if .id == $id then .status = "done" | .updatedAt = $ts | .closedAt = $ts else . end]' \
237
276
  "$issuesFile" > "$tmp" && mv "$tmp" "$issuesFile"
238
277
  echo "Issue '$issue_id' → done (closed at $ts)."
278
+
279
+ activityFile=".monomind/orgs/${org_name}-activity.jsonl"
280
+ jq -cn --arg iid "$resolvedId" --arg ts "$ts" --arg st "done" --arg ag "operator" --arg sm "close $resolvedId" \
281
+ '{issue_id:$iid, ts:$ts, status:$st, tokens:null, agent:$ag, type:"close", summary:$sm}' \
282
+ >> "$activityFile"
239
283
  ```
240
284
 
241
285
  ### reopen
@@ -244,9 +288,14 @@ echo "Issue '$issue_id' → done (closed at $ts)."
244
288
  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
245
289
  tmp="${issuesFile}.tmp"
246
290
  jq --arg id "$resolvedId" --arg ts "$ts" \
247
- '.issues = [(.issues // [])[] | if .id == $id then .status = "open" | .updated_at = $ts | .closed_at = null else . end]' \
291
+ '.issues = [(.issues // [])[] | if .id == $id then .status = "todo" | .updatedAt = $ts | .closedAt = null else . end]' \
248
292
  "$issuesFile" > "$tmp" && mv "$tmp" "$issuesFile"
249
293
  echo "Issue '$issue_id' → reopened."
294
+
295
+ activityFile=".monomind/orgs/${org_name}-activity.jsonl"
296
+ jq -cn --arg iid "$resolvedId" --arg ts "$ts" --arg st "todo" --arg ag "operator" --arg sm "reopen $resolvedId" \
297
+ '{issue_id:$iid, ts:$ts, status:$st, tokens:null, agent:$ag, type:"reopen", summary:$sm}' \
298
+ >> "$activityFile"
250
299
  ```
251
300
 
252
301
  ### recover
@@ -263,12 +312,17 @@ newStatus=$([ "$recovery_action" = "accept" ] && echo "in_progress" || echo "can
263
312
  tmp="${issuesFile}.tmp"
264
313
  jq --arg id "$resolvedId" --arg st "$newStatus" --arg ts "$ts" --arg ra "$recovery_action" \
265
314
  '.issues = [(.issues // [])[] | if .id == $id then
266
- .status = $st | .recovery_status = $ra | .updated_at = $ts
315
+ .status = $st | .recoveryStatus = $ra | .updatedAt = $ts
267
316
  else . end]' \
268
317
  "$issuesFile" > "$tmp" && mv "$tmp" "$issuesFile"
269
318
 
270
319
  echo "Recovery action '$recovery_action' applied to '$issue_id'."
271
320
  echo " New status: $newStatus"
321
+
322
+ activityFile=".monomind/orgs/${org_name}-activity.jsonl"
323
+ jq -cn --arg iid "$resolvedId" --arg ts "$ts" --arg st "$newStatus" --arg ag "operator" --arg sm "recover $resolvedId" \
324
+ '{issue_id:$iid, ts:$ts, status:$st, tokens:null, agent:$ag, type:"recover", summary:$sm}' \
325
+ >> "$activityFile"
272
326
  ```
273
327
 
274
328
  ---
@@ -18,13 +18,14 @@ This skill is invoked by `mastermind:issues` or directly via `/mastermind:issues
18
18
  - `action`: list | create | update | close | search
19
19
  - `issue_id`: issue ID (required for update/close)
20
20
  - `query`: search term (for search)
21
- - `status`: open | in_progress | in_review | done | cancelled (filter)
21
+ - `status`: todo | in_progress | blocked | in_review | done | cancelled (filter)
22
22
  - `assignee`: agent ID filter
23
23
  - `workspace`: workspace ID filter
24
24
  - `title`: issue title (for create)
25
25
  - `description`: issue body (for create)
26
26
  - `priority`: low | medium | high | urgent (for create/update)
27
27
  - `limit`: max results (default: 50)
28
+ - `parent_id`: parent issue id, making the new issue a sub-issue (for create)
28
29
  - `caller`: command | master
29
30
 
30
31
  ---
@@ -47,6 +48,45 @@ issuesFile=".monomind/orgs/${org_name}-issues.json"
47
48
  limit="${limit:-50}"
48
49
  ```
49
50
 
51
+ Normalize any legacy records written by a pre-2.10 version of these skills. Idempotent — safe to run on every load.
52
+
53
+ ```bash
54
+ python3 - "$issuesFile" <<'PYEOF'
55
+ import json, sys
56
+ path = sys.argv[1]
57
+ data = json.load(open(path))
58
+ RENAME = {
59
+ "assignee_id": "assigneeId", "assigned_to": "assigneeId",
60
+ "created_at": "createdAt", "updated_at": "updatedAt",
61
+ "closed_at": "closedAt", "project_id": "projectId",
62
+ "parent_id": "parentId", "recovery_status": "recoveryStatus",
63
+ "lastActivityAt": "updatedAt",
64
+ }
65
+ changed = False
66
+ for iss in data.get("issues", []):
67
+ for old, new in RENAME.items():
68
+ if old in iss:
69
+ iss.setdefault(new, iss.pop(old))
70
+ iss.pop(old, None)
71
+ changed = True
72
+ if iss.get("status") == "open":
73
+ iss["status"] = "todo"
74
+ changed = True
75
+ if changed:
76
+ tmp = path + ".tmp"
77
+ with open(tmp, "w") as f:
78
+ json.dump(data, f, indent=2)
79
+ import os; os.replace(tmp, path)
80
+ PYEOF
81
+ ```
82
+
83
+ > **These issues are not auto-consumed by the org runtime.** `OrgDaemon` builds its `TaskDag`
84
+ > fresh in memory on every start and never reads `<org>-issues.json` (verified: zero references
85
+ > in `packages/@monomind/cli/src/orgrt/`). Issues created here are tracked by the
86
+ > `mastermind-issues` / `mastermind-my-issues` / `mastermind-liveness` skills and shown in the
87
+ > dashboard, but running `monomind org run <org>` will not pick them up. Drive execution from
88
+ > this file with `mastermind-execute`, or pass work explicitly via `org run --task`.
89
+
50
90
  ---
51
91
 
52
92
  ## Step 2 — Execute Action
@@ -82,7 +122,7 @@ else:
82
122
  print(" " + "─" * 102)
83
123
  for iss in issues:
84
124
  iid = iss.get("id","?")[:28]
85
- st = iss.get("status","open")[:14]
125
+ st = iss.get("status","todo")[:14]
86
126
  pri = iss.get("priority","medium")[:8]
87
127
  title = (iss.get("title") or "-")[:38]
88
128
  asgn = (iss.get("assigneeTitle") or iss.get("assigneeId") or "—")[:20]
@@ -137,24 +177,42 @@ PYEOF
137
177
  [ -z "$title" ] && { echo "ERROR: --title required."; exit 1; }
138
178
 
139
179
  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
140
- newId="issue-$(python3 -c 'import time; print(int(time.time()*1000))')"
180
+ newId="issue-$(python3 -c 'import time; print(int(time.time()*1000))')-001"
181
+
182
+ python3 - "$issuesFile" "$newId" "$title" "${description:-}" "${priority:-medium}" "${assignee:-}" "${workspace:-}" "${parent_id:-}" "$ts" <<'PYEOF'
183
+ import json, os, sys
184
+ path, iid, title, desc, pri, asgn, ws, parent, ts = sys.argv[1:]
185
+
186
+ VALID_PRIORITY = {"low","medium","high","urgent"}
187
+ if pri not in VALID_PRIORITY:
188
+ print(f"ERROR: priority '{pri}' must be one of {sorted(VALID_PRIORITY)}.")
189
+ sys.exit(1)
141
190
 
142
- python3 - "$issuesFile" "$newId" "$title" "${description:-}" "${priority:-medium}" "${assignee:-}" "${workspace:-}" "$ts" <<'PYEOF'
143
- import json, sys
144
- path, iid, title, desc, pri, asgn, ws, ts = sys.argv[1:]
145
191
  data = json.load(open(path))
192
+ issues = data.setdefault("issues", [])
193
+
194
+ if parent and not any(i.get("id") == parent for i in issues):
195
+ print(f"ERROR: parent issue '{parent}' not found.")
196
+ sys.exit(1)
197
+
146
198
  issue = {
147
199
  "id": iid, "title": title, "description": desc,
148
- "status": "open", "priority": pri,
149
- "assigneeId": asgn or None, "workspaceId": ws or None,
150
- "createdAt": ts, "updatedAt": ts
200
+ "status": "todo", "priority": pri,
201
+ "assigneeId": asgn or None,
202
+ "assigneeAgentId": None, "assigneeUserId": None,
203
+ "parentId": parent or None,
204
+ "projectId": None, "workspaceId": ws or None,
205
+ "blockedByIssueIds": [],
206
+ "createdAt": ts, "updatedAt": ts,
151
207
  }
152
- data.setdefault("issues", []).append(issue)
153
- with open(path, "w") as f:
208
+ issues.append(issue)
209
+ tmp = path + ".tmp"
210
+ with open(tmp, "w") as f:
154
211
  json.dump(data, f, indent=2)
212
+ os.replace(tmp, path)
155
213
  print(f" Created: {iid}")
156
214
  print(f" Title: {title}")
157
- print(f" Status: open | Priority: {pri}")
215
+ print(f" Status: todo | Priority: {pri}" + (f" | Parent: {parent}" if parent else ""))
158
216
  PYEOF
159
217
  ```
160
218
 
@@ -165,8 +223,18 @@ PYEOF
165
223
  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
166
224
 
167
225
  python3 - "$issuesFile" "$issue_id" "${status:-}" "${priority:-}" "${title:-}" "$ts" <<'PYEOF'
168
- import json, sys
226
+ import json, os, sys
169
227
  path, iid, new_st, new_pri, new_title, ts = sys.argv[1:]
228
+
229
+ VALID_STATUS = {"todo","in_progress","blocked","in_review","done","cancelled"}
230
+ VALID_PRIORITY = {"low","medium","high","urgent"}
231
+ if new_st and new_st not in VALID_STATUS:
232
+ print(f"ERROR: status '{new_st}' must be one of {sorted(VALID_STATUS)}.")
233
+ sys.exit(1)
234
+ if new_pri and new_pri not in VALID_PRIORITY:
235
+ print(f"ERROR: priority '{new_pri}' must be one of {sorted(VALID_PRIORITY)}.")
236
+ sys.exit(1)
237
+
170
238
  data = json.load(open(path))
171
239
  issues = data.get("issues", [])
172
240
  found = False
@@ -182,8 +250,10 @@ if not found:
182
250
  print(f"ERROR: Issue '{iid}' not found.")
183
251
  sys.exit(1)
184
252
  data["issues"] = issues
185
- with open(path, "w") as f:
253
+ tmp = path + ".tmp"
254
+ with open(tmp, "w") as f:
186
255
  json.dump(data, f, indent=2)
256
+ os.replace(tmp, path)
187
257
  print(f" Updated: {iid} (updatedAt: {ts})")
188
258
  PYEOF
189
259
  ```
@@ -195,7 +265,7 @@ PYEOF
195
265
  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
196
266
 
197
267
  python3 - "$issuesFile" "$issue_id" "$ts" <<'PYEOF'
198
- import json, sys
268
+ import json, os, sys
199
269
  path, iid, ts = sys.argv[1], sys.argv[2], sys.argv[3]
200
270
  data = json.load(open(path))
201
271
  issues = data.get("issues", [])
@@ -211,14 +281,39 @@ if not found:
211
281
  print(f"ERROR: Issue '{iid}' not found.")
212
282
  sys.exit(1)
213
283
  data["issues"] = issues
214
- with open(path, "w") as f:
284
+ tmp = path + ".tmp"
285
+ with open(tmp, "w") as f:
215
286
  json.dump(data, f, indent=2)
287
+ os.replace(tmp, path)
216
288
  print(f" Closed: {iid} (closedAt: {ts})")
217
289
  PYEOF
218
290
  ```
219
291
 
220
292
  ---
221
293
 
294
+ ## Step 2.5 — Append Activity Record
295
+
296
+ After any `create`, `update`, or `close` action succeeds, append one line to the org's
297
+ activity log. This is the only writer for `<org>-activity.jsonl`; seven skills read it.
298
+
299
+ ```bash
300
+ activityFile=".monomind/orgs/${org_name}-activity.jsonl"
301
+ jq -cn \
302
+ --arg iid "${affected_issue_id}" \
303
+ --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
304
+ --arg st "${resulting_status}" \
305
+ --arg ag "${assignee:-operator}" \
306
+ --arg act "${action}" \
307
+ --arg sm "${action} ${affected_issue_id}" \
308
+ '{issue_id:$iid, ts:$ts, status:$st, tokens:null, agent:$ag, type:$act, summary:$sm}' \
309
+ >> "$activityFile"
310
+ ```
311
+
312
+ `affected_issue_id` is `$newId` for `create` and `$issue_id` for `update`/`close`;
313
+ `resulting_status` is `todo`, the new status, or `done` respectively.
314
+
315
+ ---
316
+
222
317
  ## Step 3 — Return Output
223
318
 
224
319
  ```yaml