create-merlin-brain 3.6.1 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -407,6 +407,61 @@ except: pass
407
407
  fi
408
408
  }
409
409
 
410
+ # ═══════════════════════════════════════════════════════════════════════════════
411
+ # Chain-of-Verification (CoVe) — Selective Self-Verification
412
+ # Based on Meta AI Research. Only injected for high-stakes task types where
413
+ # being wrong has real consequences. Zero overhead for simple tasks.
414
+ # ═══════════════════════════════════════════════════════════════════════════════
415
+
416
+ # Task types that benefit from CoVe verification
417
+ COVE_TASK_TYPES="security architect debug review secaudit migrate"
418
+
419
+ # Check if task warrants CoVe
420
+ _blend_needs_cove() {
421
+ local primary_key="$1"
422
+ for cove_type in $COVE_TASK_TYPES; do
423
+ if [ "$primary_key" = "$cove_type" ]; then
424
+ return 0
425
+ fi
426
+ done
427
+ return 1
428
+ }
429
+
430
+ # Generate the CoVe instruction block
431
+ _blend_cove_block() {
432
+ local task_domain="$1"
433
+
434
+ cat << 'COVE_BLOCK'
435
+
436
+ ---
437
+
438
+ ## Reasoning Protocol: Chain-of-Verification (CoVe)
439
+
440
+ This task domain requires high accuracy. Follow this 4-step verification process:
441
+
442
+ ### Step 1: Generate Baseline
443
+ Produce your initial solution/analysis.
444
+
445
+ ### Step 2: Plan Verification Questions
446
+ Generate 3-5 specific, falsifiable questions that would expose errors in your baseline:
447
+ - Factual claims that could be wrong
448
+ - Assumptions that might not hold
449
+ - Edge cases you might have missed
450
+ - Security or correctness gaps
451
+
452
+ ### Step 3: Independent Verification
453
+ Answer each verification question AS IF you had never seen your baseline.
454
+ Do NOT reference or defend your initial answer. Treat each as a standalone query.
455
+ Examine the actual codebase independently for each question.
456
+
457
+ ### Step 4: Final Verified Response
458
+ Compare verification answers against your baseline. Where they conflict,
459
+ trust the verification. Produce a corrected final response.
460
+
461
+ CRITICAL: Step 3 must be truly independent. Never justify your baseline — interrogate it.
462
+ COVE_BLOCK
463
+ }
464
+
410
465
  # ═══════════════════════════════════════════════════════════════════════════════
411
466
  # THE BLEND ENGINE
412
467
  # This is the core — creates a custom agent for every task
@@ -556,6 +611,17 @@ ${cloud_context}
556
611
  CLOUD_EOF
557
612
  fi
558
613
 
614
+ # Add CoVe verification protocol for high-stakes tasks
615
+ # This is selective — only security, architecture, debugging, review, audit, migration
616
+ local primary_key=""
617
+ if [ -n "$top_agents" ]; then
618
+ primary_key=$(echo "$top_agents" | head -1 | cut -d: -f2)
619
+ fi
620
+
621
+ if _blend_needs_cove "$primary_key" 2>/dev/null; then
622
+ _blend_cove_block "$primary_key" >> "$blend_path"
623
+ fi
624
+
559
625
  # Add the task as final instruction
560
626
  cat >> "$blend_path" << TASK_EOF
561
627
 
@@ -602,6 +668,13 @@ blend_show_decision() {
602
668
  if command -v merlin &>/dev/null; then
603
669
  echo -e " ${CYAN}[sights]${RESET} Codebase context will be injected"
604
670
  fi
671
+
672
+ # Show CoVe status
673
+ local primary_key=""
674
+ primary_key=$(echo "$top_agents" | head -1 | cut -d: -f2)
675
+ if _blend_needs_cove "$primary_key" 2>/dev/null; then
676
+ echo -e " ${YELLOW}[CoVe]${RESET} Chain-of-Verification enabled (high-stakes task)"
677
+ fi
605
678
  }
606
679
 
607
680
  # Show a one-line summary of the blend
@@ -1 +1 @@
1
- 3.6.1
1
+ 3.6.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-merlin-brain",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Merlin - The Ultimate AI Brain for Claude Code. One install: workflows, agents, loop, and Sights MCP server.",
5
5
  "type": "module",
6
6
  "main": "./dist/server/index.js",