@monoes/monomindcli 1.9.1 → 1.9.3

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mastermind-idea
3
- description: Mastermind idea domain — product ideation, feature brainstorming, pivot exploration. Spawns an Idea Manager agent who coordinates a mesh of specialist agents for divergent thinking.
3
+ description: Mastermind idea domain — product ideation, feature brainstorming, pivot exploration. Spawns an Idea Manager agent for divergent thinking, then validates, elaborates, and decomposes approved ideas into actionable subtasks on separate dev and ops task boards.
4
4
  type: domain-skill
5
5
  default_mode: confirm
6
6
  ---
@@ -16,9 +16,10 @@ This skill is invoked by `mastermind:master` or directly via `/mastermind:idea`.
16
16
  - `brain_context`: BRAIN CONTEXT block (injected by master, or loaded standalone via _protocol.md brain load)
17
17
  - `prompt`: the ideation goal for this run
18
18
  - `project_name`: monotask space name
19
- - `board_id`: monotask board ID (set by master, or created standalone)
20
19
  - `mode`: auto | confirm
21
20
 
21
+ Note: the `board_id` that mastermind:master may pass is its own orchestration board. The idea domain always creates a dedicated **ideation board** with its own pipeline columns — do not reuse master's board_id.
22
+
22
23
  ---
23
24
 
24
25
  ## Complexity Assessment
@@ -28,14 +29,14 @@ Assess the prompt to determine execution mode:
28
29
  **Simple (direct execution):** Single-answer ideation, one agent:
29
30
  - "Give me 5 name ideas for this feature"
30
31
  - "Suggest one pivot angle for this product"
31
- → Use a single researcher or content-creator agent. Skip manager delegation.
32
+ → Use a single researcher or content-creator agent. Skip Steps 3–6. Go straight to Step 7 (Brain Write).
32
33
 
33
- **Complex (spawn Idea Manager agent):** Any of these:
34
+ **Complex (full pipeline):** Any of these:
34
35
  - Product strategy or pivot exploration (multiple angles needed)
35
36
  - Feature ideation requiring market and user context
36
37
  - Competitive landscape brainstorm
37
38
  - Full product vision document
38
- Spawn Idea Manager agent with full briefing.
39
+ Run Steps 3–6 (Board Setup → Idea Manager Validation Elaboration + Tasks).
39
40
 
40
41
  ---
41
42
 
@@ -45,108 +46,587 @@ If this skill is invoked directly (not by master):
45
46
 
46
47
  1. Load brain context following _protocol.md Brain Load Procedure (namespace: `idea`)
47
48
  2. Run intake from _intake.md if prompt is vague
48
- 3. Create or find monotask space `<project_name>`, create board `ideation`
49
- 4. Proceed with complexity assessment below
50
- 5. At end: follow _protocol.md Brain Write Procedure (namespace: `idea`)
49
+ 3. For complex prompts: run Steps 3–6 below
50
+ 4. At end: follow _protocol.md Brain Write Procedure (namespace: `idea`)
51
+
52
+ ---
53
+
54
+ ## Simple Execution
55
+
56
+ For simple prompts (single agent, single output):
57
+
58
+ 1. Spawn one Task agent with the ideation request as a self-contained briefing
59
+ 2. Collect output
60
+ 3. If called standalone (not from master): follow _protocol.md Brain Write Procedure (namespace: `idea`)
61
+ 4. Return unified output schema with `status: complete`
51
62
 
52
63
  ---
53
64
 
54
- ## Complex Execution — Idea Manager Agent
65
+ ## Complex Execution
55
66
 
