@monoes/monomindcli 1.9.13 → 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.
@@ -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 comment add "${BOARD_ID}" "$CARD_ID" "DESCRIPTION: <2-3 sentence description>
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,56 +264,81 @@ END_IDEAS_OUTPUT`
264
264
  })
265
265
  ```
266
266
 
267
- Parse the `IDEAS_OUTPUT` JSON block from the agent's response. If zero ideas were returned, report "Idea Manager produced no ideas." and STOP.
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
 
273
- **CRITICAL Variable substitution required for Step 5 Task call:**
274
- The PM agent runs in an isolated Task context and cannot inherit shell variables. Read the literal UUID values from the `=== IDEA BOARD LITERAL VALUES ===` echo block (Step 3) and embed them as hard-coded strings in the Task prompt. Do NOT pass `${BOARD_ID}`, `${COL_EVALUATED}`, `${COL_ICED}`, `${COL_REJECTED}` etc. — the agent will receive them as literal dollar-sign strings and its `monotask card move` / `monotask card set-impact` calls will silently fail.
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
+ ```
275
284
 
276
- Begin the PM agent's Task prompt with this safety check:
277
- > `SAFETY CHECK: Verify that the BOARD_ID you received matches UUID format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. If it does not, STOP and report "ERROR: BOARD_ID not substituted received: <value>". Do NOT call monotask board create, space create, or any board/space management commands. Your job is updating existing CARDS only.`
285
+ **CRITICAL Variable substitution required for Step 5 Task call:**
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.
278
287
 
279
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.
280
289
 
281
- Provide the PM agent with:
282
- - All ideas from Step 4 (titles, descriptions, categories, card IDs, and the literal UUID values for BOARD_ID, COL_EVALUATED, COL_ICED, COL_REJECTED from the Step 3 echo block)
283
- - The `brain_context`
284
- - The original `prompt`
290
+ ```javascript
291
+ Task({
292
+ subagent_type: "Product Manager",
293
+ description: "PM validation for project " + project_name,
294
+ run_in_background: false,
295
+ prompt: `SAFETY CHECK: Verify that the BOARD_ID you received matches UUID format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12 hex chars). If it does not, STOP and report "ERROR: BOARD_ID not substituted — received: <value>". Do NOT call monotask board create, space create, or column create. Your only job is evaluating cards and running impact/effort updates on existing cards.
285
296
 
286
- The PM agent must, for **each idea**, determine one verdict plus **impact** (0–10) and **effort** (0–10) scores:
297
+ You are the Product Manager evaluator for project "${project_name}".
287
298
 
288
- | Verdict | Criteria |
289
- |---------|----------|
290
- | **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. |
291
- | **iced** | Good potential but needs a question answered first. Include the blocking question. |
292
- | **rejected** | Out of scope, infeasible, or low value. Include a 1-sentence reason. |
299
+ CONTEXT: ${date} | Project: ${project_name}
300
+ ORIGINAL GOAL: ${prompt}
293
301
 
294
- The PM agent must run these board updates directly using Bash tool:
302
+ BRAIN CONTEXT:
303
+ ${brain_context}
295
304
 
296
- ```bash
297
- # evaluated
298
- monotask card move "$BOARD_ID" "$CARD_ID" "$COL_EVALUATED" --json
299
- monotask card set-impact "$BOARD_ID" "$CARD_ID" <0-10>
300
- monotask card set-effort "$BOARD_ID" "$CARD_ID" <0-10>
301
- monotask card comment add "$BOARD_ID" "$CARD_ID" "Value: <value statement>"
305
+ YOUR BOARD: ${BOARD_ID}
306
+ COL_EVALUATED: ${COL_EVALUATED}
307
+ COL_ICED: ${COL_ICED}
308
+ COL_REJECTED: ${COL_REJECTED}
302
309
 
303
- # iced
304
- monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ICED" --json
305
- monotask card set-impact "$BOARD_ID" "$CARD_ID" <0-10>
306
- monotask card set-effort "$BOARD_ID" "$CARD_ID" <0-10>
307
- monotask card comment add "$BOARD_ID" "$CARD_ID" "Blocked: <question>"
310
+ IDEAS TO EVALUATE (formatted from IDEAS_OUTPUT parsed in Step 4 — paste the full JSON array here as literal text):
311
+ ${ideas_list}
308
312
 
309
- # rejected
310
- monotask card move "$BOARD_ID" "$CARD_ID" "$COL_REJECTED" --json
311
- monotask card comment add "$BOARD_ID" "$CARD_ID" "Rejected: <reason>"
312
- ```
313
+ For EVERY idea above, determine:
314
+ - verdict: evaluated | iced | rejected
315
+ - impact: 0–10 (business value / strategic importance)
316
+ - effort: 0–10 (implementation cost / complexity)
317
+ - skipElaboration: true (simple, no deep research needed) | false (edge cases should be explored) — only for evaluated
318
+ - rationale: 1-2 sentence value statement (evaluated), blocking question (iced), or rejection reason (rejected)
313
319
 
314
- The PM agent must also output a structured block so the outer skill can proceed:
320
+ MANDATORY BOARD UPDATES run these bash commands for EVERY idea, no exceptions:
321
+
322
+ For evaluated ideas:
323
+ monotask card move "${BOARD_ID}" "<CARD_ID>" "${COL_EVALUATED}" --json
324
+ monotask card set-impact "${BOARD_ID}" "<CARD_ID>" <impact>
325
+ monotask card set-effort "${BOARD_ID}" "<CARD_ID>" <effort>
326
+ monotask card comment add "${BOARD_ID}" "<CARD_ID>" "Value: <rationale>"
327
+
328
+ For iced ideas:
329
+ monotask card move "${BOARD_ID}" "<CARD_ID>" "${COL_ICED}" --json
330
+ monotask card set-impact "${BOARD_ID}" "<CARD_ID>" <impact>
331
+ monotask card set-effort "${BOARD_ID}" "<CARD_ID>" <effort>
332
+ monotask card comment add "${BOARD_ID}" "<CARD_ID>" "Blocked: <blocking question>"
333
+
334
+ For rejected ideas:
335
+ monotask card move "${BOARD_ID}" "<CARD_ID>" "${COL_REJECTED}" --json
336
+ monotask card comment add "${BOARD_ID}" "<CARD_ID>" "Rejected: <reason>"
337
+
338
+ IMPORTANT: set-impact and set-effort MUST be called for every evaluated and iced idea. Do not skip them.
339
+
340
+ After completing all board updates, output this structured block:
315
341
 
316
- ```
317
342
  VERDICTS_OUTPUT
318
343
  [
319
344
  {
@@ -322,15 +347,20 @@ VERDICTS_OUTPUT
322
347
  "category": "feature | technical-baseline | business-operation",
323
348
  "verdict": "evaluated | iced | rejected",
324
349
  "skipElaboration": true | false,
325
- "rationale": "<value statement (if evaluated) | blocking question (if iced) | rejection reason (if rejected)>",
350
+ "rationale": "<value statement | blocking question | rejection reason>",
326
351
  "impact": <0-10>,
327
352
  "effort": <0-10>
328
353
  }
329
354
  ]
330
- END_VERDICTS_OUTPUT
355
+ END_VERDICTS_OUTPUT`
356
+ })
331
357
  ```
332
358
 
333
- 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.
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.
334
364
 
335
365
  ---
336
366
 
@@ -338,43 +368,172 @@ After the PM agent completes, parse `VERDICTS_OUTPUT`. If **all** ideas are iced
338
368
 
339
369
  #### 6a. Elaboration (conditional)
340
370
 
341
- For any evaluated idea with `skipElaboration: true`, move it directly to `Elaborated` and write a rationale comment so future readers understand why no deep elaboration was needed:
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:
342
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"
343
374
  monotask card move "$BOARD_ID" "$CARD_ID" "$COL_ELABORATED" --json
344
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>"
345
376
  ```
346
377
 
347
378
  For ideas with `skipElaboration: false`, **split by category** before spawning agents:
348
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
+
392
+ **CRITICAL — Variable substitution required for Step 6a Task calls:**
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.
394
+
349
395
  **Dev ideas** (`feature` or `technical-baseline`):
350
- Spawn two agents in parallel:
351
- 1. `feature-dev:code-explorer` — traces execution paths, maps dependencies, surfaces codebase constraints relevant to each idea.
352
- 2. `researcher` (with WebSearch) — finds prior art, edge cases, implementation pitfalls for each idea.
396
+ Spawn two agents in parallel via Task tool:
353
397
 
354
- **Business-operation ideas** (`business-operation`):
355
- Spawn two agents in parallel:
356
- 1. `researcher` (with WebSearch) — finds industry benchmarks, comparable operational processes, known pitfalls, and market context.
357
- 2. `Product Manager` — assesses process feasibility, stakeholder impact, alignment with existing workflows, and resource requirements.
398
+ ```javascript
399
+ // Agent 1 code explorer
400
+ Task({
401
+ subagent_type: "feature-dev:code-explorer",
402
+ description: "Elaboration: codebase constraints for dev ideas",
403
+ run_in_background: true,
404
+ prompt: `SAFETY CHECK: You are an elaboration agent. Do NOT call monotask board create, space create, or column create. Your only job is producing an ELABORATION_OUTPUT block — the outer skill writes to the board.
405
+
406
+ Analyze the following dev ideas against the current codebase. For each idea, trace relevant execution paths, map dependencies, and surface constraints or implementation risks.
407
+
408
+ BRAIN CONTEXT:
409
+ ${brain_context}
410
+
411
+ IDEAS:
412
+ ${dev_ideas_list}
358
413
 
359
- Provide all agents with: their subset of ideas (titles, descriptions, card IDs) + `brain_context`.
414
+ Output this block:
415
+ ELABORATION_OUTPUT
416
+ [
417
+ {
418
+ "card_id": "<idea card ID>",
419
+ "findings": "<detailed codebase constraints, dependency risks, and implementation notes>",
420
+ "blocking_issue": "<blocking issue if any, or null>"
421
+ }
422
+ ]
423
+ END_ELABORATION_OUTPUT`
424
+ })
425
+
426
+ // Agent 2 — researcher
427
+ Task({
428
+ subagent_type: "researcher",
429
+ description: "Elaboration: prior art and edge cases for dev ideas",
430
+ run_in_background: true,
431
+ prompt: `SAFETY CHECK: You are an elaboration agent. Do NOT call monotask board create, space create, or column create. Your only job is producing an ELABORATION_OUTPUT block — the outer skill writes to the board.
432
+
433
+ Research the following dev ideas. For each idea, find prior art, known edge cases, implementation pitfalls, and relevant open-source approaches.
434
+
435
+ BRAIN CONTEXT:
436
+ ${brain_context}
360
437
 
361
- Each agent must output their findings in this format:
438
+ IDEAS:
439
+ ${dev_ideas_list}
440
+
441
+ Output this block:
442
+ ELABORATION_OUTPUT
443
+ [
444
+ {
445
+ "card_id": "<idea card ID>",
446
+ "findings": "<prior art, edge cases, pitfalls, and relevant examples>",
447
+ "blocking_issue": "<blocking issue if any, or null>"
448
+ }
449
+ ]
450
+ END_ELABORATION_OUTPUT`
451
+ })
362
452
  ```
453
+
454
+ **Business-operation ideas** (`business-operation`):
455
+ Spawn two agents in parallel via Task tool:
456
+
457
+ ```javascript
458
+ // Agent 1 — researcher
459
+ Task({
460
+ subagent_type: "researcher",
461
+ description: "Elaboration: industry benchmarks for ops ideas",
462
+ run_in_background: true,
463
+ prompt: `SAFETY CHECK: You are an elaboration agent. Do NOT call monotask board create, space create, or column create. Your only job is producing an ELABORATION_OUTPUT block — the outer skill writes to the board.
464
+
465
+ Research the following business-operation ideas. For each idea, find industry benchmarks, comparable operational processes, known pitfalls, and market context.
466
+
467
+ BRAIN CONTEXT:
468
+ ${brain_context}
469
+
470
+ IDEAS:
471
+ ${ops_ideas_list}
472
+
473
+ Output this block:
363
474
  ELABORATION_OUTPUT
364
475
  [
365
476
  {
366
477
  "card_id": "<idea card ID>",
367
- "findings": "<detailed findings for this idea>",
478
+ "findings": "<industry benchmarks, comparable processes, pitfalls, and market context>",
368
479
  "blocking_issue": "<blocking issue if any, or null>"
369
480
  }
370
481
  ]
371
- END_ELABORATION_OUTPUT
482
+ END_ELABORATION_OUTPUT`
483
+ })
484
+
485
+ // Agent 2 — Product Manager
486
+ Task({
487
+ subagent_type: "Product Manager",
488
+ description: "Elaboration: feasibility assessment for ops ideas",
489
+ run_in_background: true,
490
+ prompt: `SAFETY CHECK: You are an elaboration agent. Do NOT call monotask board create, space create, or column create. Your only job is producing an ELABORATION_OUTPUT block — the outer skill writes to the board.
491
+
492
+ Assess the following business-operation ideas for process feasibility, stakeholder impact, alignment with existing workflows, and resource requirements.
493
+
494
+ BRAIN CONTEXT:
495
+ ${brain_context}
496
+
497
+ IDEAS:
498
+ ${ops_ideas_list}
499
+
500
+ Output this block:
501
+ ELABORATION_OUTPUT
502
+ [
503
+ {
504
+ "card_id": "<idea card ID>",
505
+ "findings": "<feasibility assessment, stakeholder impact, workflow alignment, resource needs>",
506
+ "blocking_issue": "<blocking issue if any, or null>"
507
+ }
508
+ ]
509
+ END_ELABORATION_OUTPUT`
510
+ })
372
511
  ```
373
512
 
374
- After all agents complete, merge their outputs per idea (same card_id → concatenate findings). For each idea:
513
+ After all agents complete, merge their outputs per idea (same card_id → concatenate findings). For each idea, write findings to the card description and as comments, then move the card:
375
514
 
376
515
  ```bash
377
- # Write merged findings as card comments
516
+ # Set the card description to the merged elaboration findings (this is the primary content field)
517
+ if [ "$category" = "business-operation" ]; then
518
+ monotask card set-description "$BOARD_ID" "$CARD_ID" "## Elaboration Findings
519
+
520
+ ### Industry context & benchmarks:
521
+ <researcher findings>
522
+
523
+ ### Feasibility & stakeholder impact:
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
535
+
536
+ # Also add each finding as a comment for traceability
378
537
  # Dev ideas:
379
538
  monotask card comment add "$BOARD_ID" "$CARD_ID" "Edge cases & prior art: <researcher findings>"
380
539
  monotask card comment add "$BOARD_ID" "$CARD_ID" "Codebase constraints: <code-explorer findings>"
@@ -449,8 +608,9 @@ After applying all user instructions, proceed to Step 6c with the remaining idea
449
608
  REGISTRY=".monomind/registry.json"
450
609
 
451
610
  # Dev decomposition agent — pick the most relevant engineering/architecture specialist
452
- # Use the idea titles and descriptions as the keyword signal
453
- DEV_IDEA_CONTEXT="<concatenated titles+descriptions of all dev ideas>"
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(" ")')
454
614
  dev_decomp_agent=$(jq -r \
455
615
  --arg kw "$(echo "$DEV_IDEA_CONTEXT" | tr '[:upper:]' '[:lower:]' | grep -oE '[a-z]{5,}' | sort -u | tr '\n' ' ')" \
456
616
  '[ .agents[] | select(.deprecated != true)
@@ -470,7 +630,8 @@ dev_decomp_agent=$(jq -r \
470
630
  dev_decomp_agent="${dev_decomp_agent:-Software Architect}"
471
631
 
472
632
  # Ops decomposition agent — pick the most relevant strategy/sales/product specialist
473
- OPS_IDEA_CONTEXT="<concatenated titles+descriptions of all ops ideas>"
633
+ OPS_IDEA_CONTEXT=$(echo "$verdicts_output_json" | jq -r \
634
+ '[.[] | select(.verdict=="evaluated") | select(.category=="business-operation") | .title] | join(" ")')
474
635
  ops_decomp_agent=$(jq -r \
475
636
  --arg kw "$(echo "$OPS_IDEA_CONTEXT" | tr '[:upper:]' '[:lower:]' | grep -oE '[a-z]{5,}' | sort -u | tr '\n' ' ')" \
476
637
  '[ .agents[] | select(.deprecated != true)
@@ -493,30 +654,88 @@ echo "Dev decomp: $dev_decomp_agent | Ops decomp: $ops_decomp_agent"
493
654
  ```
494
655
 
495
656
  **CRITICAL — Variable substitution required for Step 6c Task calls:**
496
- Decomposition agents also run in isolated Task contexts. Before constructing each Task prompt, embed the literal card IDs (from the elaborated ideas list), `brain_context`, and `prompt` as hard-coded strings. Do NOT write `${card_id}`, `${brain_context}`, etc. as template placeholders.
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:
497
658
 
498
- Each decomposition agent's Task prompt should begin with:
499
- > `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.`
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
+ ```
500
669
 
501
670
  **Spawn decomposition agents by track** — run both in parallel if both tracks have elaborated ideas:
502
671
 
503
- - For **dev ideas** (`feature` or `technical-baseline`): spawn the agent selected as `$dev_decomp_agent`.
504
- - For **business-operation ideas**: spawn the agent selected as `$ops_decomp_agent`.
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.
505
679
 
506
- Provide each agent with:
507
- - Their subset of elaborated ideas (titles, descriptions, all card comments, literal card IDs, and category)
508
- - 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.
509
681
 
510
- 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.
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.
511
692
 
512
- ```
513
693
  TASKS_OUTPUT
514
694
  [
515
695
  {
516
- "parent_card_id": "<ideation board card ID>",
696
+ "parent_card_id": "<ideation board card ID from the list above>",
517
697
  "title": "<subtask title ≤80 chars>",
518
- "description": "<what to build/do>",
519
- "category": "feature | technical-baseline | business-operation",
698
+ "description": "<what to build/do — specific and actionable>",
699
+ "category": "feature | technical-baseline",
700
+ "agent": "<recommended subagent_type>",
701
+ "effort": <1-10>,
702
+ "has_prerequisites": <true | false>
703
+ }
704
+ ]
705
+ FLAGGED
706
+ [
707
+ { "card_id": "<ideation card ID>", "question": "<what needs clarifying>" }
708
+ ]
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",
520
739
  "agent": "<recommended subagent_type>",
521
740
  "effort": <1-10>,
522
741
  "has_prerequisites": <true | false>
@@ -526,7 +745,8 @@ FLAGGED
526
745
  [
527
746
  { "card_id": "<ideation card ID>", "question": "<what needs clarifying>" }
528
747
  ]
529
- END_TASKS_OUTPUT
748
+ END_TASKS_OUTPUT`
749
+ })
530
750
  ```
531
751
 
532
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`.
@@ -549,11 +769,14 @@ monotask column create "$TASK_BOARD_ID" "Human in Loop" --json >/dev/null
549
769
  monotask column create "$TASK_BOARD_ID" "Done" --json >/dev/null
550
770
  ```
551
771
 
552
- Look up column IDs:
772
+ Look up and validate column IDs:
553
773
  ```bash
774
+ [ -z "$TASK_BOARD_ID" ] && { echo "ERROR: TASK_BOARD_ID is empty — aborting to prevent card creation on null board"; exit 1; }
554
775
  task_columns=$(monotask column list "$TASK_BOARD_ID" --json)
555
776
  TASK_COL_TODO=$(echo "$task_columns" | jq -r '.[] | select(.title == "Todo") | .id' | head -1)
556
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; }
557
780
  ```
558
781
 
559
782
  ---
@@ -574,11 +797,14 @@ monotask column create "$OPS_BOARD_ID" "Human in Loop" --json >/dev/null
574
797
  monotask column create "$OPS_BOARD_ID" "Done" --json >/dev/null
575
798
  ```
576
799
 
577
- Look up column IDs:
800
+ Look up and validate column IDs:
578
801
  ```bash
802
+ [ -z "$OPS_BOARD_ID" ] && { echo "ERROR: OPS_BOARD_ID is empty — aborting to prevent card creation on null board"; exit 1; }
579
803
  ops_columns=$(monotask column list "$OPS_BOARD_ID" --json)
580
804
  OPS_COL_TODO=$(echo "$ops_columns" | jq -r '.[] | select(.title == "Todo") | .id' | head -1)
581
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; }
582
808
  ```
583
809
 
584
810
  ---
@@ -596,10 +822,17 @@ else
596
822
  BOARD_LABEL="Implementation Tasks"
597
823
  fi
598
824
 
599
- TASK_CARD_ID=$(monotask card create "$TARGET_BOARD" "$COL_TARGET" "<task title>" --json | jq -r '.id')
600
- # Inherit impact and effort from parent idea (looked up from VERDICTS_OUTPUT by parent_card_id)
601
- monotask card set-impact "$TARGET_BOARD" "$TASK_CARD_ID" <parent_impact>
602
- monotask card set-effort "$TARGET_BOARD" "$TASK_CARD_ID" <parent_effort>
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
+
829
+ # Create task card as a proper subtask of the parent idea card (cross-board link)
830
+ # Signature: subtask add <PARENT_BOARD_ID> <PARENT_CARD_ID> <CHILD_BOARD_ID> <COL_ID> <TITLE>
831
+ TASK_CARD_ID=$(monotask card subtask add "$BOARD_ID" "$parent_card_id" "$TARGET_BOARD" "$COL_TARGET" "<task title>" --json | jq -r '.id')
832
+ # Set the task description as the primary content field
833
+ monotask card set-description "$TARGET_BOARD" "$TASK_CARD_ID" "<what to build/do — from TASKS_OUTPUT description>"
834
+ monotask card set-impact "$TARGET_BOARD" "$TASK_CARD_ID" "$parent_impact"
835
+ monotask card set-effort "$TARGET_BOARD" "$TASK_CARD_ID" "$parent_effort"
603
836
  monotask card comment add "$TARGET_BOARD" "$TASK_CARD_ID" \
604
837
  "SOURCE: mastermind:idea | <first 100 chars of prompt>
605
838
  AGENT: <agent>
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AA62B1E,eAAO,MAAM,WAAW,EAAE,OAkFzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAk3B1E,eAAO,MAAM,WAAW,EAAE,OAkFzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -234,13 +234,18 @@ const initAction = async (ctx) => {
234
234
  options.components.settings ? `Review ${output.highlight('.claude/settings.json')} for hook configurations` : '',
235
235
  ].filter(Boolean));
236
236
  }
