/orchestrated-execution
4-phase execution loop for work units - IMPLEMENT, VALIDATE, ADVERSARIAL REVIEW, COMMIT
Claude Code
$ npx -y skills add dsifry/metaswarm --skill orchestrated-execution --agent claude-code
Codex
$ npx skills add dsifry/metaswarm --skill orchestrated-execution -a codex -y
Cursor
$ npx skills add dsifry/metaswarm --skill orchestrated-execution -a cursor -y
Gemini CLI
$ npx skills add dsifry/metaswarm --skill orchestrated-execution -a gemini-cli -y
GitHub Copilot
$ npx skills add dsifry/metaswarm --skill orchestrated-execution -a github-copilot -y
OpenCode
$ npx skills add dsifry/metaswarm --skill orchestrated-execution -a opencode -y
Windsurf
$ npx skills add dsifry/metaswarm --skill orchestrated-execution -a windsurf -y
SKILL.md
orchestrated-execution.SKILL.mdname: 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
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
A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.
Other skills on metaswarm.
More skills from other plugins.
agentmail
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
adr-create
Create a new Architecture Decision Record with sequential numbering and AgentDB registration
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.