56
- Spawn an Idea Manager agent via Task tool:
67
+ ### Step 3 Monotask Board Setup
68
+
69
+ Set up the space and ideation board. The ideation board has a dedicated pipeline with six columns (not master's board).
70
+
71
+ ```bash
72
+ project_name="${project_name:-$(basename "$PWD")}"
73
+ date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
74
+
75
+ # Find or create space
76
+ space_id=$(monotask space list 2>/dev/null | awk -F' \| ' -v n="$project_name" '$2==n{print $1}' | head -1)
77
+ [ -z "$space_id" ] && space_id=$(monotask space create "$project_name" 2>&1 | grep -oE '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
78
+ [ -z "$space_id" ] && { echo "ERROR: Could not find or create space '$project_name'"; exit 1; }
79
+ ```
80
+
81
+ **Memory-first board lookup:** Check memory for `"mastermind-idea board_id"` in namespace `monomind`. If a board ID is returned, use it as `BOARD_ID` and look up the existing column IDs. Otherwise, create the board:
82
+
83
+ ```bash
84
+ BOARD_ID=$(monotask board create "ideation" --json | jq -r '.id // empty')
85
+ [ -z "$BOARD_ID" ] && { echo "ERROR: Failed to create ideation board"; exit 1; }
86
+ monotask space boards add "$space_id" "$BOARD_ID" >/dev/null 2>&1 || true
87
+ npx monomind@latest memory store --key "mastermind-idea board_id" --value "$BOARD_ID" --namespace monomind
88
+
89
+ # Create columns in pipeline order
90
+ COL_NEW=$(monotask column create "$BOARD_ID" "New" --json | jq -r '.id')
91
+ COL_EVALUATED=$(monotask column create "$BOARD_ID" "Evaluated" --json | jq -r '.id')
92
+ COL_ELABORATED=$(monotask column create "$BOARD_ID" "Elaborated" --json | jq -r '.id')
93
+ COL_TASKED=$(monotask column create "$BOARD_ID" "Tasked" --json | jq -r '.id')
94
+ COL_ICED=$(monotask column create "$BOARD_ID" "Iced" --json | jq -r '.id')
95
+ COL_REJECTED=$(monotask column create "$BOARD_ID" "Rejected" --json | jq -r '.id')
96
+ ```
97
+
98
+ If the board already existed, look up column IDs:
99
+
100
+ ```bash
101
+ columns=$(monotask column list "$BOARD_ID" --json)
102
+ COL_NEW=$(echo "$columns" | jq -r '.[] | select(.title == "New") | .id' | head -1)
103
+ COL_EVALUATED=$(echo "$columns" | jq -r '.[] | select(.title == "Evaluated") | .id' | head -1)
104
+ COL_ELABORATED=$(echo "$columns"| jq -r '.[] | select(.title == "Elaborated") | .id' | head -1)
105
+ COL_TASKED=$(echo "$columns" | jq -r '.[] | select(.title == "Tasked") | .id' | head -1)
106
+ COL_ICED=$(echo "$columns" | jq -r '.[] | select(.title == "Iced") | .id' | head -1)
107
+ COL_REJECTED=$(echo "$columns" | jq -r '.[] | select(.title == "Rejected") | .id' | head -1)
108
+ ```
109
+
110
+ ---
111
+
112
+ ### Step 4 — Idea Manager Agent (Divergent Thinking)
113
+
114
+ **Before spawning the Idea Manager**, run the registry-aware specialist selection to determine which agents to use. This replaces hardcoded agent types with the best available specialists for the prompt.
115
+
116
+ ```bash
117
+ REGISTRY=".monomind/registry.json"
118
+ PROMPT="$prompt"
119
+ TOP_N=6
120
+
121
+ # Select user/market/ops angle specialists
122
+ CATEGORIES="marketing strategy product academic specialized"
123
+ user_market_agents=$(jq -r \
124
+ --arg cats "$CATEGORIES" \
125
+ --arg kw "$(echo "$PROMPT" | tr '[:upper:]' '[:lower:]' | grep -oE '[a-z]{5,}' | sort -u | tr '\n' ' ')" \
126
+ --argjson n "$TOP_N" \
127
+ '[ .agents[] | select(.deprecated != true)
128
+ | select(.category as $c | ($cats | split(" ") | any(. == $c)))
129
+ | {name: .name, slug: .slug, category: .category,
130
+ score: (.name | ascii_downcase | if contains($kw | split(" ") | .[0]) then 2 else 0 end)}
131
+ ] | sort_by(-.score) | unique_by(.slug) | .[0:$n] | [.[].name]' \
132
+ "$REGISTRY" 2>/dev/null)
133
+
134
+ # Select technical angle specialists
135
+ CATEGORIES="engineering development architecture"
136
+ tech_agents=$(jq -r \
137
+ --arg cats "$CATEGORIES" \
138
+ --argjson n 3 \
139
+ '[ .agents[] | select(.deprecated != true)
140
+ | select(.category as $c | ($cats | split(" ") | any(. == $c)))
141
+ | {name: .name, slug: .slug}
142
+ ] | unique_by(.slug) | .[0:$n] | [.[].name]' \
143
+ "$REGISTRY" 2>/dev/null)
144
+
145
+ # Merge: take top 6 from market/ops + top 2 from tech (cap at 8 total)
146
+ specialist_list=$(echo "$user_market_agents $tech_agents" | jq -Rs \
147
+ 'split("\n") | map(select(length>0)) | unique | .[0:8]' 2>/dev/null)
148
+
149
+ # Fallback if registry missing
150
+ [ -z "$specialist_list" ] && specialist_list='["researcher","Trend Researcher","Growth Hacker","UX Researcher","Content Creator","Account Strategist"]'
151
+
152
+ echo "Selected specialists: $specialist_list"
153
+ ```
154
+
155
+ Substitute all template variables (`BOARD_ID`, `COL_NEW`, `project_name`, `brain_context`, `prompt`, `date`, `specialist_list`) with their actual values before calling Task.
156
+
157
+ Spawn the Idea Manager with `run_in_background: false` so its output is available for Step 5.
57
158
 
58
159
  ```javascript
59
160
  Task({
60
161
  subagent_type: "coordinator",
61
- description: `You are the Idea Manager for project <project_name>.
162
+ description: "Idea Manager for project " + project_name,
163
+ run_in_background: false,
164
+ prompt: `You are the Idea Manager for project "${project_name}".
62
165
 
63
- CONTEXT: <date> | Project: <project_name> | Spawned by: mastermind:idea
166
+ CONTEXT: ${date} | Project: ${project_name} | Spawned by: mastermind:idea
64
167
 
65
168
  BRAIN CONTEXT:
66
- <brain_context>
169
+ ${brain_context}
67
170
 
68
- YOUR BOARD: <board_id>
69
- YOUR GOAL: <prompt>
171
+ YOUR BOARD: ${BOARD_ID}
172
+ COL_NEW: ${COL_NEW}
173
+ YOUR GOAL: ${prompt}
70
174
 
71
175
  STEP 1 — PLAN
72
- Decompose the ideation goal into distinct angles of exploration. For each angle, identify:
73
- - What perspective or lens to apply (market, user, technical, competitive)
176
+ Decompose the ideation goal into distinct exploration angles. For each angle, identify:
177
+ - Perspective (market, user, technical, competitive, business operations)
74
178
  - Which specialist to assign
75
- - What output format is needed (list, document, diagram, recommendation)
76
- - Dependencies between angles
179
+ - Expected output format
180
+
181
+ STEP 2 — SPAWN SPECIALISTS
182
+ Spawn one Task agent per angle (all in parallel, mesh topology). Each agent receives the
183
+ angle description, brain context, and project context, and must return a JSON array of ideas.
184
+
185
+ The following specialist agents have been pre-selected from the registry as best-fit for this prompt.
186
+ Spawn ALL of them in one message, assigning each a distinct angle:
187
+
188
+ SPECIALISTS: ${specialist_list}
189
+
190
+ Assign each specialist the angle that best matches their domain expertise.
191
+ For any specialist you don't recognize, assign them the closest research or analysis angle.
192
+ Always ensure at minimum these angles are covered even if the same agent covers multiple:
193
+ - Market / competitive landscape
194
+ - User / UX perspective
195
+ - Growth / acquisition
196
+ - Business operations / process
197
+ - Technical feasibility (at least one engineering-category agent)
198
+
199
+ Each specialist must classify every idea with one of these categories:
200
+ feature — new product capability for end users
201
+ technical-baseline — infrastructure, tooling, or technical debt (not user-visible)
202
+ business-operation — internal process, workflow, marketing, sales, ops, or org change
203
+
204
+ Each specialist returns ideas in this format:
205
+ [
206
+ {
207
+ "title": "...",
208
+ "description": "...",
209
+ "category": "feature | technical-baseline | business-operation"
210
+ }
211
+ ]
212
+
213
+ STEP 3 — DEDUPLICATE
214
+ Collect all ideas from all specialists. Drop any idea whose title is more than 80% similar
215
+ to an already-kept idea (fuzzy match). Keep the richer description when deduplicating.
216
+
217
+ STEP 4 — CREATE CARDS AND RETURN
218
+ For each unique idea, create one card in the New column (COL_NEW = ${COL_NEW}):
219
+
220
+ result=$(monotask card create "${BOARD_ID}" "${COL_NEW}" "<idea title ≤80 chars>" --json)
221
+ CARD_ID=$(echo "$result" | jq -r '.id // empty')
222
+ monotask card comment add "${BOARD_ID}" "$CARD_ID" "DESCRIPTION: <2-3 sentence description>
223
+ CATEGORY: <feature | technical-baseline | business-operation>
224
+ SOURCE: <which specialist angle produced this>"
225
+ monotask card label add "${BOARD_ID}" "$CARD_ID" "mastermind-idea"
226
+ monotask card label add "${BOARD_ID}" "$CARD_ID" "category:<category>"
227
+
228
+ Then output a JSON block labelled IDEAS_OUTPUT with one entry per unique idea:
229
+
230
+ IDEAS_OUTPUT
231
+ [
232
+ {
233
+ "card_id": "<monotask card ID just created>",
234
+ "title": "<idea title>",
235
+ "description": "<2-3 sentence description>",
236
+ "category": "feature | technical-baseline | business-operation",
237
+ "source_angle": "<which specialist produced this>"
238
+ }
239
+ ]
240
+ END_IDEAS_OUTPUT`
241
+ })
242
+ ```
243
+
244
+ Parse the `IDEAS_OUTPUT` JSON block from the agent's response. If zero ideas were returned, report "Idea Manager produced no ideas." and STOP.
245
+
246
+ ---
247
+
248
+ ### Step 5 — Validation (Product Manager Evaluation)
249
+
250
+ 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.
251
+
252
+ Provide the PM agent with:
253
+ - All ideas from Step 4 (titles, descriptions, categories, card IDs, BOARD_ID, and all COL_* variables)
254
+ - The `brain_context`
255
+ - The original `prompt`
256
+
257
+ The PM agent must, for **each idea**, determine one verdict plus **impact** (0–10) and **effort** (0–10) scores:
258
+
259
+ | Verdict | Criteria |
260
+ |---------|----------|
261
+ | **evaluated** | Worth pursuing. Set a `skipElaboration` boolean (`true` = straightforward, no deep research needed; `false` = edge cases should be explored). Include a 1-2 sentence value statement. |
262
+ | **iced** | Good potential but needs a question answered first. Include the blocking question. |
263
+ | **rejected** | Out of scope, infeasible, or low value. Include a 1-sentence reason. |
264
+
265
+ The PM agent must run these board updates directly using Bash tool:
77
266
 
78
- STEP 2 — CREATE TASKS
79
- For each angle, create a monotask card on the project board.
80
- First look up column IDs and assign shell variables:
81
267
  ```bash
