Skip to content

Update orchestrator skills to use MCP tools and v3 events #87

Description

@williamthorsen

Parent

Part of #74 (MCP server for run data + v3 event-sourced format) — PR 4 of 4.

Dependencies

Scope

Rewrite orchestrator skill instructions to use MCP tools instead of Read/Write on JSON files. Formalize subagent return contracts. Add get_run_state calls for cumulative state decisions.

Deliverables

  1. Rewrite orchestrate/SKILL.md — replace all run-index.json Read/Write operations with MCP tool calls (init_run, emit_event, register_artifact, complete_run)
  2. Rewrite orchestrate/modules/review-cycle.md — replace all state transition writes with emit_event calls for the review cycle's ~8 event types
  3. Formalize return contracts (from Replace LLM-driven run-index.json assembly with MCP orchestration tools and structured return contracts #83) — make subagent return protocols strict (no fallback parsing), remove parseWarning concept, add "MUST include all fields" instruction to all 7 subagent prompts
  4. Add get_run_state for flow control (from Replace LLM-driven run-index.json assembly with MCP orchestration tools and structured return contracts #83) — 5 specific decision points where the orchestrator reads authoritative state instead of relying on conversation memory
  5. Update _data/artifact-conventions.md — document v3 format specification

Files to modify

  • packages/agents/content/skills/orchestrate/SKILL.md
  • packages/agents/content/skills/orchestrate/modules/review-cycle.md
  • packages/agents/content/skills/_data/artifact-conventions.md
  • packages/agents/content/subagents/orchestrated-architect.md
  • packages/agents/content/subagents/orchestrated-planner.md
  • packages/agents/content/subagents/orchestrated-coder.md
  • packages/agents/content/subagents/orchestrated-reviewer.md
  • packages/agents/content/subagents/aspect-code-reviewer.md
  • packages/agents/content/subagents/aspect-silent-failure-reviewer.md
  • packages/agents/content/subagents/aspect-test-reviewer.md

Acceptance criteria

  • Orchestrate skill contains zero direct Read/Write/Edit operations on run-index.json
  • All phase boundaries emit appropriate events via MCP tools
  • All subagent return protocols are strict — no fallback to artifact file parsing
  • All cumulative state decisions read from get_run_state, not conversation memory
  • End-to-end: orchestrated run produces v3 run-index.json (header-only) + run-log.jsonl with events for all state transitions
  • Factory displays v3 runs correctly via event folding

See #74 implementation plan, Step 4 for full details.

Metadata

Metadata

Labels

featureAdded or improved external functionalityscope:agents

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions