start
Skill426 starsChanged 6 months agoMITView on GitHub
Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work
- Reads credentials
130 other projects use a version of this.
Adopted by
Most recently taken up by
- ansvisor/ansvisortheir own version, first seen Nov 8, 2026
- ai-search-guru/getcito-worlds-first-open-source-aio-aeo-or-geo-tooltheir own version, first seen Nov 8, 2026
- paulocsb/worldcup-fifa-pooltheir own version, first seen Nov 8, 2026
- srinator22/New-Projecttheir own version, first seen Nov 8, 2026
- Memolok/Claude-plugintheir own version, first seen Nov 6, 2026
- striderZA/OpenCodeGameStudiostheir own version, first seen Nov 4, 2026
Used with
Projects with it also use setup-engine, team-audio and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CoralGameSkillsetup-engine
Configure the project's game engine and version. Pins the engine in CLAUDE.md, detects knowledge gaps, and populates engine reference docs via WebSearch when the version is beyond the LLM's training data.
Also in 13 projects that use this
CoralGameSkillteam-audio
Orchestrate audio team: audio-director + sound-designer + technical-artist + gameplay-programmer for full audio pipeline from direction to implementation.
Also in 13 projects that use this
lilangMaxSkillcreate-stories
Break a single epic into implementable story files. Reads the epic, its GDD, governing ADRs, and control manifest. Each story embeds its GDD requirement TR-ID, ADR guidance, acceptance criteria, story type, and test evidence path. Run after /create-epics for each epic.
Also in 11 projects that use this
lilangMaxSkillstory-done
End-of-story completion review. Reads the story file, verifies each acceptance criterion against the implementation, checks for GDD/ADR deviations, prompts code review, updates story status to Complete, and surfaces the next ready story from the sprint.
Also in 11 projects that use this
- +5 more from CoralGame
- +3 more from lilangMax
Other versions130 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 130
- anthropics/knowledge-work-plugins★ 35ksame name
- Donchitos/Claude-Code-Game-Studios★ 27ksame name
- openai/plugins★ 7.8ksame name
- SterlingChin/marvin-template★ 1ksame name
- educlopez/ui-craft★ 441same name
- ai-search-guru/getcito-worlds-first-open-source-aio-aeo-or-geo-tool★ 432same name
- pixel-cellar/Claude-Code-Game-Studios★ 324same name
- ansvisor/ansvisor★ 233same name
- alexeykrol/claude-code-starter★ 194same name
- romarayt/raytsystem-public-os★ 140same name
120 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/setup/templates/AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/setup/templates/CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- brainstorming-extensionSkill
- create-issueSkill
- design-review-gateSkill
- external-toolsSkill
- handling-pr-commentsSkill
- handoffSkill
- migrateSkill
- orchestrated-executionSkill
- plan-review-gateSkill
- pr-shepherdSkill
- setupSkill
- statusSkill
- visual-reviewSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 9 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 117 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 128
After the Architect creates an implementation plan and before it reaches the Design Review Gate, the plan passes through the Plan Review …
- Very specific: line 136
All 3 must APPROVE before the plan proceeds.
- Distinctive: line 142
After design review approval, implementation follows the 4-phase execution loop per work unit.
- Distinctive: line 150
Before submitting to the Design Review Gate, the orchestrator runs a pre-flight checklist covering architecture, dependency graph, API …
- Distinctive: line 196
Final Comprehensive Review: After all work units pass, a cross-unit review catches integration issues that per-unit reviews miss.
- Very specific: line 204
When external AI CLI tools are configured (.metaswarm/external-tools.yaml), the orchestrator can delegate implementation and review tasks …
- Very specific: line 392
If the CI check is stale: gh workflow run gtg.yml -f pr_number=<PR_NUMBER>
- Very specific: line 396
When a PR is created via bin/create-pr-with-shepherd.sh, the script outputs instructions to start monitoring:
- Distinctive: line 402
Reports when ready: All CI green, all threads resolved
- Distinctive: line 506
Use the Task tool to spawn the Issue Orchestrator agent:
- Very specific: line 591
Every subagent_type below is a role type resolved per Role type resolution.
- Very specific: line 637
Use /prime (metaswarm knowledge priming).
- Very specific: line 656
After compaction or in a new session with an active plan: if bd is installed, bd prime (bd context).
- Distinctive: line 660
Run self-reflection to extract learnings:
- Distinctive: line 706
When to decompose: If an epic has more than 5-7 tasks or spans multiple domains (e.g., frontend + backend + schema), split into sub-epics.
- Distinctive: line 723
Before closing an epic, verify ALL:
“Common” is measured: kept by at least 6 in 10 of the 117 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
BEADS Multi-Agent Orchestration Skill
This skill coordinates a swarm of specialized AI agents to autonomously handle GitHub Issues from creation to merged PR.
Quick Start
Start Work on a GitHub Issue
# User triggers via any of:
@beads start #123
/beads-start 123Check BEADS Status
bd ready # Show tasks ready to work
bd list # Show all tasks
bd stats # Show project statistics
bd doctor # Check system healthAgent Roster
| Agent | Role | Spawned When |
| Issue Orchestrator | Main coordinator per Issue | Issue receives agent-ready label |
| Researcher Agent | Codebase exploration | Orchestrator creates research task |
| Architect Agent | Implementation planning | Research complete |
| Product Manager Agent | Use case & user benefit review | Design review gate (parallel) |
| Designer Agent | UX/API design review | Design review gate (parallel) |
| Security Design Agent | Security threat modeling | Design review gate (parallel) |
| CTO Agent | TDD readiness & plan review | Design review gate (parallel) |
| Coder Agent | TDD implementation | Design review gate approved |
| Code Review Agent | Internal code review | Implementation complete |
| Security Auditor | Security review (code) | Implementation complete |
| Release Engineer Agent | Safe delivery from merge through production | QA approves PR, PR reaches merge readiness |
| PR Shepherd | PR lifecycle management | PR created |
See ./agents/ directory for detailed agent definitions.
Design Review Gate (NEW)
For project-sized features (brainstorming sized the work as a project and committed its design doc; see ./guides/workflow-enforcement.md), an automatic Design Review Gate ensures quality before implementation:
Project-Sized Design Doc Committed
│
▼
┌─────────────────────────────────────────────────┐
│ DESIGN REVIEW GATE │
│ │
│ Spawns in PARALLEL: │
│ • Architect Agent (technical architecture) │
│ • Designer Agent (UX/API design) │
│ • UX Reviewer (user flows, integration WUs) │
│ • CTO Agent (TDD readiness) │
│ │
│ ALL must approve to proceed │
└─────────────────────────────────────────────────┘
│
├── Any NEEDS_REVISION? → Iterate on design (severity-gated, cap 10 rounds)
│
ALL APPROVED
│
▼
Create BEADS Epic → Begin ImplementationTriggering the Design Review Gate
The gate is automatically triggered when brainstorming writes and commits a project-sized design doc (see ./guides/workflow-enforcement.md):
- A project-sized design doc is committed to
docs/plans/*-design.mdordocs/superpowers/specs/*-design.md - User runs
/review-design <path-to-design.md>
Review Criteria by Agent
| Agent | Focus Areas |
| Product Manager | Use case clarity, user benefits, scope, success metrics |
| Architect | Service architecture, dependencies, patterns, integration |
| Designer | API design, UX flows, developer experience, consistency |
| Security Design | Threat modeling, auth/authz, data protection, OWASP Top 10 |
| UX Reviewer | User flows, text wireframes, integration WUs, empty/error states |
| CTO | TDD readiness, codebase alignment, completeness, risks |
Iteration Protocol
- Severity-gated iteration (cap 10 rounds; see
./guides/delivery-scope.md): onlyblocker: yesfindings keep the loop going; minor/nit findings become follow-ups - Each iteration: revise design → re-run all reviewers
- Escalation options: Revise / Narrow scope / Defer / Cancel. Escalation never approves: a revised design gets a fresh review round
See the design-review-gate skill for full details.
Team Mode Coordination
When multiple Claude Code sessions are active on the same repository (e.g., parallel worktrees), metaswarm automatically enters Team Mode. In Team Mode, agents behave as persistent teammates with context retention across sessions and direct inter-agent messaging for coordination. Mode detection is automatic based on the presence of concurrent sessions.
For the full Team Mode protocol — including message routing, context sharing, and conflict resolution — see ./guides/agent-coordination.md.
Plan Review Gate
After the Architect creates an implementation plan and before it reaches the Design Review Gate, the plan passes through the Plan Review Gate. Three adversarial reviewers validate the plan independently:
| Reviewer | Focus |
| Feasibility | Technical viability, dependency risks, resource constraints |
| Completeness | Missing work units, untested edge cases, gaps in Definition of Done |
| Scope & Alignment | Plan stays within issue scope, aligns with codebase conventions |
All 3 must APPROVE before the plan proceeds. See the plan-review-gate skill for the full skill definition.
Orchestrated Execution
After design review approval, implementation follows the 4-phase execution loop per work unit. This replaces the previous linear "implement then review" flow with rigorous independent validation and adversarial review.
Core Principle
Trust nothing. Verify everything. Review adversarially.
Plan Validation (Pre-Flight)
Before submitting to the Design Review Gate, the orchestrator runs a pre-flight checklist covering architecture, dependency graph, API contracts, security, UI/UX, and external dependencies. This catches structural issues (missing service layer, wrong dependency graph, oversized WUs) before spending agent cycles on review.
The 4-Phase Loop
For each work unit (a discrete, spec-driven change with DoD items):
- IMPLEMENT — Coding subagent executes against the spec using TDD, with the Project Context Document
- VALIDATE — Orchestrator independently runs quality gates (tsc, eslint, vitest, coverage enforcement from
.coverage-thresholds.json). Never trust subagent self-reports. Quality gates are blocking state transitions, not advisory. - ADVERSARIAL REVIEW — Fresh review subagent checks against spec contract. Binary PASS/FAIL with file:line evidence. Uses
adversarial-review-rubric.md. When external tools are configured, cross-model review ensures the writer is always reviewed by a different AI model (see External Tools section below). - COMMIT — Only after adversarial PASS. Updates
SERVICE-INVENTORY.mdand Project Context Document.
On FAIL: fix → re-validate → spawn fresh reviewer (role type roleType("adversarial-reviewer"); severity-gated iteration, cap 10 rounds; see ./guides/delivery-scope.md → escalate to human when the rule says so). There is NO path from FAIL to COMMIT without passing through the retry loop.
When to Use Orchestrated Execution
- The task has a written spec with enumerable Definition of Done items
- The implementation involves multiple work units (3+ logical changes)
- You need independent verification — subagent self-reports aren't sufficient
- The changes are high-stakes (schema changes, security, new architectural patterns)
- You want proactive human checkpoints at planned review points
When NOT to Use It
- Single-file bug fixes or copy changes
- Tasks without a written spec or DoD items
- Quick prototyping or exploratory work
- Tasks where the overhead of decomposition exceeds the work itself
For simple tasks, the standard linear flow (implement → code review → PR) works fine.
Key Concepts
Work Unit Decomposition: Break the implementation plan into discrete work units, each with:
- A spec section and enumerated DoD items
- A declared file scope (which files it may modify)
- Dependencies on other work units
- An optional human checkpoint flag
Independent Validation: The orchestrator runs tsc, eslint, and vitest directly — it does NOT ask the coding subagent "did the tests pass?" and accept the answer.
Adversarial Review: Fundamentally different from collaborative code review. The reviewer is an independent auditor checking spec compliance, not a helpful colleague suggesting improvements. Binary PASS/FAIL verdict. Evidence required (file:line references).
Fresh Reviewer Rule: On re-review after FAIL, a NEW reviewer instance (role type roleType("adversarial-reviewer")) is spawned with no memory of the previous review. This prevents anchoring bias.
Human Checkpoints: Planned pauses at critical boundaries (schema changes, security code, first use of new patterns). The orchestrator waits for explicit human approval before continuing.
Final Comprehensive Review: After all work units pass, a cross-unit review catches integration issues that per-unit reviews miss.
See orchestrated-execution skill for the complete pattern, including work unit structure, parallel execution, recovery protocol, and anti-patterns.
External AI Tools (Optional)
When external AI CLI tools are configured (.metaswarm/external-tools.yaml), the orchestrator can delegate implementation and review tasks to OpenAI Codex CLI and Google Gemini CLI. This enables cost savings through cheaper models and cross-model adversarial review that eliminates single-model blind spots.
How It Integrates
External tools slot directly into the existing 4-phase execution loop:
- Phase 1 (IMPLEMENT): The orchestrator may delegate to an external tool instead of spawning a Claude subagent. The tool works in an isolated git worktree.
- Phase 2 (VALIDATE): Unchanged — the orchestrator independently runs all quality gates regardless of who implemented.
- Phase 3 (ADVERSARIAL REVIEW): Cross-model review — the writer is always reviewed by a different model (e.g., Codex writes, Gemini + Claude review).
- Phase 4 (COMMIT): Unchanged — merge worktree branch after all phases pass.
Escalation Chain
The orchestrator adapts based on tool availability:
| Available Tools | Escalation Chain | Max Attempts |
| Both Codex + Gemini | A(2) → B(2) → Claude(1) → user | 5 |
| One tool only | Tool(2) → Claude(1) → user | 3 |
| No tools | Claude → user (existing behavior) | unchanged |
Each escalated model receives the previous model's branch as a reference. See the external-tools skill for the full skill definition.
Health Check
/external-tools-healthChecks installation, authentication, and reachability of all configured adapters.
Visual Review
The visual-review skill enables agents to take screenshots of web pages, presentations, and UIs using Playwright for visual inspection. This bridges the gap where agents cannot see rendered output.
Usage
The skill is triggered when tasks involve visual output (web UIs, Reveal.js presentations, landing pages, email templates). It captures screenshots at configurable viewport sizes, and agents analyze them for layout, typography, colors, spacing, and content issues.
Prerequisites
npx playwright install chromiumFor remote/headless environments, the skill serves screenshots via HTTP file server so users can view them in their local browser.
See the visual-review skill for the complete workflow.
Workflow Overview
GitHub Issue #123 (agent-ready label)
│
▼
┌─────────────────────────────────────┐
│ Issue Orchestrator │
│ Creates BEADS epic, delegates work │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Research Phase │
│ Researcher Agent explores codebase │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Planning Phase │
│ Architect Agent creates plan │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Plan Review Gate │
│ 3 adversarial reviewers: │
│ Feasibility, Completeness, │
│ Scope & Alignment │
│ ALL 3 must approve │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ External Dependency Detection │
│ Scans spec for API keys/creds │
│ Prompts user to configure them │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Plan Validation (Pre-Flight) │
│ Architecture, deps, API contracts │
│ Security, UI/UX, external deps │
└─────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────────────┐
│ DESIGN REVIEW GATE (PARALLEL) │
│ │
│ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐ ┌───────┐ │
│ │ PM │ │ Architect│ │ Designer │ │ Security │ │UX Revw.│ │ CTO │ │
│ │(users) │ │ (tech) │ │ (UX/API) │ │ (threats)│ │(flows) │ │ (TDD) │ │
│ └─────────┘ └──────────┘ └──────────┘ └──────────┘ └────────┘ └───────┘ │
│ │
│ ALL SIX must approve (severity-gated iteration, cap 10 rounds) │
└──────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Work Unit Decomposition │
│ Break plan into work units w/ DoD │
│ Build dependency graph │
└─────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────┐
│ ORCHESTRATED EXECUTION LOOP (per work unit) │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────┐ ┌──────┐ │
│ │IMPLEMENT │───→│ VALIDATE │───→│ ADVERSARIAL │──→│COMMIT│ │
│ │(Coder) │ │(Orchest.)│ │ REVIEW │ │ │ │
│ └──────────┘ └──────────┘ └──────┬───────┘ └──────┘ │
│ ▲ │ FAIL │
│ └─────────────────────────────────┘ │
│ │
│ Trust nothing. Verify everything. Review adversarially. │
└───────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Final Comprehensive Review │
│ Cross-unit integration check │
│ Full test suite + type check │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ PR Creation (Auto-Shepherd) │
│ bin/create-pr-with-shepherd.sh │
│ → Auto-invokes pr-shepherd skill │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ PR Shepherd (Automatic) │
│ Monitors CI, handles reviews, │
│ resolves threads automatically │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Human Approval & Merge │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Release Engineer │
│ Pre-merge verify → merge → CI → │
│ deploy → post-deploy QA → release │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Close Epic & Extract Learnings │
└─────────────────────────────────────┘GTG (Good-To-Go) Merge Gate
GTG is the final merge gate. It consolidates CI status, comment classification, and thread resolution into a single deterministic check. Agents should use it as the primary readiness signal:
# Check if PR is ready to merge
gtg <PR_NUMBER> --format json \
--exclude-checks "Merge Ready (gtg)" \
--exclude-checks "CodeRabbit" \
--exclude-checks "Cursor Bugbot" \
--exclude-checks "claude"Statuses: READY (merge), ACTION_REQUIRED (fix comments), UNRESOLVED_THREADS (resolve threads), CI_FAILING (fix CI). The action_items array tells agents exactly what to fix.
GTG reports, agents act: GTG does not resolve threads or fix code. After addressing feedback, agents must resolve threads themselves via the GraphQL mutation documented in handle-pr-comments.md (Section 3: Resolving Review Threads). GTG will report READY on the next check once threads are resolved.
If the CI check is stale: gh workflow run gtg.yml -f pr_number=<PR_NUMBER>
Automatic PR Review Cycles
When a PR is created via bin/create-pr-with-shepherd.sh, the script outputs instructions to start monitoring:
- Creates the PR with proper title/body
- Start pr-shepherd using
/pr-shepherd <pr-number> - PR Shepherd monitors: CI status, review comments, thread resolution
- Auto-fixes: Lint, type errors, test failures in your code
- Reports when ready: All CI green, all threads resolved
For manually-created PRs, invoke /pr-shepherd <pr-number> to start the monitoring cycle.
BEADS Commands Reference
Issue Management
# Create epic for GitHub Issue
bd create "Feature: User Auth" --type epic --external-ref gh-123
# Create task under epic
bd create "Research auth patterns" --type task --parent bd-abc123
# Add dependency
bd dep add <blocked-task> <blocking-task>
# Update status
bd update <task-id> --status open|in_progress|blocked|closed
# Close with reason
bd close <task-id> --reason "Completed successfully"Task Discovery
# Show ready (unblocked) tasks
bd ready --json
# List all tasks under epic
bd list --parent <epic-id>
# Show blocked tasks
bd blocked
# Show task details
bd show <task-id> --jsonLabels for Custom States
# Waiting for human input
bd label add <task-id> waiting:human
# Waiting for CI
bd label add <task-id> waiting:ci
# Agent failed, needs intervention
bd label add <task-id> agent:failed
# Review iteration tracking
bd label add <task-id> review:iteration-1Sync Operations
# Check version-control status (branch and uncommitted changes)
bd vc status
# If a Dolt remote is configured: pull updates (local-only workspaces need no sync)
bd dolt pull
# If a Dolt remote is configured: push your changes (local-only workspaces need no sync)
bd dolt push
# Export to JSONL
bd exportStarting Work on an Issue
Step 1: Verify Issue is Ready
# Check Issue has agent-ready label
gh issue view 123 --json labels | jq '.labels[].name' | grep agent-readyStep 2: Create BEADS Epic
# Get Issue details
ISSUE=$(gh issue view 123 --json title,body,number)
# Create epic linked to Issue
bd create "$(echo $ISSUE | jq -r .title)" --type epic --external-ref gh-123 --jsonStep 3: Post Acknowledgment
gh issue comment 123 --body "🤖 Agent claiming this issue. BEADS epic created."Step 4: Spawn Issue Orchestrator
Use the Task tool to spawn the Issue Orchestrator agent:
Task({
subagent_type: roleType("issue-orchestrator"),
description: "Issue Orchestrator for #123",
prompt: `You are the ISSUE ORCHESTRATOR agent.
Read the agent definition at:
./agents/issue-orchestrator.md
Your task:
- Epic ID: <epic-id>
- GitHub Issue: #123
- Begin the orchestration workflow
Follow the workflow phases exactly as specified.`,
});Human Escalation Protocol
When to Escalate
- Ambiguous Requirements: Issue lacks clarity
- Conflicting Constraints: Can't satisfy all requirements
- Risk Decision: Security or data concerns
- Blocked > 1 Hour: External dependency needed
- Severity Rule Escalates: Review cap of 10 rounds hit, or a blocker recurs or is disputed (see
./guides/delivery-scope.md)
How to Escalate
Severity-rule escalations never use this template. When a review gate escalates (the 10-round cap, or a recurring or disputed blocker), still mark the task waiting (bd update <task-id> --status blocked and bd label add <task-id> waiting:human), then post the Review Escalation report from the Escalation template in ./guides/delivery-scope.md instead. Its options are Revise, Narrow scope, Defer and Cancel, and any revised or narrowed work gets a fresh review round that it must pass. There is no @beads approve for an escalated review gate: escalation never approves.
For triggers 1-4:
# Mark task as waiting
bd update <task-id> --status blocked
bd label add <task-id> waiting:human
# Post to GitHub Issue
gh issue comment <number> --body "$(cat <<'EOF'
## 🤖 Agent Request: <type>
**Task**: <task-id>
**Question**: <clear question>
### Options
1. **Option A**: <description>
2. **Option B**: <description>
### Agent Recommendation
<recommendation>
---
Reply: `@beads approve <task-id>` or `@beads respond <task-id> <option>`
EOF
)"Human Response Patterns
@beads approve unblocks a task waiting on triggers 1-4. It is never for an escalated review gate, which passes only by a fresh review round.
# Approve a blocked task
@beads approve bd-abc123
# Respond with choice
@beads respond bd-abc123 "Use option A"
# Request changes
@beads request-changes bd-abc123 "Need more error handling"
# Defer to later
@beads defer bd-abc123 "Discuss in Monday standup"Agent Spawning Patterns
Every subagent_type below is a role type resolved per Role type resolution.
Sequential Spawning
// Spawn Researcher first
const researchResult = await Task({
subagent_type: roleType("researcher"),
description: "Research for issue #123",
prompt: researcherPrompt,
});
// Then spawn Architect with research output
const planResult = await Task({
subagent_type: roleType("planner"),
description: "Planning for issue #123",
prompt: architectPrompt + researchResult,
});Parallel Spawning
// Spawn Code Review and Security Audit in parallel
const [reviewResult, securityResult] = await Promise.all([
Task({
subagent_type: roleType("adversarial-reviewer"),
description: "Code review for #123",
prompt: codeReviewPrompt, // role: code reviewer, stated in the prompt
}),
Task({
subagent_type: roleType("adversarial-reviewer"),
description: "Security audit for #123",
prompt: securityAuditPrompt, // role: security auditor, stated in the prompt
}),
]);Knowledge Integration
CRITICAL: Prime Before Starting Work
ALL agents MUST prime their context before starting ANY work. This prevents bad assumptions and ensures alignment with established patterns.
Use /prime (metaswarm knowledge priming). It filters the knowledge base (.beads/knowledge/*.jsonl) with jq, by keyword (over each fact and its tags), by file (over its affected files) and by work type (over its fact type):
/prime # MUST FOLLOW rules + gotchas
/prime src/lib/services/ src/api/routes/ # files you'll modify
/prime authentication jwt # a topic
/prime planning # work type: planning, implementation, review, research
/prime <topic> <files> <work-type> # combined (most thorough)See commands/prime.md for the exact jq filters. /prime reports the relevant facts categorized as:
- MUST FOLLOW: Critical rules (NEVER/ALWAYS/MUST statements)
- GOTCHAS: Common pitfalls to avoid
- PATTERNS: Best practices for this codebase
- DECISIONS: Architectural choices
Context Recovery
After compaction or in a new session with an active plan: if bd is installed, bd prime (bd context); then read .beads/plans/active-plan.md and .beads/context/*.md; then /prime for knowledge.
After Completing Work
Run self-reflection to extract learnings:
# Fetch recent PR comments (metaswarm-specific GitHub integration)
GITHUB_TOKEN=$(gh auth token) npx tsx scripts/beads-fetch-pr-comments.ts --days 7
# Use self-reflect skill to evaluate and add learnings
/self-reflectOr spawn Knowledge Curator agent:
Task({
subagent_type: roleType("knowledge-curator-agent"),
description: "Extract learnings from epic",
prompt: `Review completed epic <epic-id> and extract learnings.
FIRST: Run \`/prime\` (metaswarm knowledge priming) for review work on this epic.
Then analyze:
- What patterns were used?
- What gotchas were discovered?
- What should future agents know?
Use the knowledge capture service to store learnings.`,
});Recursive Orchestration
For large epics, orchestrators can spawn sub-orchestrators. The pattern:
Epic (Issue Orchestrator)
├── Sub-Epic A (Sub-Orchestrator)
│ ├── Task A1
│ └── Task A2
├── Sub-Epic B (Sub-Orchestrator)
│ ├── Task B1
│ └── Task B2
└── Integration Task (blocked by A + B)When to decompose: If an epic has more than 5-7 tasks or spans multiple domains (e.g., frontend + backend + schema), split into sub-epics.
# Create sub-epics under parent epic
bd create "Sub-Epic: API layer" --type epic --parent <parent-epic-id>
bd create "Sub-Epic: UI components" --type epic --parent <parent-epic-id>
# Each sub-epic gets its own orchestrator
# The parent orchestrator coordinates completionEach sub-epic's orchestrator follows the same workflow (research → plan → review → implement → PR) independently. The parent orchestrator monitors progress and coordinates the final integration.
Success Criteria Checklist
Before closing an epic, verify ALL:
- Plan validation (pre-flight) passed before design review
- External dependencies identified and user prompted for credentials
- Work units decomposed with DoD items and file scopes
- Each work unit passed the 4-phase execution loop
- All quality gates enforced as blocking state transitions (no advisory skips)
- Coverage thresholds met per
.coverage-thresholds.json - All adversarial reviews resulted in PASS (with fresh reviewer on re-review)
SERVICE-INVENTORY.mdupdated with all new services/factories/modules- Project Context Document maintained and passed to each coder subagent
- Final comprehensive review completed (cross-unit integration)
- All human checkpoints acknowledged
- All BEADS tasks under epic are closed
- PR is created and linked to GitHub Issue
- All CI checks are passing
- All PR comments are addressed
- All PR threads are resolved
- Human has approved merge
- PR is merged to main
- GitHub Issue is closed
- Learnings extracted to knowledge base
Troubleshooting
Task Stuck in Progress
# Check task status
bd show <task-id> --json
# Check for orphaned agent
# If agent failed, reset and retry
bd update <task-id> --status open
bd label remove <task-id> agent:failedCircular Dependencies
# Run doctor to detect
bd doctor
# If found, restructure dependencies
bd dep remove <task1> <task2>BEADS Sync Issues
# Check version-control status (branch and uncommitted changes)
bd vc status
# Force export
bd export
# If a Dolt remote is configured: pull the latest (local-only workspaces need no sync)
bd dolt pullDirectory Structure
skills/start/ # This skill (main orchestration)
├── SKILL.md # This file
├── agents/ # Agent definitions
│ ├── issue-orchestrator.md # Main coordinator (runs 4-phase loop)
│ ├── researcher.md # Codebase exploration
│ ├── architect-agent.md # Implementation planning
│ ├── product-manager-agent.md # Use case & user benefit review
│ ├── designer-agent.md # UX/API design review
│ ├── security-design-agent.md # Security threat modeling
│ ├── cto-agent.md # TDD readiness review
│ ├── coder.md # TDD implementation
│ ├── adversarial-reviewer.md # Internal code review (collaborative + adversarial modes)
│ ├── security-auditor-agent.md # Security review (implementation)
│ ├── release-engineer-agent.md # Merge → deploy → verify → release
│ └── pr-shepherd-agent.md # PR lifecycle management
├── guides/ # Development guides
│ ├── agent-coordination.md # Team Mode, inter-agent messaging
│ ├── git-workflow.md # Branch naming, commit conventions
│ ├── testing-patterns.md # TDD workflow, mock strategies
│ ├── coding-standards.md # Language idioms, naming conventions
│ ├── worktree-development.md # Parallel development with worktrees
│ └── build-validation.md # Pre-push checks, CI pipeline
├── rubrics/ # Review rubrics
│ ├── plan-review-rubric.md # Used by CTO Agent
│ ├── code-review-rubric.md # Used by Code Review Agent (collaborative mode)
│ ├── adversarial-review-rubric.md # Used by Code Review Agent (adversarial mode)
│ ├── security-review-rubric.md # Used by Security Auditor Agent
│ └── release-engineering-rubric.md # Used by Release Engineer Agent
└── references/ # Reference docs for other tools
├── codex-tools.md # OpenAI Codex CLI reference
├── cursor-tools.md # Cursor tools reference
└── opencode-tools.md # OpenCode tools reference
skills/orchestrated-execution/ # 4-phase execution loop pattern
└── SKILL.md
skills/design-review-gate/ # Design review gate orchestrator
└── SKILL.md
skills/brainstorming-extension/ # Hooks brainstorming to review gate
└── SKILL.md
skills/plan-review-gate/ # 3 adversarial reviewers validate plans
└── SKILL.md
skills/external-tools/ # External AI tool delegation
├── SKILL.md
├── adapters/
│ ├── _common.sh # Shared adapter helpers (14 functions)
│ ├── codex.sh # OpenAI Codex CLI adapter
│ └── gemini.sh # Google Gemini CLI adapter
└── rubrics/
└── external-tool-review-rubric.md # Used by cross-model adversarial review
skills/visual-review/ # Playwright-based visual review
└── SKILL.md
commands/ # Slash commands (invoked as /metaswarm:command-name)
├── start-task.md # /metaswarm:start-task
├── prime.md # /metaswarm:prime
├── review-design.md # /metaswarm:review-design
├── self-reflect.md # /metaswarm:self-reflect
├── pr-shepherd.md # /metaswarm:pr-shepherd
├── handle-pr-comments.md # /metaswarm:handle-pr-comments
├── create-issue.md # /metaswarm:create-issue
└── metaswarm-setup.md # /metaswarm:metaswarm-setup
templates/ # Project scaffolding templates
├── CLAUDE.md # Full CLAUDE.md template for new projects
├── CLAUDE-append.md # Metaswarm section to append to existing CLAUDE.md
├── UI-FLOWS.md # User flow and wireframe documentation template
├── gitignore # Standard Node.js/TypeScript ignores
├── SERVICE-INVENTORY.md # Service/factory/module tracking template
└── ci.yml # CI pipeline template
.beads/ # Runtime state (in user's project)
├── beads.db # SQLite database
├── issues.jsonl # Issue/task data
└── knowledge/ # Curated learnings
├── codebase-facts.jsonl
├── patterns.jsonl
└── anti-patterns.jsonlDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

