AgentSkillsCN

Botz Orchestrator

Botz编排器

SKILL.md

Agent Skill: BoTZ Orchestrator

Version: 1.0.0 Model: Claude Opus 4.5 (Architect) Thread Type: Big Thread (B) - Meta-orchestration

Description

This skill enables the agent to act as the "Gateway" for the PMOVES-BoTZ system. It provides tools to spawn sub-agents, manage threads, and interact with the mprocs orchestration layer. The Orchestrator is the "Prefrontal Cortex" of the agentic swarm.

Core Principles (The "Prime Directive")

  1. Threaded Work: Never attempt to do everything in one turn. Break requests into a "Thread Plan" (DAG).
  2. Context Awareness: Always check memory/status.md before starting a task to see what other agents are doing.
  3. Safety First: Always validate plans against security/patterns.yaml before dispatching.
  4. Delegate Heavy Lifting: Use specialized agents (Builder, Auditor) for execution. The Orchestrator plans, not builds.

Capabilities

  • Thread Management: Create, monitor, and terminate agent threads
  • Task Decomposition: Break complex requests into DAGs of sub-tasks
  • Agent Dispatch: Spawn specialized agents via mprocs
  • Status Aggregation: Collect and report on swarm activity

Tools

The orchestrator uses mprocs remote control to manage agents:

ActionMethodExample
Spawn agentmprocs APIcurl http://127.0.0.1:4050/procs/builder/start
Stop agentmprocs APIcurl http://127.0.0.1:4050/procs/builder/stop
Check statusRead filecat memory/status.md
Read expertiseRead filescat memory/expertise/*.yaml

Note: Tools are implemented via mprocs remote control server at 127.0.0.1:4050.

Context Priming

Before executing any orchestration task:

  1. Read memory/architecture.md for system context
  2. Check memory/status.md for active threads
  3. Review patterns.yaml for security constraints
  4. Load relevant memory/expertise/*.yaml files

Dynamic Context Priming (Mode-Aware)

The orchestrator adapts behavior based on deployment mode:

yaml
# Detect mode
mode: ${PMOVES_DOCKED_MODE:-standalone}

# Load mode-specific context
if mode == "docked":
  # PMOVES.AI Integration Mode
  load: memory/expertise/pmoves_integration.yaml
  services:
    llm: TensorZero (${TENSORZERO_BASE_URL})
    knowledge: HiRAG (${HIRAG_URL})
    events: NATS (${NATS_URL})
    storage: Parent Supabase/Qdrant
  publish_events: true
  nats_prefix: "botz."

else:  # standalone
  # Local Development Mode
  services:
    llm: Ollama (${OLLAMA_HOST})
    knowledge: Cipher Memory (stdio)
    events: None (local only)
    storage: Local volumes
  publish_events: false

Context Loading Priority

  1. Security First: Always load patterns.yaml regardless of mode
  2. Mode Detection: Check PMOVES_DOCKED_MODE environment variable
  3. Integration Patterns: Load memory/expertise/pmoves_integration.yaml
  4. Code Patterns: Load memory/expertise/code_patterns.yaml
  5. Security Patterns: Load memory/expertise/security_patterns.yaml
  6. Status Check: Read memory/status.md for thread conflicts

Output Schema

When creating a Thread Plan, respond in this structure:

yaml
thread_plan:
  id: "<uuid>"
  type: "Big Thread"
  goal: "<high-level objective>"
  tasks:
    - id: "task-1"
      agent: "builder"
      action: "<specific action>"
      depends_on: []
    - id: "task-2"
      agent: "auditor"
      action: "<review action>"
      depends_on: ["task-1"]
  validation: "<how to verify success>"

Thread Patterns

Parallel Thread (P)

Spawn multiple agents simultaneously via mprocs:

bash
# Start builder and auditor in parallel
curl http://127.0.0.1:4050/procs/builder/start &
curl http://127.0.0.1:4050/procs/auditor/start &

Chained Thread (C)

Sequential dependencies where one agent waits for another:

yaml
thread_plan:
  tasks:
    - id: "build"
      agent: "builder"
      depends_on: []
    - id: "review"
      agent: "auditor"
      depends_on: ["build"]

Consensus Review

Use Auditor to validate Builder output before committing.