run-epic
Execute an epic plan phase-by-phase, inline by default with opt-in worker spawns per task annotation
What this skill does
# Devloop Run Epic
Execute an epic phase-by-phase. Tasks run inline by default; subagents are spawned per task `[model:X]` annotation (same pattern as `/devloop:run`). **You are the orchestrator -- execute the phase, validate tests, commit, promote the next phase.**
## Step 1: Load State
Read `.devloop/epic.json`.
- **No file**: "No epic found. Use `/devloop:epic <topic>` to create one." STOP.
- **`--status`**: Display phase tracker and STOP.
- **`status: "complete"`**: "Epic already complete." STOP.
- **`--phase N`**: Override current phase and re-promote.
## Step 2: Validate Plan
Read `.devloop/plan.md`. Verify `**Phase**:` matches `epic.json.current_phase`.
- Mismatch or missing: run `${CLAUDE_PLUGIN_ROOT}/scripts/promote-phase.sh --force`.
- All tasks `[x]`: skip to Step 5 (already completed).
## Step 3: Execute Phase
Read `epic.json` for context (user_stories, invariants, negative_cases, test_command). Keep this context in working memory while executing the phase.
**Execute plan.md tasks inline**, following the same model-annotation pattern as `/devloop:run`:
- **`[model:haiku]` tasks**: spawn `devloop:haiku-worker`.
- **`[model:sonnet]` tasks**: spawn `devloop:swarm-worker` (sonnet).
- **No annotation**: execute inline (no subagent). This is the default — most tasks should be inline.
- Respect `[depends:N.M]` constraints and `[parallel:X]` groupings.
- Do NOT commit or modify epic.json/epic.md during execution (that's Step 5).
Use the epic context to guide your work:
- User stories anchor WHY the tasks exist.
- Invariants / negative cases are testable constraints that must hold.
- Run `test_command` after implementation tasks.
**Fallback (opt-in only)**: If the phase is very large (>15 tasks) *and* session context is already heavy, you MAY delegate the whole phase to a single sonnet subagent in a fresh context. This is a last-resort fresh-context reset, not the default path.
## Step 4: Validate Completion
1. Run `${CLAUDE_PLUGIN_ROOT}/scripts/check-plan-complete.sh .devloop/plan.md`.
- Incomplete: **AskUserQuestion**: "Retry" or "Skip remaining".
2. Run tests (unless `--skip-tests` or `test_command` is null).
Use Monitor for real-time streaming when `test_command` matches a known long-running pattern
(test suites: `npm test`, `pytest`, `go test`, `cargo test`, etc.; builds; full-codebase linting).
Example:
```
Monitor({ description: "epic phase tests", command: "<test_command> 2>&1 | grep --line-buffered -E 'PASS|FAIL|Error|ok|error|passed|failed'", timeout_ms: 300000, persistent: false })
```
Fallback: if Monitor errors, run `test_command` with Bash directly.
- Fail: **AskUserQuestion**: "Fix and retry" or "Skip tests".
## Step 5: Commit & Advance
1. Commit: `git add` changed files, commit with `feat: phase N -- phase-name`.
2. Update `epic.json`: mark phase `"complete"`, record commit hash, increment `current_phase`.
3. Update `epic.md` Phase Tracker table.
4. If all phases complete: Report done. **AskUserQuestion**: "Ship it" or "Review". STOP.
5. Promote next phase: run `${CLAUDE_PLUGIN_ROOT}/scripts/promote-phase.sh --force`.
Report:
```
Phase N complete and committed.
Phase M loaded: "Phase Name" (X tasks)
```
## Step 6: Pause Point
The next phase is already loaded in plan.md. **AskUserQuestion**:
- **Continue now**: Loop to Step 3 in the same session.
- **Clear and run**: "Run `/clear`, then `/devloop:run-epic` to execute Phase M." STOP.
## Recovery
`run-epic` is resumable. `epic.json` is the source of truth:
- Mid-phase: plan.md has partial progress, execution picks up remaining tasks.
- Post-phase: detects plan complete, skips to validation.
- After `/clear`: reads epic.json, resumes from correct phase.
If the repo is in a broken state (e.g. orphaned changes, mismatched plan), run-epic will detect the mismatch in Step 2 and re-promote the correct phase. Tests in Step 4 catch implementation issues before committing.
---
**Now**: Load epic state and begin.
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.