82
- columns=$(monotask column list "$BOARD_ID" --json)
83
- COL_TODO_ID=$(echo "$columns" | jq -r '.[] | select(.name == "Todo" or .name == "Backlog") | .id' | head -1)
84
- COL_DONE_ID=$(echo "$columns" | jq -r '.[] | select(.name == "Done") | .id' | head -1)
268
+ # evaluated
269
+ monotask card move "$BOARD_ID" "$CARD_ID" "$COL_EVALUATED" --json
270
+ monotask card set-impact "$BOARD_ID" "$CARD_ID" <0-10>
271
+ monotask card set-effort "$BOARD_ID" "$CARD_ID" <0-10>
272
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Value: <value statement>"
273
+
274
+ # iced
275
+ monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ICED" --json
276
+ monotask card set-impact "$BOARD_ID" "$CARD_ID" <0-10>
277
+ monotask card set-effort "$BOARD_ID" "$CARD_ID" <0-10>
278
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Blocked: <question>"
279
+
280
+ # rejected
281
+ monotask card move "$BOARD_ID" "$CARD_ID" "$COL_REJECTED" --json
282
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Rejected: <reason>"
283
+ ```
284
+
285
+ The PM agent must also output a structured block so the outer skill can proceed:
286
+
287
+ ```
288
+ VERDICTS_OUTPUT
289
+ [
290
+ {
291
+ "card_id": "<card ID>",
292
+ "title": "<idea title>",
293
+ "category": "feature | technical-baseline | business-operation",
294
+ "verdict": "evaluated | iced | rejected",
295
+ "skipElaboration": true | false,
296
+ "impact": <0-10>,
297
+ "effort": <0-10>
298
+ }
299
+ ]
300
+ END_VERDICTS_OUTPUT
301
+ ```
302
+
303
+ After the PM agent completes, parse `VERDICTS_OUTPUT`. If **all** ideas are iced or rejected, output a summary table and STOP — skip Steps 6–7.
304
+
305
+ ---
306
+
307
+ ### Step 6 — Elaboration + Task Decomposition
308
+
309
+ #### 6a. Elaboration (conditional)
310
+
311
+ For any evaluated idea with `skipElaboration: true`, move it directly to `Elaborated`:
312
+ ```bash
313
+ monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ELABORATED" --json
314
+ ```
315
+
316
+ For ideas with `skipElaboration: false`, **split by category** before spawning agents:
317
+
318
+ **Dev ideas** (`feature` or `technical-baseline`):
319
+ Spawn two agents in parallel:
320
+ 1. `feature-dev:code-explorer` — traces execution paths, maps dependencies, surfaces codebase constraints relevant to each idea.
321
+ 2. `researcher` (with WebSearch) — finds prior art, edge cases, implementation pitfalls for each idea.
322
+
323
+ **Business-operation ideas** (`business-operation`):
324
+ Spawn two agents in parallel:
325
+ 1. `researcher` (with WebSearch) — finds industry benchmarks, comparable operational processes, known pitfalls, and market context.
326
+ 2. `Product Manager` — assesses process feasibility, stakeholder impact, alignment with existing workflows, and resource requirements.
327
+
328
+ Provide all agents with: their subset of ideas (titles, descriptions, card IDs) + `brain_context`.
329
+
330
+ Each agent must output their findings in this format:
331
+ ```
332
+ ELABORATION_OUTPUT
333
+ [
334
+ {
335
+ "card_id": "<idea card ID>",
336
+ "findings": "<detailed findings for this idea>",
337
+ "blocking_issue": "<blocking issue if any, or null>"
338
+ }
339
+ ]
340
+ END_ELABORATION_OUTPUT
341
+ ```
342
+
343
+ After all agents complete, merge their outputs per idea (same card_id → concatenate findings). For each idea:
344
+
345
+ ```bash
346
+ # Write merged findings as card comments
347
+ # Dev ideas:
348
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Edge cases & prior art: <researcher findings>"
349
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Codebase constraints: <code-explorer findings>"
350
+
351
+ # Business-operation ideas:
352
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Industry context & benchmarks: <researcher findings>"
353
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Feasibility & stakeholder impact: <PM findings>"
354
+
355
+ # If neither agent found a blocking issue:
356
+ monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ELABORATED" --json
357
+
358
+ # If either agent found a blocking issue (mutually exclusive with the above):
359
+ monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ICED" --json
360
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Blocked during elaboration: <issue>"
85
361
  ```
86
- Then create the card:
362
+
363
+ #### 6b. User Confirmation Gate
364
+
365
+ Before generating any tasks, present a review table of all elaborated ideas to the user.
366
+
367
+ Print this exact format:
368
+
369
+ ```
370
+ ╔══════════════════════════════════════════════════════════════════════╗
371
+ ║ IDEA REVIEW — Please confirm before task generation ║
372
+ ╚══════════════════════════════════════════════════════════════════════╝
373
+
374
+ # | Title | Category | Impact | Effort | Track
375
+ ---|--------------------------------|-------------------|--------|--------|-------
376
+ 1 | <title> | <category> | <N>/10 | <N>/10 | dev / ops
377
+ 2 | <title> | <category> | <N>/10 | <N>/10 | dev / ops
378
+ ...
379
+
380
+ To proceed: reply with one of:
381
+ • "go" — generate tasks for all ideas above
382
+ • "remove 2,4" — drop ideas by number, generate tasks for the rest
383
+ • "remove 3 | add detail to 1: <your notes>" — remove some, annotate others
384
+ • "add detail to 2: <your notes>" — annotate an idea before decomposing
385
+ • "stop" — cancel task generation
386
+
387
+ Waiting for your confirmation.
388
+ ```
389
+
390
+ Wait for the user's response before continuing. Do not spawn any agents until a reply is received.
391
+
392
+ **Process the user's reply:**
393
+
394
+ - **"go"**: proceed with all elaborated ideas.
395
+ - **"remove N[,N...]"**: remove those ideas from the elaboration list. Move their ideation cards to `Iced`:
396
+ ```bash
397
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "Removed by user before task generation"
398
+ monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ICED" --json
399
+ ```
400
+ - **"add detail to N: <notes>"**: append the notes as a card comment before decomposing:
401
+ ```bash
402
+ monotask card comment add "$BOARD_ID" "$CARD_ID" "User notes: <notes>"
403
+ ```
404
+ - **"stop"**: skip Step 6c and Step 7. Print a summary of ideas in Elaborated/Iced/Rejected and return `status: partial`.
405
+ - Combined instructions ("remove 2,4 | add detail to 1: ...") are processed together.
406
+
407
+ After applying all user instructions, proceed to Step 6c with the remaining ideas.
408
+
409
+ ---
410
+
411
+ #### 6c. Task Decomposition
412
+
413
+ **Select decomposition agents from the registry** before spawning. Run this selection once per track:
414
+
415
+ ```bash
416
+ REGISTRY=".monomind/registry.json"
417
+
418
+ # Dev decomposition agent — pick the most relevant engineering/architecture specialist
419
+ # Use the idea titles and descriptions as the keyword signal
420
+ DEV_IDEA_CONTEXT="<concatenated titles+descriptions of all dev ideas>"
421
+ dev_decomp_agent=$(jq -r \
422
+ --arg kw "$(echo "$DEV_IDEA_CONTEXT" | tr '[:upper:]' '[:lower:]' | grep -oE '[a-z]{5,}' | sort -u | tr '\n' ' ')" \
423
+ '[ .agents[] | select(.deprecated != true)
424
+ | select(.category == "engineering" or .category == "architecture")
425
+ | {name: .name,
426
+ score: (.name | ascii_downcase |
427
+ if contains("architect") then 3
428
+ elif contains("backend") then 2
429
+ elif contains("mobile") then 2
430
+ elif contains("frontend") then 2
431
+ elif contains("security") then 2
432
+ elif contains("data") then 2
433
+ else 1 end
434
+ )}
435
+ ] | sort_by(-.score) | .[0].name // "Software Architect"' \
436
+ "$REGISTRY" 2>/dev/null)
437
+ dev_decomp_agent="${dev_decomp_agent:-Software Architect}"
438
+
439
+ # Ops decomposition agent — pick the most relevant strategy/sales/product specialist
440
+ OPS_IDEA_CONTEXT="<concatenated titles+descriptions of all ops ideas>"
441
+ ops_decomp_agent=$(jq -r \
442
+ --arg kw "$(echo "$OPS_IDEA_CONTEXT" | tr '[:upper:]' '[:lower:]' | grep -oE '[a-z]{5,}' | sort -u | tr '\n' ' ')" \
443
+ '[ .agents[] | select(.deprecated != true)
444
+ | select(.category == "strategy" or .category == "sales" or .category == "product" or .category == "marketing")
445
+ | {name: .name,
446
+ score: (.name | ascii_downcase |
447
+ if contains("product manager") then 4
448
+ elif contains("launch") then 3
449
+ elif contains("outbound") then 3
450
+ elif contains("deal") then 3
451
+ elif contains("pricing") then 3
452
+ elif contains("growth") then 2
453
+ else 1 end
454
+ )}
455
+ ] | sort_by(-.score) | .[0].name // "Product Manager"' \
456
+ "$REGISTRY" 2>/dev/null)
457
+ ops_decomp_agent="${ops_decomp_agent:-Product Manager}"
458
+
459
+ echo "Dev decomp: $dev_decomp_agent | Ops decomp: $ops_decomp_agent"
460
+ ```
461
+
462
+ **Spawn decomposition agents by track** — run both in parallel if both tracks have elaborated ideas:
463
+
464
+ - For **dev ideas** (`feature` or `technical-baseline`): spawn the agent selected as `$dev_decomp_agent`.
465
+ - For **business-operation ideas**: spawn the agent selected as `$ops_decomp_agent`.
466
+
467
+ Provide each agent with:
468
+ - Their subset of elaborated ideas (titles, descriptions, all card comments, card IDs, and category)
469
+ - The `brain_context`
470
+ - The original `prompt`
471
+
472
+ Each agent must output a `TASKS_OUTPUT` block. For each elaborated idea, produce 2–6 subtasks. If an idea's scope is unclear, flag it instead of decomposing.
473
+
474
+ ```
475
+ TASKS_OUTPUT
476
+ [
477
+ {
478
+ "parent_card_id": "<ideation board card ID>",
479
+ "title": "<subtask title ≤80 chars>",
480
+ "description": "<what to build/do>",
481
+ "category": "feature | technical-baseline | business-operation",
482
+ "agent": "<recommended subagent_type>",
483
+ "effort": <1-10>,
484
+ "has_prerequisites": <true | false>
485
+ }
486
+ ]
487
+ FLAGGED
488
+ [
489
+ { "card_id": "<ideation card ID>", "question": "<what needs clarifying>" }
490
+ ]
491
+ END_TASKS_OUTPUT
492
+ ```
493
+
494
+ **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`.
495
+
496
+ ---
497
+
498
+ **Dev task board** (`feature` / `technical-baseline` → `monomind-task`):
499
+
500
+ Check memory for `"monomind-task board_id"` in namespace `monomind`. If found, use it as `TASK_BOARD_ID`. Otherwise create it:
501
+
502
+ ```bash
503
+ TASK_BOARD_ID=$(monotask board create "monomind-task" --json | jq -r '.id // empty')
504
+ monotask space boards add "$space_id" "$TASK_BOARD_ID" >/dev/null 2>&1 || true
505
+ npx monomind@latest memory store --key "monomind-task board_id" --value "$TASK_BOARD_ID" --namespace monomind
506
+ monotask column create "$TASK_BOARD_ID" "Backlog" --json >/dev/null
507
+ monotask column create "$TASK_BOARD_ID" "Todo" --json >/dev/null
508
+ monotask column create "$TASK_BOARD_ID" "In Progress" --json >/dev/null
509
+ monotask column create "$TASK_BOARD_ID" "Review" --json >/dev/null
510
+ monotask column create "$TASK_BOARD_ID" "Human in Loop" --json >/dev/null
511
+ monotask column create "$TASK_BOARD_ID" "Done" --json >/dev/null
512
+ ```
513
+
514
+ Look up column IDs:
515
+ ```bash
516
+ task_columns=$(monotask column list "$TASK_BOARD_ID" --json)
517
+ TASK_COL_TODO=$(echo "$task_columns" | jq -r '.[] | select(.title == "Todo") | .id' | head -1)
518
+ TASK_COL_BACKLOG=$(echo "$task_columns" | jq -r '.[] | select(.title == "Backlog") | .id' | head -1)
519
+ ```
520
+
521
+ ---
522
+
523
+ **Ops task board** (`business-operation` → `monomind-ops-task`):
524
+
525
+ Check memory for `"monomind-ops-task board_id"` in namespace `monomind`. If found, use it as `OPS_BOARD_ID`. Otherwise create it:
526
+
527
+ ```bash
528
+ OPS_BOARD_ID=$(monotask board create "monomind-ops-task" --json | jq -r '.id // empty')
529
+ monotask space boards add "$space_id" "$OPS_BOARD_ID" >/dev/null 2>&1 || true
530
+ npx monomind@latest memory store --key "monomind-ops-task board_id" --value "$OPS_BOARD_ID" --namespace monomind
531
+ monotask column create "$OPS_BOARD_ID" "Backlog" --json >/dev/null
532
+ monotask column create "$OPS_BOARD_ID" "Todo" --json >/dev/null
533
+ monotask column create "$OPS_BOARD_ID" "In Progress" --json >/dev/null
534
+ monotask column create "$OPS_BOARD_ID" "Review" --json >/dev/null
535
+ monotask column create "$OPS_BOARD_ID" "Human in Loop" --json >/dev/null
536
+ monotask column create "$OPS_BOARD_ID" "Done" --json >/dev/null
537
+ ```
538
+
539
+ Look up column IDs:
540
+ ```bash
541
+ ops_columns=$(monotask column list "$OPS_BOARD_ID" --json)
542
+ OPS_COL_TODO=$(echo "$ops_columns" | jq -r '.[] | select(.title == "Todo") | .id' | head -1)
543
+ OPS_COL_BACKLOG=$(echo "$ops_columns" | jq -r '.[] | select(.title == "Backlog") | .id' | head -1)
544
+ ```
545
+
546
+ ---
547
+
548
+ **Create task cards** — for each task in the merged TASKS_OUTPUT:
549
+
87
550
  ```bash
88
- result=$(monotask card create "$BOARD_ID" "$COL_TODO_ID" "<short summary of ideation angle, ≤80 chars>" --json)
89
- CARD_ID=$(echo "$result" | jq -r '.id // empty')
90
- monotask card set-description "$BOARD_ID" "$CARD_ID" "[specific ideation angle and output]"
91
- monotask card comment add "$BOARD_ID" "$CARD_ID" "CONTEXT: <date> | Project: <project_name> | Created by: Idea Manager
92
- BRAIN MEMORY: [paste most relevant 3-5 brain context excerpts]
93
- SCOPE: [domain of exploration — market, users, technology, competitors]
94
- CONSTRAINTS: [existing product constraints, brand voice, strategic limits]
95
- SUCCESS CRITERIA:
96
- - [ ] [checkable item]
97
- AGENT: [researcher | Trend Researcher | Product Manager | Growth Hacker | Content Creator]
98
- SWARM: mesh 6 gossip
99
- DEPENDENCIES: [task IDs or \"none\"]
100
- OUTPUT FORMAT: unified output schema"
101
- ```
102
-
103
- STEP 3 EXECUTE
104
- Spawn one Task agent per angle (all in parallel — mesh topology means all perspectives feed each other):
105
- - Market research angle: subagent_type "researcher"
106
- - Trend analysis: subagent_type "Trend Researcher"
107
- - User perspective: subagent_type "UX Researcher"
108
- - Growth angle: subagent_type "Growth Hacker"
109
- - Content/narrative angle: subagent_type "Content Creator"
110
-
111
- Also run /monomind:do --board <board_id> to track execution.
112
-
113
- STEP 4 COLLECT AND RETURN
114
- Synthesize all agent perspectives into a coherent ideation report. Return to caller:
551
+ if [ "$category" = "business-operation" ]; then
552
+ TARGET_BOARD="$OPS_BOARD_ID"
553
+ COL_TARGET=$([ "$has_prerequisites" = "true" ] && echo "$OPS_COL_BACKLOG" || echo "$OPS_COL_TODO")
554
+ BOARD_LABEL="monomind-ops-task"
555
+ else
556
+ TARGET_BOARD="$TASK_BOARD_ID"
557
+ COL_TARGET=$([ "$has_prerequisites" = "true" ] && echo "$TASK_COL_BACKLOG" || echo "$TASK_COL_TODO")
558
+ BOARD_LABEL="monomind-task"
559
+ fi
560
+
561
+ TASK_CARD_ID=$(monotask card create "$TARGET_BOARD" "$COL_TARGET" "<task title>" --json | jq -r '.id')
562
+ # Inherit impact and effort from parent idea (looked up from VERDICTS_OUTPUT by parent_card_id)
563
+ monotask card set-impact "$TARGET_BOARD" "$TASK_CARD_ID" <parent_impact>
564
+ monotask card set-effort "$TARGET_BOARD" "$TASK_CARD_ID" <parent_effort>
565
+ monotask card comment add "$TARGET_BOARD" "$TASK_CARD_ID" \
566
+ "SOURCE: mastermind:idea | <first 100 chars of prompt>
567
+ AGENT: <agent>
568
+ TASK EFFORT: <task_effort>/10
569
+ PARENT IDEA IMPACT: <parent_impact>/10 PARENT IDEA EFFORT: <parent_effort>/10
570
+ CATEGORY: <category>
571
+ PARENT IDEA: <idea title> (card: <parent_card_id> on ideation board)"
572
+ monotask card label add "$TARGET_BOARD" "$TASK_CARD_ID" "mastermind:idea"
573
+ monotask card label add "$TARGET_BOARD" "$TASK_CARD_ID" "category:<category>"
574
+ ```
575
+
576
+ Group tasks by `parent_card_id`. For each parent idea, annotate and move to `Tasked`:
577
+ ```bash
578
+ monotask card comment add "$BOARD_ID" "$parent_card_id" \
579
+ "Subtasks created on <board_label>: <list of titles with agent and effort>"
580
+ monotask card move "$BOARD_ID" "$parent_card_id" "$COL_TASKED" --json
581
+ ```
115
582
 
583
+ For each entry in FLAGGED, move the idea to `Iced`:
584
+ ```bash
585
+ monotask card comment add "$BOARD_ID" "$flagged_card_id" "Needs clarification: <question>"
586
+ monotask card move "$BOARD_ID" "$flagged_card_id" "$COL_ICED" --json
587
+ ```
588
+
589
+ ---
590
+
591
+ ### Step 7 — Brain Write + Return
592
+
593
+ Follow _protocol.md Brain Write Procedure (namespace: `idea`).
594
+
595
+ Return unified output schema to caller:
596
+
597
+ ```yaml
116
598
  domain: idea