237
- // Recommend UA semantic enrichment
237
+ // Recommend semantic enrichment — prominent callout, not buried tip
238
238
  output.writeln('');
239
- output.writeln(output.bold('Tip: Enrich your knowledge graph with semantic summaries'));
240
- output.writeln(output.dim(' Run /monomind:understand in Claude Code to analyze your project'));
241
- output.writeln(output.dim(' and add LLM-generated summaries, tags, and architectural layers'));
242
- output.writeln(output.dim(` to the monograph graph. This gives Claude Code a richer mental`));
243
- output.writeln(output.dim(` model of your codebase from the very first session.`));
239
+ output.writeln(output.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
240
+ output.writeln(output.bold(' Run /monomind:understand next'));
241
+ output.writeln('');
242
+ output.writeln(' In Claude Code, type: /monomind:understand');
243
+ output.writeln('');
244
+ output.writeln(' This analyzes your project with an LLM and enriches the');
245
+ output.writeln(' knowledge graph with semantic summaries, tags, and layers.');
246
+ output.writeln(' Claude Code will have a much richer mental model of your');
247
+ output.writeln(' codebase from the very first session.');
248
+ output.writeln(output.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
244
249
  if (ctx.flags.format === 'json') {
245
250
  output.printJson(result);
246
251
  }