Skip to content
Agent Orchestration
Skill

/orchestrated-execution

4-phase execution loop for work units - IMPLEMENT, VALIDATE, ADVERSARIAL REVIEW, COMMIT

From plugin
metaswarm
43714 skills23 agents16 commands2 hooks

Claude Code

$ npx -y skills add dsifry/metaswarm --skill orchestrated-execution --agent claude-code

SKILL.md

orchestrated-execution.SKILL.md
name: orchestrated-execution
description: 4-phase execution loop for work units - IMPLEMENT, VALIDATE, ADVERSARIAL REVIEW, COMMIT
auto_activate: false
triggers:
  - "orchestrated execution"
  - "4-phase loop"
  - "adversarial review"

Orchestrated Execution Skill

**Core principle**: Trust nothing. Verify everything. Review adversarially.

This skill defines a generalized 4-phase execution loop that any orchestrator can invoke when implementing work units. It replaces linear "implement then review" flows with a rigorous cycle that independently validates results and adversarially reviews against a written spec contract.

---

Coordination Mode Note

This skill is mode-agnostic — the 4-phase execution loop works identically in both Task Mode and Team Mode. The differences:

  • **Phase 1 (IMPLEMENT)**: In Team Mode, the coding subagent may be a persistent teammate (retains context across work units). In Task Mode, it's a fresh `Task()` per work unit. Role type: `roleType("coder")`.
  • **Phase 3 (ADVERSARIAL REVIEW)**: ALWAYS a fresh `Task()` instance (`roleType("adversarial-reviewer")`) in BOTH modes. Never a teammate, never resumed.
  • **All quality gates**: Unchanged regardless of mode.

See `./guides/agent-coordination.md` for full mode detection and coordination details.

---

Plan Review Gate

After drafting an implementation plan (Step 1: Plan Validation), submit it to the **Plan Review Gate** before writing-plans presents the plan (or before you present it to the user); see [`./guides/workflow-enforcement.md`](./guides/workflow-enforcement.md). In full orchestration there is no separate design doc, so after the Plan Review Gate passes the plan goes to the Design Review Gate ([two pipelines](./guides/workflow-enforcement.md#two-pipelines)). The Plan Review Gate spawns 3 adversarial reviewers (Feasibility, Completeness, Scope & Alignment) — all must PASS. See `skills/plan-review-gate/SKILL.md` for details.

---

When to Use This Skill

  • **Complex tasks** decomposed into multiple work units
  • **Tasks with a written spec** containing Definition of Done (DoD) items
  • **Multi-agent orchestration** where subagents produce work that needs verification
  • **High-stakes changes** where self-reported "it works" is insufficient

**Do NOT use for**: Single-file bug fixes, copy changes, or tasks without a spec.

---

1. Plan Validation (Pre-Flight Checklist)

Before submitting a plan to the Design Review Gate, the orchestrator MUST verify every item on this checklist. This prevents expensive design review cycles on fundamentally broken plans.

> **Note**: the Architect is spawned as `roleType("planner")`, which can write `PLAN.md` itself (it is not read-only, unlike the reviewer types). Role types are resolved per [Role type resolution](./guides/agent-coordination.md#role-type-resolution).

Architecture Checklist

  • [ ] Every data access goes through a service layer (no direct DB calls from routes/handlers)
  • [ ] Each work unit has a single responsibility (max ~5 files created/modified)
  • [ ] Error handling strategy specified (typed error hierarchy, how errors cross layer boundaries)
  • [ ] No hard-coded configuration — environment variables for all external service config

Dependency Graph Checklist

  • [ ] Each WU's dependencies are minimal (only depends on what it actually imports/uses)
  • [ ] No unnecessary serialization — WUs that CAN be parallel ARE marked parallel
  • [ ] No circular dependencies
  • [ ] Integration WUs exist to wire components into the app shell (not just built in isolation)

API Contract Checklist

If the plan includes HTTP endpoints or WebSocket protocols, verify:

  • [ ] Every HTTP endpoint specifies: method, path, request schema, all response status codes, error response shapes
  • [ ] WebSocket message types fully specified (client-to-server AND server-to-client message type tables)
  • [ ] Protocol concerns documented: heartbeat, reconnection, acknowledgment strategy
  • [ ] Response codes are explicit (not "returns the todo" but "returns 201 with the created todo")

Security Checklist

  • [ ] Trust boundaries identified (which inputs are untrusted?)
  • [ ] Input validation specified for every endpoint/handler (schema, max size)
  • [ ] Rate limiting specified for expensive operations (AI API calls, file uploads)
  • [ ] Authentication/authorization requirements documented
  • [ ] Secrets management documented (.env pattern, .gitignore verification)

UI/UX Checklist

If the plan includes a user interface:

  • [ ] User flows documented with trigger, steps, and visible outcome (see UI-FLOWS.md template)
  • [ ] Text-based wireframes for each screen showing layout and interactive elements
  • [ ] Empty states, loading states, and error states defined for each view
  • [ ] Integration work units explicitly created to wire components into the app shell
  • [ ] Component hierarchy documented (what renders what, where)

External Dependencies Checklist

  • [ ] All external services identified (APIs, SDKs, third-party services)
  • [ ] Required credentials/config documented (env var names, how to obtain)
  • [ ] Human checkpoint planned BEFORE work units that depend on external services
  • [ ] Graceful degradation specified for when credentials are missing
  • [ ] `.env.example` includes all required env vars

Completeness Checklist

  • [ ] All human checkpoints from the spec are included
  • [ ] All features from the spec have at least one work unit
  • [ ] Tooling is consistent (one package manager, matching config files across WUs)
  • [ ] No WU exceeds ~5 files or ~3 distinct concerns
  • [ ] WUs that are too large are split with explicit dependencies between parts

**If any checklist item fails, fix the plan BEFORE submitting to Design Review Gate.**

Required Plan Sections

Every plan submitted for Design Review MUST include these sections:

1. **Work Unit Decomposition** — WU list with DoD items, file scopes, dependencies 2. **API Contract** (if applicable) — structured end

Read more
@dsifry
Ships withmetaswarm

A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.

43714 skills23 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
437
Star history of dsifry/metaswarm on GitHub, a chart by star-history.com

Other skills on metaswarm.

brainstorming-extension

brainstorming-extensio…

Loads the assumption ledger and misreadings checklist at the start of brainstorming, and enforces the design review gate when a…

@dsifry@dsifryInstall Skill
create-issue

create-issue

Create comprehensive GitHub issues with TDD plans, acceptance criteria, and agent instructions for autonomous PR lifecycle…

@dsifry@dsifryInstall Skill
design-review-gate

design-review-gate

Automatic review gate that runs when brainstorming commits a project-sized design doc - spawns PM, Architect, Designer, Security,…

@dsifry@dsifryInstall Skill
external-tools

external-tools

Delegate implementation and review tasks to external AI CLI tools (Codex, Gemini) with cross-model adversarial review

@dsifry@dsifryInstall Skill
handling-pr-comments

handling-pr-comments

Address PR review feedback systematically — fetch inline comments, review bodies, handle outside-diff-range comments, resolve…

@dsifry@dsifryInstall Skill
handoff

handoff

Analyze the current session and write a self-contained handoff document so a fresh agent can resume the work with full context —…

@dsifry@dsifryInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw7d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca5d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip6d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about orchestrated-execution.

Which coding agents can use orchestrated-execution?
orchestrated-execution installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.