Back to list
alfredolopez80

orchestrator

by alfredolopez80

v2.66.8 - Multi-Agent Ralph Wiggum: Smart orchestration with adversarial validation (22 issues fixed), SEC-053 compliant, Dynamic Contexts, Plan Lifecycle CLI, Task Primitive integration, 55 hooks, 266+ skills

54🍴 11📅 Jan 23, 2026

SKILL.md


VERSION: 2.47.2

name: orchestrator description: "Full orchestration workflow with Smart Memory-Driven context (v2.47), RLM-inspired routing (v2.46), and quality gates: clarify, smart memory search, classify 3D, plan, delegate, execute with parallel memory, validate quality-first, retrospect. Use when: (1) implementing features, (2) complex refactoring, (3) multi-file changes, (4) tasks requiring coordination. Triggers: /orchestrator, /orch, 'orchestrate', 'full workflow', 'implement feature'." context: fork user-invocable: true agent: orchestrator allowed-tools:

  • Task
  • AskUserQuestion
  • EnterPlanMode
  • ExitPlanMode
  • TodoWrite
  • Read
  • Edit
  • Write
  • Bash
  • Glob
  • Grep
  • mcp__plugin_claude-mem_* hooks: SessionStart:
    • path: ~/.claude/hooks/orchestrator-init.sh once: true PreToolUse:
    • event: "Task" path: ~/.claude/hooks/smart-memory-search.sh PostToolUse:
    • event: "Task" path: ~/.claude/hooks/parallel-explore.sh Stop:
    • path: ~/.claude/hooks/orchestrator-report.sh

Orchestrator - Multi-Agent Ralph v2.52

Smart Memory-Driven Orchestration with parallel memory search, RLM-inspired routing, and quality-first validation.

Based on @PerceptualPeak Smart Forking concept:

"Why not utilize the knowledge gained from your hundreds/thousands of other Claude code sessions? Don't let that valuable context go to waste!!"

Quick Start

# Via skill invocation
/orchestrator Implement OAuth2 authentication with Google

# Via CLI
ralph orch "Migrate database from MySQL to PostgreSQL"

Core Workflow (v2.52.0 - 8 Major Steps, 23 Sub-steps)

Step 0: EVALUATE (3-Dimension Classification)

0a. Classification (v2.46 RLM):

DimensionValuesPurpose
Complexity1-10Scope, risk, ambiguity
Information DensityCONSTANT / LINEAR / QUADRATICHow answer scales
Context RequirementFITS / CHUNKED / RECURSIVEDecomposition needs

0b. SMART MEMORY SEARCH (v2.47 NEW):

┌────────────────────────────────────────────────────────────────┐
│              SMART MEMORY SEARCH (PARALLEL)                    │
├────────────────────────────────────────────────────────────────┤
│                                                                │
│   ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐        │
│   │claude-mem│ │ memvid   │ │ handoffs │ │ ledgers  │        │
│   └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘        │
│        │ PARALLEL   │ PARALLEL   │ PARALLEL   │ PARALLEL      │
│        └────────────┴────────────┴────────────┘               │
│                         ↓                                      │
│              .claude/memory-context.json                       │
│              ├── past_successes                                │
│              ├── past_errors                                   │
│              ├── recommended_patterns                          │
│              └── fork_suggestions (top 5)                      │
└────────────────────────────────────────────────────────────────┘

AUTOMATIC: Triggered by PreToolUse hook on Task invocation.

Workflow Routing:

DensityContextComplexityRoute
CONSTANTFITS1-3FAST_PATH (3 steps)
CONSTANTFITS4-10STANDARD
LINEARCHUNKEDANYPARALLEL_CHUNKS
QUADRATICANYANYRECURSIVE_DECOMPOSE

Step 0c: FAST_PATH Decision

If FAST_PATH eligible (complexity <= 3, CONSTANT, FITS):

DIRECT_EXECUTE -> MICRO_VALIDATE -> DONE (3 steps)

Otherwise, continue to Step 1.

Step 1: CLARIFY (Memory-Enhanced)

AUTOMATIC TLDR + MEMORY CONTEXT:

# 1. Check memory context for similar past implementations
cat .claude/memory-context.json | jq '.fork_suggestions[:3]'

# 2. Semantic search for existing code
tldr semantic "$USER_TASK_KEYWORDS" .

MUST_HAVE Questions (Blocking):

AskUserQuestion:
  questions:
    - question: "What is the primary goal?"
      header: "Goal"
      options:
        - label: "New feature"
        - label: "Bug fix"
        - label: "Refactoring"
        - label: "Performance"

Step 1b: GAP-ANALYST (Memory-Enhanced)

Pre-implementation gap analysis using memory context:

  • Check past_errors to avoid known pitfalls
  • Review recommended_patterns for best practices
  • Identify requirements not covered by memory

Step 1c: PARALLEL_EXPLORE (5 Concurrent + Memory)

Launch 5 parallel exploration tasks:

  1. Semantic Search - Code patterns
  2. Structure Analysis - Codebase overview
  3. Dependency Scan - Understanding deps
  4. Pattern Search - Similar implementations
  5. Memory Correlation - Match with past sessions

Results aggregated to .claude/exploration-context.json

Step 2: CLASSIFY (3-Dimension)

ScoreComplexityModelAdversarial
1-2TrivialMiniMax-lightningNo
3-4SimpleMiniMax M2.1No
5-6MediumSonnetOptional
7-8ComplexOpusYes
9-10CriticalOpus (thinking)Yes

Step 2b: WORKTREE DECISION

