@monoes/monomindcli 1.9.14 → 1.9.15
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.
|
@@ -108,6 +108,8 @@ Complexity threshold for manager agent: any of these is true:
|
|
|
108
108
|
- Has external dependencies (APIs, services)
|
|
109
109
|
- Is estimated to take more than one conversation turn
|
|
110
110
|
|
|
111
|
+
**DOMAIN EXCEPTION — `idea`:** The `idea` domain MUST always be handled by the master invoking `Skill("mastermind:idea")` directly — NEVER by spawning a Task agent. Spawned agents do not have Skill tool access, so delegating `idea` to a Task agent silently degrades to raw analysis with no pipeline execution. After `mastermind:idea` returns, treat its output as the `idea` domain's unified output schema and proceed to the next domain.
|
|
112
|
+
|
|
111
113
|
**Per-domain goal extraction:** For each activated domain, extract a one-sentence goal from the prompt describing what that domain must accomplish. Then **run the following Bash block**, substituting `<domain_goals_json>` with a JSON object mapping each domain name to its one-sentence goal (use the full `resolved_prompt` as the value for any domain where no specific goal is extractable):
|
|
112
114
|
|
|
113
115
|
```bash
|
|
@@ -251,8 +253,12 @@ jq --arg domains "$domains_needed" \
|
|
|
251
253
|
|
|
252
254
|
### Step 7 — Spawn Domain Managers
|
|
253
255
|
|
|
256
|
+
**BEFORE THIS STEP:** If `idea` is in `domains_needed`, invoke `Skill("mastermind:idea")` directly now (master context has Skill tool access). Pass the resolved prompt, project path, and mode. Write the result to `.monomind/sessions/<SESSION_ID>/idea.json` and mark the `idea` domain as handled. Do NOT include `idea` in the Task spawning below.
|
|
257
|
+
|
|
254
258
|
**Before spawning**, select the best domain manager agent type from the registry for each active domain. Do not hardcode `coordinator` — pick the agent whose expertise best fits the domain goal.
|
|
255
259
|
|
|
260
|
+
**BASH TOOL REQUIREMENT:** Domain managers must run `monotask` CLI commands. Only use subagent_types that include Bash in their tool list. If the registry returns an agent without Bash (e.g. `Product Manager`, `Backend Architect`), override it with `general-purpose` (which has all tools). Agents without Bash cannot create cards, emit curl events, or write session files — they will silently produce degraded output.
|
|
261
|
+
|
|
256
262
|
**Phase A — Registry selection** (run as one Bash call; must complete before Phase C):
|
|
257
263
|
|
|
258
264
|
```bash
|
|
@@ -15,18 +15,18 @@ This file is a reference loaded by mastermind domain skills and master. It is NE
|
|
|
15
15
|
Execute at the START of every mastermind run (master or standalone domain command). Load in this order:
|
|
16
16
|
|
|
17
17
|
**Step A — Tier 3 core principles (all domains):**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
Try `mcp__monobrain__agentdb_hierarchical-recall` with query `"mastermind principles"`, topK 20.
|
|
19
|
+
If it returns `"AgentDB bridge not available"` or any error, fall back to:
|
|
20
|
+
`mcp__monobrain__memory_search` with query `"mastermind principles"`, namespace `"mastermind:principles"`, limit 20.
|
|
21
21
|
|
|
22
22
|
**Step B — Tier 2 weekly summary for this domain:**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
Try `mcp__monobrain__agentdb_context-synthesize` with query `[current prompt keywords]`, maxEntries 10.
|
|
24
|
+
If it fails, fall back to:
|
|
25
|
+
`mcp__monobrain__memory_search` with query `[current prompt keywords]`, namespace `"mastermind:<domain>:weekly"`, limit 10.
|
|
26
26
|
|
|
27
27
|
**Step C — Relevant graph nodes:**
|
|
28
|
-
Call `
|
|
29
|
-
|
|
28
|
+
Call `mcp__monobrain__graphify_query` with question `[3-5 keywords extracted from current prompt]`, depth 2.
|
|
29
|
+
If the graph is not built yet (error: "No graph found"), skip this tier — continue without graph context.
|
|
30
30
|
|
|
31
31
|
Combine all results into a **BRAIN CONTEXT** block. Insert this block before any planning, decomposition, or agent spawning step. Format:
|
|
32
32
|
|
|
@@ -55,13 +55,20 @@ score = confidence × (1 / (days_since_run + 1)) × log(uses + 1)
|
|
|
55
55
|
- `uses`: 1 (first write)
|
|
56
56
|
|
|
57
57
|
**Step 2 — Append to Tier 1 raw log:**
|
|
58
|
-
|
|
58
|
+
Try `mcp__monobrain__agentdb_hierarchical-store` with:
|
|
59
59
|
- namespace: `mastermind:<domain>:raw`
|
|
60
60
|
- content: [full unified output schema YAML from this run, as a string]
|
|
61
61
|
- metadata: `{ score, project, run_id, date: ISO8601, domain }`
|
|
62
62
|
|
|
63
|
+
If AgentDB is unavailable, fall back to `mcp__monobrain__memory_store`:
|
|
64
|
+
- key: `mastermind:<domain>:run:<run_id>`
|
|
65
|
+
- value: [JSON-encoded unified output schema]
|
|
66
|
+
- namespace: `mastermind:<domain>:raw`
|
|
67
|
+
- tags: `["mastermind", "<domain>", "run"]`
|
|
68
|
+
|
|
63
69
|
**Step 3 — Check weekly compaction trigger:**
|
|
64
|
-
|
|
70
|
+
Try `mcp__monobrain__agentdb_health` on namespace `mastermind:<domain>:raw`.
|
|
71
|
+
If unavailable, call `mcp__monobrain__memory_stats` and check entry count manually.
|
|
65
72
|
If `entry_count >= 20` OR `days_since_last_compaction >= 7`:
|
|
66
73
|
1. Retrieve all Tier 1 entries since last compaction
|
|
67
74
|
2. Produce a per-domain weekly summary (use LLM synthesis: "Summarize the key decisions, patterns, and lessons from these run logs in under 300 words")
|
|
@@ -201,25 +208,25 @@ Every mastermind run MUST emit structured events to the live dashboard via WebFe
|
|
|
201
208
|
}
|
|
202
209
|
```
|
|
203
210
|
|
|
204
|
-
### How to Emit (WebFetch
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
session:
|
|
214
|
-
prompt
|
|
215
|
-
mode
|
|
216
|
-
|
|
217
|
-
ts:
|
|
218
|
-
})
|
|
219
|
-
})
|
|
211
|
+
### How to Emit (curl-first — WebFetch is blocked for localhost in Claude Code runtimes)
|
|
212
|
+
|
|
213
|
+
**Always use curl via Bash.** WebFetch is restricted for `localhost` URLs in Claude Code agent runtimes and will return ECONNREFUSED even when the server is running. Use this pattern:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
curl -s -o /dev/null -X POST "http://localhost:4242/api/mastermind/event" \
|
|
217
|
+
-H "Content-Type: application/json" \
|
|
218
|
+
-d "$(jq -cn \
|
|
219
|
+
--arg sid "$SESSION_ID" \
|
|
220
|
+
--arg type "session:start" \
|
|
221
|
+
--arg prompt "$resolved_prompt" \
|
|
222
|
+
--arg mode "$mode" \
|
|
223
|
+
--arg proj "$(pwd)" \
|
|
224
|
+
'{type:$type,session:$sid,prompt:$prompt,mode:$mode,project:$proj,ts:(now*1000|floor)}')" || true
|
|
220
225
|
```
|
|
221
226
|
|
|
222
|
-
**
|
|
227
|
+
**Always append `|| true`** — event emission is non-blocking and MUST NOT abort the run.
|
|
228
|
+
|
|
229
|
+
**If Bash is unavailable** (e.g. the agent type has no Bash tool): skip dashboard events entirely. They are observability-only and do not affect pipeline correctness. The master context always has Bash and emits session:start, domain:dispatch, and session:complete on behalf of the run.
|
|
223
230
|
|
|
224
231
|
**Session ID:** Generate once at session:start and reuse across all subsequent events for this run. A simple ID format: `mm-<ISO8601-compact>` (e.g. `mm-20260505T142300`).
|
|
225
232
|
|
|
@@ -173,7 +173,7 @@ echo "Selected specialists: $specialist_list"
|
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
**CRITICAL — Variable substitution required before constructing the Task call:**
|
|
176
|
-
The Task agent runs in an isolated context and cannot inherit shell variables. Before writing the Task prompt below, read the literal UUID values from the `=== IDEA BOARD LITERAL VALUES ===` echo block above and embed them as **hard-coded strings** in the prompt. Do NOT write `${BOARD_ID}`, `${COL_NEW}`, etc. in the prompt — the agent will receive those as literal dollar-sign strings and its `monotask card create` calls will fail, causing it to improvise with `monotask board create` and corrupt board names. Replace every `${BOARD_ID}`, `${COL_NEW}`, `${project_name}`, `${brain_context}`, `${prompt}`, `${date}`, and `${specialist_list}` with the actual value before calling Task.
|
|
176
|
+
The Task agent runs in an isolated context and cannot inherit shell variables. Before writing the Task prompt below, read the literal UUID values from the `=== IDEA BOARD LITERAL VALUES ===` echo block above and embed them as **hard-coded strings** in the prompt. Do NOT write `${BOARD_ID}`, `${COL_NEW}`, etc. in the prompt — the agent will receive those as literal dollar-sign strings and its `monotask card create` calls will fail, causing it to improvise with `monotask board create` and corrupt board names. Replace every `${BOARD_ID}`, `${COL_NEW}`, `${project_name}`, `${brain_context}`, `${prompt}`, `${date}`, and `${specialist_list}` with the actual value before calling Task. Leave `$result`, `$CARD_ID`, and other loop-internal variables as-is — they are bash variables the agent itself will set at runtime, not substitution targets.
|
|
177
177
|
|
|
178
178
|
Spawn the Idea Manager with `run_in_background: false` so its output is available for Step 5.
|
|
179
179
|
|
|
@@ -242,8 +242,8 @@ For each unique idea, create one card in the New column (COL_NEW = ${COL_NEW}):
|
|
|
242
242
|
|
|
243
243
|
result=$(monotask card create "${BOARD_ID}" "${COL_NEW}" "<idea title ≤80 chars>" --json)
|
|
244
244
|
CARD_ID=$(echo "$result" | jq -r '.id // empty')
|
|
245
|
-
monotask card
|
|
246
|
-
CATEGORY: <feature | technical-baseline | business-operation>
|
|
245
|
+
monotask card set-description "${BOARD_ID}" "$CARD_ID" "<2-3 sentence description>"
|
|
246
|
+
monotask card comment add "${BOARD_ID}" "$CARD_ID" "CATEGORY: <feature | technical-baseline | business-operation>
|
|
247
247
|
SOURCE: <which specialist angle produced this>"
|
|
248
248
|
monotask card label add "${BOARD_ID}" "$CARD_ID" "mastermind-idea"
|
|
249
249
|
monotask card label add "${BOARD_ID}" "$CARD_ID" "category:<category>"
|
|
@@ -264,20 +264,29 @@ END_IDEAS_OUTPUT`
|
|
|
264
264
|
})
|
|
265
265
|
```
|
|
266
266
|
|
|
267
|
-
Parse the `IDEAS_OUTPUT` JSON block from the agent's response
|
|
267
|
+
Parse the `IDEAS_OUTPUT` JSON block from the agent's response and assign it:
|
|
268
|
+
```bash
|
|
269
|
+
ideas_output_json='<paste the JSON array from IDEAS_OUTPUT here>'
|
|
270
|
+
```
|
|
271
|
+
If zero ideas were returned, report "Idea Manager produced no ideas." and STOP.
|
|
268
272
|
|
|
269
273
|
---
|
|
270
274
|
|
|
271
275
|
### Step 5 — Validation (Product Manager Evaluation)
|
|
272
276
|
|
|
277
|
+
**Build `ideas_list` before constructing the Step 5 Task prompt:**
|
|
278
|
+
```bash
|
|
279
|
+
# Format the full IDEAS_OUTPUT array (from Step 4) as the literal string to embed in the Task prompt.
|
|
280
|
+
# Each line: card_id | title | description | category | source_angle
|
|
281
|
+
ideas_list=$(echo "$ideas_output_json" | jq -r \
|
|
282
|
+
'.[] | "- card_id: \(.card_id)\n title: \(.title)\n description: \(.description)\n category: \(.category)\n source: \(.source_angle)\n"')
|
|
283
|
+
```
|
|
284
|
+
|
|
273
285
|
**CRITICAL — Variable substitution required for Step 5 Task call:**
|
|
274
|
-
|
|
286
|
+
Before constructing the Task prompt below, read the literal UUID values from the `=== IDEA BOARD LITERAL VALUES ===` echo block (Step 3) and embed them as hard-coded strings. Also embed the full `brain_context`, `prompt`, and `ideas_list` (built above) as literal text. Replace every `${BOARD_ID}`, `${COL_EVALUATED}`, `${COL_ICED}`, `${COL_REJECTED}`, `${brain_context}`, `${prompt}`, `${project_name}`, `${date}`, and `${ideas_list}` with its actual value before calling Task — the agent receives unsubstituted `${...}` strings verbatim and silently skips every board update.
|
|
275
287
|
|
|
276
288
|
Spawn a single `Product Manager` agent via the Task tool. The PM agent has Bash tool access and is responsible for both producing verdicts and executing all board updates directly.
|
|
277
289
|
|
|
278
|
-
**CRITICAL — Variable substitution required for Step 5 Task call (same rule as Step 4):**
|
|
279
|
-
Before constructing the Task prompt below, read the literal UUID values from the `=== IDEA BOARD LITERAL VALUES ===` echo block (Step 3) and embed them as hard-coded strings. Also embed the full `brain_context`, `prompt`, and the entire ideas list (with card IDs) as literal text. Do NOT write `${BOARD_ID}`, `${COL_EVALUATED}`, `${brain_context}`, etc. — the agent receives them as literal dollar-sign strings and silently skips every board update.
|
|
280
|
-
|
|
281
290
|
```javascript
|
|
282
291
|
Task({
|
|
283
292
|
subagent_type: "Product Manager",
|
|
@@ -347,7 +356,11 @@ END_VERDICTS_OUTPUT`
|
|
|
347
356
|
})
|
|
348
357
|
```
|
|
349
358
|
|
|
350
|
-
After the PM agent completes, parse the `VERDICTS_OUTPUT` block from the agent's response
|
|
359
|
+
After the PM agent completes, parse the `VERDICTS_OUTPUT` block from the agent's response and assign it:
|
|
360
|
+
```bash
|
|
361
|
+
verdicts_output_json='<paste the JSON array from VERDICTS_OUTPUT here>'
|
|
362
|
+
```
|
|
363
|
+
This variable is used throughout Steps 6a and 6c to build idea lists, registry keywords, and inherit impact/effort scores — it must be set before proceeding. If **all** ideas are iced or rejected, output a summary table and STOP — skip Steps 6–7.
|
|
351
364
|
|
|
352
365
|
---
|
|
353
366
|
|
|
@@ -355,16 +368,29 @@ After the PM agent completes, parse the `VERDICTS_OUTPUT` block from the agent's
|
|
|
355
368
|
|
|
356
369
|
#### 6a. Elaboration (conditional)
|
|
357
370
|
|
|
358
|
-
For any evaluated idea with `skipElaboration: true`, move it directly to `Elaborated
|
|
371
|
+
For any evaluated idea with `skipElaboration: true`, move it directly to `Elaborated`, set a description, and write a rationale comment so future readers understand why no deep elaboration was needed:
|
|
359
372
|
```bash
|
|
373
|
+
monotask card set-description "$BOARD_ID" "$CARD_ID" "Elaboration skipped — PM assessed this as straightforward.\n\nRationale: <rationale from VERDICTS_OUTPUT for this card_id>\n\nImpact: <impact>/10 | Effort: <effort>/10"
|
|
360
374
|
monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ELABORATED" --json
|
|
361
375
|
monotask card comment add "$BOARD_ID" "$CARD_ID" "Elaboration skipped: PM assessed this idea as straightforward with no significant unknowns. Rationale: <rationale from VERDICTS_OUTPUT for this card_id>"
|
|
362
376
|
```
|
|
363
377
|
|
|
364
378
|
For ideas with `skipElaboration: false`, **split by category** before spawning agents:
|
|
365
379
|
|
|
380
|
+
**Build `dev_ideas_list` and `ops_ideas_list` before constructing the Step 6a Task prompts:**
|
|
381
|
+
```bash
|
|
382
|
+
# Filter VERDICTS_OUTPUT (parsed in Step 5) by category and format as literal text.
|
|
383
|
+
dev_ideas_list=$(echo "$verdicts_output_json" | jq -r \
|
|
384
|
+
'.[] | select(.verdict == "evaluated") | select(.category == "feature" or .category == "technical-baseline") |
|
|
385
|
+
"- card_id: \(.card_id)\n title: \(.title)\n category: \(.category)\n rationale: \(.rationale)\n"')
|
|
386
|
+
|
|
387
|
+
ops_ideas_list=$(echo "$verdicts_output_json" | jq -r \
|
|
388
|
+
'.[] | select(.verdict == "evaluated") | select(.category == "business-operation") |
|
|
389
|
+
"- card_id: \(.card_id)\n title: \(.title)\n category: \(.category)\n rationale: \(.rationale)\n"')
|
|
390
|
+
```
|
|
391
|
+
|
|
366
392
|
**CRITICAL — Variable substitution required for Step 6a Task calls:**
|
|
367
|
-
Elaboration agents run in isolated Task contexts. Before constructing each Task prompt, replace every `${brain_context}`, `${dev_ideas_list}`, and `${ops_ideas_list}` with the actual literal text — `brain_context` from the brain load, `dev_ideas_list` and `ops_ideas_list`
|
|
393
|
+
Elaboration agents run in isolated Task contexts. Before constructing each Task prompt, replace every `${brain_context}`, `${dev_ideas_list}`, and `${ops_ideas_list}` with the actual literal text — `brain_context` from the brain load, `dev_ideas_list` and `ops_ideas_list` built above. Do NOT leave any `${...}` placeholders in the prompt — the agent receives them as literal dollar-sign strings and produces empty ELABORATION_OUTPUT blocks.
|
|
368
394
|
|
|
369
395
|
**Dev ideas** (`feature` or `technical-baseline`):
|
|
370
396
|
Spawn two agents in parallel via Task tool:
|
|
@@ -488,22 +514,24 @@ After all agents complete, merge their outputs per idea (same card_id → concat
|
|
|
488
514
|
|
|
489
515
|
```bash
|
|
490
516
|
# Set the card description to the merged elaboration findings (this is the primary content field)
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
### Dev ideas — Edge cases & prior art:
|
|
494
|
-
<researcher findings>
|
|
495
|
-
|
|
496
|
-
### Dev ideas — Codebase constraints:
|
|
497
|
-
<code-explorer findings>"
|
|
498
|
-
|
|
499
|
-
# OR for business-operation ideas:
|
|
500
|
-
monotask card set-description "$BOARD_ID" "$CARD_ID" "## Elaboration Findings
|
|
517
|
+
if [ "$category" = "business-operation" ]; then
|
|
518
|
+
monotask card set-description "$BOARD_ID" "$CARD_ID" "## Elaboration Findings
|
|
501
519
|
|
|
502
520
|
### Industry context & benchmarks:
|
|
503
521
|
<researcher findings>
|
|
504
522
|
|
|
505
523
|
### Feasibility & stakeholder impact:
|
|
506
524
|
<PM findings>"
|
|
525
|
+
else
|
|
526
|
+
# feature or technical-baseline
|
|
527
|
+
monotask card set-description "$BOARD_ID" "$CARD_ID" "## Elaboration Findings
|
|
528
|
+
|
|
529
|
+
### Edge cases & prior art:
|
|
530
|
+
<researcher findings>
|
|
531
|
+
|
|
532
|
+
### Codebase constraints:
|
|
533
|
+
<code-explorer findings>"
|
|
534
|
+
fi
|
|
507
535
|
|
|
508
536
|
# Also add each finding as a comment for traceability
|
|
509
537
|
# Dev ideas:
|
|
@@ -580,8 +608,9 @@ After applying all user instructions, proceed to Step 6c with the remaining idea
|
|
|
580
608
|
REGISTRY=".monomind/registry.json"
|
|
581
609
|
|
|
582
610
|
# Dev decomposition agent — pick the most relevant engineering/architecture specialist
|
|
583
|
-
#
|
|
584
|
-
DEV_IDEA_CONTEXT
|
|
611
|
+
# Build keyword signal from elaborated dev idea titles (from VERDICTS_OUTPUT filtered above)
|
|
612
|
+
DEV_IDEA_CONTEXT=$(echo "$verdicts_output_json" | jq -r \
|
|
613
|
+
'[.[] | select(.verdict=="evaluated") | select(.category=="feature" or .category=="technical-baseline") | .title] | join(" ")')
|
|
585
614
|
dev_decomp_agent=$(jq -r \
|
|
586
615
|
--arg kw "$(echo "$DEV_IDEA_CONTEXT" | tr '[:upper:]' '[:lower:]' | grep -oE '[a-z]{5,}' | sort -u | tr '\n' ' ')" \
|
|
587
616
|
'[ .agents[] | select(.deprecated != true)
|
|
@@ -601,7 +630,8 @@ dev_decomp_agent=$(jq -r \
|
|
|
601
630
|
dev_decomp_agent="${dev_decomp_agent:-Software Architect}"
|
|
602
631
|
|
|
603
632
|
# Ops decomposition agent — pick the most relevant strategy/sales/product specialist
|
|
604
|
-
OPS_IDEA_CONTEXT
|
|
633
|
+
OPS_IDEA_CONTEXT=$(echo "$verdicts_output_json" | jq -r \
|
|
634
|
+
'[.[] | select(.verdict=="evaluated") | select(.category=="business-operation") | .title] | join(" ")')
|
|
605
635
|
ops_decomp_agent=$(jq -r \
|
|
606
636
|
--arg kw "$(echo "$OPS_IDEA_CONTEXT" | tr '[:upper:]' '[:lower:]' | grep -oE '[a-z]{5,}' | sort -u | tr '\n' ' ')" \
|
|
607
637
|
'[ .agents[] | select(.deprecated != true)
|
|
@@ -624,30 +654,49 @@ echo "Dev decomp: $dev_decomp_agent | Ops decomp: $ops_decomp_agent"
|
|
|
624
654
|
```
|
|
625
655
|
|
|
626
656
|
**CRITICAL — Variable substitution required for Step 6c Task calls:**
|
|
627
|
-
|
|
657
|
+
Before constructing each Task prompt, replace `${brain_context}`, `${prompt}`, `${project_name}`, and `${dev_ideas_elaborated}` / `${ops_ideas_elaborated}` with actual literal text. Build those lists from the VERDICTS_OUTPUT and ELABORATION_OUTPUT results:
|
|
628
658
|
|
|
629
|
-
|
|
630
|
-
|
|
659
|
+
```bash
|
|
660
|
+
# Build elaborated idea lists including card comments (full context for decomposition agents)
|
|
661
|
+
dev_ideas_elaborated=$(echo "$verdicts_output_json" | jq -r \
|
|
662
|
+
'[.[] | select(.verdict=="evaluated") | select(.category=="feature" or .category=="technical-baseline") |
|
|
663
|
+
"card_id: \(.card_id)\ntitle: \(.title)\ncategory: \(.category)\nrationale: \(.rationale)\nimpact: \(.impact) effort: \(.effort)"] | join("\n\n")')
|
|
664
|
+
|
|
665
|
+
ops_ideas_elaborated=$(echo "$verdicts_output_json" | jq -r \
|
|
666
|
+
'[.[] | select(.verdict=="evaluated") | select(.category=="business-operation") |
|
|
667
|
+
"card_id: \(.card_id)\ntitle: \(.title)\ncategory: \(.category)\nrationale: \(.rationale)\nimpact: \(.impact) effort: \(.effort)"] | join("\n\n")')
|
|
668
|
+
```
|
|
631
669
|
|
|
632
670
|
**Spawn decomposition agents by track** — run both in parallel if both tracks have elaborated ideas:
|
|
633
671
|
|
|
634
|
-
|
|
635
|
-
|
|
672
|
+
```javascript
|
|
673
|
+
// Dev decomposition agent (only if dev_ideas_elaborated is non-empty)
|
|
674
|
+
Task({
|
|
675
|
+
subagent_type: dev_decomp_agent, // value from registry selection above
|
|
676
|
+
description: "Task decomposition: dev ideas for " + project_name,
|
|
677
|
+
run_in_background: true,
|
|
678
|
+
prompt: `SAFETY CHECK: You are a decomposition agent. You must NOT call monotask board create, space create, or column create. Your only job is producing a TASKS_OUTPUT block — the outer skill creates the cards. If you are unsure of any card ID, list it as "UNKNOWN" rather than inventing a value.
|
|
636
679
|
|
|
637
|
-
|
|
638
|
-
- Their subset of elaborated ideas (titles, descriptions, all card comments, literal card IDs, and category)
|
|
639
|
-
- The literal `brain_context` and `prompt` values
|
|
680
|
+
Decompose the following dev ideas into concrete subtasks (2–6 per idea). Each subtask should be independently implementable.
|
|
640
681
|
|
|
641
|
-
|
|
682
|
+
PROJECT: ${project_name}
|
|
683
|
+
GOAL: ${prompt}
|
|
684
|
+
|
|
685
|
+
BRAIN CONTEXT:
|
|
686
|
+
${brain_context}
|
|
687
|
+
|
|
688
|
+
DEV IDEAS TO DECOMPOSE:
|
|
689
|
+
${dev_ideas_elaborated}
|
|
690
|
+
|
|
691
|
+
For each idea, produce 2–6 subtasks. If an idea's scope is unclear, flag it in FLAGGED instead of decomposing.
|
|
642
692
|
|
|
643
|
-
```
|
|
644
693
|
TASKS_OUTPUT
|
|
645
694
|
[
|
|
646
695
|
{
|
|
647
|
-
"parent_card_id": "<ideation board card ID>",
|
|
696
|
+
"parent_card_id": "<ideation board card ID from the list above>",
|
|
648
697
|
"title": "<subtask title ≤80 chars>",
|
|
649
|
-
"description": "<what to build/do>",
|
|
650
|
-
"category": "feature | technical-baseline
|
|
698
|
+
"description": "<what to build/do — specific and actionable>",
|
|
699
|
+
"category": "feature | technical-baseline",
|
|
651
700
|
"agent": "<recommended subagent_type>",
|
|
652
701
|
"effort": <1-10>,
|
|
653
702
|
"has_prerequisites": <true | false>
|
|
@@ -657,7 +706,47 @@ FLAGGED
|
|
|
657
706
|
[
|
|
658
707
|
{ "card_id": "<ideation card ID>", "question": "<what needs clarifying>" }
|
|
659
708
|
]
|
|
660
|
-
END_TASKS_OUTPUT
|
|
709
|
+
END_TASKS_OUTPUT`
|
|
710
|
+
})
|
|
711
|
+
|
|
712
|
+
// Ops decomposition agent (only if ops_ideas_elaborated is non-empty)
|
|
713
|
+
Task({
|
|
714
|
+
subagent_type: ops_decomp_agent, // value from registry selection above
|
|
715
|
+
description: "Task decomposition: ops ideas for " + project_name,
|
|
716
|
+
run_in_background: true,
|
|
717
|
+
prompt: `SAFETY CHECK: You are a decomposition agent. You must NOT call monotask board create, space create, or column create. Your only job is producing a TASKS_OUTPUT block — the outer skill creates the cards. If you are unsure of any card ID, list it as "UNKNOWN" rather than inventing a value.
|
|
718
|
+
|
|
719
|
+
Decompose the following business-operation ideas into concrete subtasks (2–6 per idea). Each subtask should be independently actionable.
|
|
720
|
+
|
|
721
|
+
PROJECT: ${project_name}
|
|
722
|
+
GOAL: ${prompt}
|
|
723
|
+
|
|
724
|
+
BRAIN CONTEXT:
|
|
725
|
+
${brain_context}
|
|
726
|
+
|
|
727
|
+
OPS IDEAS TO DECOMPOSE:
|
|
728
|
+
${ops_ideas_elaborated}
|
|
729
|
+
|
|
730
|
+
For each idea, produce 2–6 subtasks. If an idea's scope is unclear, flag it in FLAGGED instead of decomposing.
|
|
731
|
+
|
|
732
|
+
TASKS_OUTPUT
|
|
733
|
+
[
|
|
734
|
+
{
|
|
735
|
+
"parent_card_id": "<ideation board card ID from the list above>",
|
|
736
|
+
"title": "<subtask title ≤80 chars>",
|
|
737
|
+
"description": "<what to build/do — specific and actionable>",
|
|
738
|
+
"category": "business-operation",
|
|
739
|
+
"agent": "<recommended subagent_type>",
|
|
740
|
+
"effort": <1-10>,
|
|
741
|
+
"has_prerequisites": <true | false>
|
|
742
|
+
}
|
|
743
|
+
]
|
|
744
|
+
FLAGGED
|
|
745
|
+
[
|
|
746
|
+
{ "card_id": "<ideation card ID>", "question": "<what needs clarifying>" }
|
|
747
|
+
]
|
|
748
|
+
END_TASKS_OUTPUT`
|
|
749
|
+
})
|
|
661
750
|
```
|
|
662
751
|
|
|
663
752
|
**After both decomposition agents return**, the outer skill creates task cards on the appropriate board for each task's category. Each task card inherits the parent idea's `impact` and `effort` scores from the VERDICTS_OUTPUT parsed in Step 5 — look up by `parent_card_id`.
|
|
@@ -680,11 +769,14 @@ monotask column create "$TASK_BOARD_ID" "Human in Loop" --json >/dev/null
|
|
|
680
769
|
monotask column create "$TASK_BOARD_ID" "Done" --json >/dev/null
|
|
681
770
|
```
|
|
682
771
|
|
|
683
|
-
Look up column IDs:
|
|
772
|
+
Look up and validate column IDs:
|
|
684
773
|
```bash
|
|
774
|
+
[ -z "$TASK_BOARD_ID" ] && { echo "ERROR: TASK_BOARD_ID is empty — aborting to prevent card creation on null board"; exit 1; }
|
|
685
775
|
task_columns=$(monotask column list "$TASK_BOARD_ID" --json)
|
|
686
776
|
TASK_COL_TODO=$(echo "$task_columns" | jq -r '.[] | select(.title == "Todo") | .id' | head -1)
|
|
687
777
|
TASK_COL_BACKLOG=$(echo "$task_columns" | jq -r '.[] | select(.title == "Backlog") | .id' | head -1)
|
|
778
|
+
[ -z "$TASK_COL_TODO" ] && { echo "ERROR: Could not find 'Todo' column on TASK_BOARD_ID=$TASK_BOARD_ID"; exit 1; }
|
|
779
|
+
[ -z "$TASK_COL_BACKLOG" ] && { echo "ERROR: Could not find 'Backlog' column on TASK_BOARD_ID=$TASK_BOARD_ID"; exit 1; }
|
|
688
780
|
```
|
|
689
781
|
|
|
690
782
|
---
|
|
@@ -705,11 +797,14 @@ monotask column create "$OPS_BOARD_ID" "Human in Loop" --json >/dev/null
|
|
|
705
797
|
monotask column create "$OPS_BOARD_ID" "Done" --json >/dev/null
|
|
706
798
|
```
|
|
707
799
|
|
|
708
|
-
Look up column IDs:
|
|
800
|
+
Look up and validate column IDs:
|
|
709
801
|
```bash
|
|
802
|
+
[ -z "$OPS_BOARD_ID" ] && { echo "ERROR: OPS_BOARD_ID is empty — aborting to prevent card creation on null board"; exit 1; }
|
|
710
803
|
ops_columns=$(monotask column list "$OPS_BOARD_ID" --json)
|
|
711
804
|
OPS_COL_TODO=$(echo "$ops_columns" | jq -r '.[] | select(.title == "Todo") | .id' | head -1)
|
|
712
805
|
OPS_COL_BACKLOG=$(echo "$ops_columns" | jq -r '.[] | select(.title == "Backlog") | .id' | head -1)
|
|
806
|
+
[ -z "$OPS_COL_TODO" ] && { echo "ERROR: Could not find 'Todo' column on OPS_BOARD_ID=$OPS_BOARD_ID"; exit 1; }
|
|
807
|
+
[ -z "$OPS_COL_BACKLOG" ] && { echo "ERROR: Could not find 'Backlog' column on OPS_BOARD_ID=$OPS_BOARD_ID"; exit 1; }
|
|
713
808
|
```
|
|
714
809
|
|
|
715
810
|
---
|
|
@@ -727,14 +822,17 @@ else
|
|
|
727
822
|
BOARD_LABEL="Implementation Tasks"
|
|
728
823
|
fi
|
|
729
824
|
|
|
825
|
+
# Inherit impact and effort from parent idea — look up from verdicts_output_json by parent_card_id
|
|
826
|
+
parent_impact=$(echo "$verdicts_output_json" | jq -r --arg id "$parent_card_id" '.[] | select(.card_id == $id) | .impact')
|
|
827
|
+
parent_effort=$(echo "$verdicts_output_json" | jq -r --arg id "$parent_card_id" '.[] | select(.card_id == $id) | .effort')
|
|
828
|
+
|
|
730
829
|
# Create task card as a proper subtask of the parent idea card (cross-board link)
|
|
731
830
|
# Signature: subtask add <PARENT_BOARD_ID> <PARENT_CARD_ID> <CHILD_BOARD_ID> <COL_ID> <TITLE>
|
|
732
831
|
TASK_CARD_ID=$(monotask card subtask add "$BOARD_ID" "$parent_card_id" "$TARGET_BOARD" "$COL_TARGET" "<task title>" --json | jq -r '.id')
|
|
733
832
|
# Set the task description as the primary content field
|
|
734
833
|
monotask card set-description "$TARGET_BOARD" "$TASK_CARD_ID" "<what to build/do — from TASKS_OUTPUT description>"
|
|
735
|
-
|
|
736
|
-
monotask card set-
|
|
737
|
-
monotask card set-effort "$TARGET_BOARD" "$TASK_CARD_ID" <parent_effort>
|
|
834
|
+
monotask card set-impact "$TARGET_BOARD" "$TASK_CARD_ID" "$parent_impact"
|
|
835
|
+
monotask card set-effort "$TARGET_BOARD" "$TASK_CARD_ID" "$parent_effort"
|
|
738
836
|
monotask card comment add "$TARGET_BOARD" "$TASK_CARD_ID" \
|
|
739
837
|
"SOURCE: mastermind:idea | <first 100 chars of prompt>
|
|
740
838
|
AGENT: <agent>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoes/monomindcli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|