117
599
  status: complete | partial | blocked
118
- artifacts:
119
- - path: [ideation document if written to disk]
120
- type: report
600
+ artifacts: []
121
601
  decisions:
122
- - what: [top idea or direction recommended]
123
- why: [reasoning from synthesized perspectives]
124
- confidence: [0.0-1.0]
602
+ - what: <top idea or direction>
603
+ why: <reasoning from validation + elaboration>
604
+ confidence: <0.0-1.0>
125
605
  outcome: pending
126
606
  lessons:
127
- - what_worked: [which angles produced the best insights]
128
- - what_didnt: [which angles were less useful]
607
+ - what_worked: <which angles produced the best insights>
608
+ - what_didnt: <which angles were less useful>
129
609
  next_actions:
130
- - [e.g. "run mastermind:research to validate top idea"]
131
- - [e.g. "run mastermind:build to prototype chosen direction"]
132
- board_url: monotask://<project_name>/ideation
133
- run_id: <ISO8601-timestamp>`,
134
- run_in_background: true
135
- })
610
+ - <e.g. "run mastermind:build to prototype chosen direction">
611
+ - <e.g. "run mastermind:research to validate top idea">
612
+ board_url: "monotask://<project_name>/ideation"
613
+ task_board_url: "monotask://<project_name>/monomind-task"
614
+ ops_task_board_url: "monotask://<project_name>/monomind-ops-task"
615
+ run_id: <ISO8601-timestamp>
616
+ summary:
617
+ ideas_generated: N
618
+ ideas_dev: N
619
+ ideas_ops: N
620
+ ideas_evaluated: N
621
+ ideas_tasked: N
622
+ total_dev_subtasks: N
623
+ total_ops_subtasks: N
624
+ ideas_iced: N
625
+ ideas_rejected: N
136
626
  ```
137
627
 
138
628
  ---
139
629
 
140
- ## Simple Execution
141
-
142
- For simple tasks (single agent, single output):
143
-
144
- 1. Spawn one Task agent with the ideation request as a self-contained briefing
145
- 2. Collect output
146
- 3. Return unified output schema with `status: complete`
147
-
148
- ---
149
-
150
630
  ## Domain Swarm Defaults
151
631
 
152
632
  | Task Type | Agent | Swarm |