AskUserQuestion:
  questions:
    - question: "Requires isolated worktree?"
      header: "Isolation"
      options:
        - label: "Yes, create worktree"
        - label: "No, current branch"

Step 3: PLAN (Memory-Informed)

Use memory context in planning:

# Review what worked before
cat .claude/memory-context.json | jq '.insights.past_successes'

# Review what to avoid
cat .claude/memory-context.json | jq '.insights.past_errors'

Write plan with:

  • Summary (informed by memory)
  • Files to modify/create
  • Dependencies
  • Testing strategy
  • Risks (include known issues from memory)

Step 3b: PERSIST

Write to .claude/orchestrator-analysis.md

Step 3c: PLAN-STATE

Initialize .claude/plan-state.json with spec vs actual tracking.

Step 3d: RECURSIVE_DECOMPOSE (if needed)

For QUADRATIC or RECURSIVE tasks, spawn sub-orchestrators (max depth 3).

Step 4: PLAN MODE

EnterPlanMode: {}  # Claude Code reads orchestrator-analysis.md

Exit with ExitPlanMode when approved.

Step 5: DELEGATE (Parallel-First)

PRIORITY: Parallel execution when possible

# PARALLEL: Independent tasks
Task:
  subagent_type: "security-auditor"
  model: "opus"
  run_in_background: true
  prompt: "Audit: $FILES"

Task:
  subagent_type: "test-architect"
  model: "sonnet"
  run_in_background: true
  prompt: "Generate tests: $FILES"

# SEQUENTIAL: Dependent tasks
# Wait for results before continuing

Step 6: EXECUTE-WITH-SYNC

Nested loop with parallel substeps:

EXTERNAL RALPH LOOP (max 25)
└── For EACH step:
    ├── LSA-VERIFY (architecture check)
    ├── IMPLEMENT (parallel if independent)
    ├── PLAN-SYNC (drift detection)
    └── MICRO-GATE (max 3 retries)

CRITICAL: model: "sonnet" for all subagents

Step 7: VALIDATE (Quality-First v2.46)

Stage 1: CORRECTNESS (BLOCKING)

  • Meets requirements?
  • Edge cases handled?

Stage 2: QUALITY (BLOCKING)

  • Security verified?
  • Performance OK?
  • Tests adequate?

Stage 3: CONSISTENCY (ADVISORY - not blocking)

  • Follows patterns?
  • Style matches?

Stage 4: ADVERSARIAL (if complexity >= 7)

ralph adversarial "Design review"

Step 8: RETROSPECTIVE (Mandatory)

ralph retrospective

NEW v2.47: Save learnings to memory for future sessions:

# Save successful patterns
ralph memvid save "Implemented OAuth2 successfully: [pattern details]"

# Record errors to avoid
ralph memvid save "AVOID: [error pattern] caused [issue]"

-> VERIFIED_DONE

Model Routing (v2.47)

RoutePrimarySecondaryMax Iter
FAST_PATHsonnet-3
STANDARD (1-4)minimax-m2.1sonnet25
STANDARD (5-6)sonnetopus25
STANDARD (7-10)opussonnet25
PARALLEL_CHUNKSsonnet (chunks)opus (aggregate)15/chunk
RECURSIVEopus (root)sonnet (sub)15/sub

Integration Points

ComponentRoleWhen
smart-memory-search.shPARALLEL memory searchStep 0b (NEW)
/smart-forkFind relevant sessionsManual invocation
/fast-path-checkTrivial task detectionStep 0c
/parallel-explore5 concurrent explorationStep 1c
/classify3-dimension classificationStep 2
/gatesQuality validationStep 7
/adversarialSpec refinementStep 7
/retrospectivePost-analysisStep 8

Memory Sources (Searched in Parallel)

SourceContentSpeed
claude-mem MCPSemantic observationsFast
memvidVector-encoded contextSub-5ms
handoffsSession snapshotsFast
ledgersContinuity dataFast

Anti-Patterns

  • Never start without smart memory search
  • Never skip clarification
  • Never use model: "haiku" for subagents
  • Never skip retrospective
  • Never attempt more than 3 fixes (3-Fix Rule)
  • Never block on consistency issues (quality over consistency)
  • Never ignore memory context (learn from history)

Completion Criteria

VERIFIED_DONE requires ALL:

  1. Smart Memory Search complete (memory-context.json exists)
  2. Task classified (3 dimensions)
  3. MUST_HAVE questions answered
  4. Plan approved
  5. Implementation complete
  6. CORRECTNESS passed (blocking)
  7. QUALITY passed (blocking)
  8. Adversarial passed (if complexity >= 7)
  9. Retrospective done + learnings saved to memory

Examples

Standard Task with Memory

User: "Add JWT authentication"

Step 0a: Classify -> Complexity: 7, LINEAR, FITS
Step 0b: Smart Memory Search
  -> Found: 3 past sessions with auth implementations
  -> past_successes: "Use passport.js for OAuth"
  -> past_errors: "Don't store tokens in localStorage"
  -> fork_suggestion: session-abc123

Step 1: Clarify (informed by memory)
  -> Skip questions about token storage (already known)
  -> Focus on new requirements

... (continue with memory-informed implementation)

Step 8: Retrospective
  -> Save: "JWT with refresh tokens implemented successfully"
  -> Save: "AVOID: Token expiry not handled - fix applied"

CLI Commands (v2.47)

# Smart memory search
ralph memory-search "OAuth implementation"
ralph fork-suggest "Add authentication"
ralph memory-stats

# Standard orchestration
ralph orch "task description"
ralph gates
ralph adversarial "spec"

Score

Total Score

80/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon