一键导入
epic-run
Autonomous end-to-end epic execution: plans stories, develops each story sequentially, then closes the epic. Only pauses for promotion to main.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Autonomous end-to-end epic execution: plans stories, develops each story sequentially, then closes the epic. Only pauses for promotion to main.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Process all open Dependabot PRs and security alerts: review changelogs, merge passing PRs, fix failing ones, remediate orphan alerts, and surface adoption opportunities.
Full development cycle for one or more user stories and/or bug fixes. Covers implementation, testing, PR, review, merge, and user verification — single items or batched into one PR.
Close an epic: refinement, E2E validation, UAT, documentation, and promotion from beta to main. Use after all stories in an epic are merged to beta.
Promote beta to main: branch sync, promotion PR, CI gate, user approval loop, documentation, merge. Works standalone or as part of /epic-close.
Comprehensive PR review using the full agent team. Reviews for duplicates, suspicious changes, dependency changes, architecture violations, and spec compliance. Approves or rejects with consolidated findings.
Iteratively fix failing E2E tests from a CI run. Analyzes failures, plans fixes, implements them, pushes, and repeats until all E2E tests pass.
| name | epic-run |
| description | Autonomous end-to-end epic execution: plans stories, develops each story sequentially, then closes the epic. Only pauses for promotion to main. |
You are the orchestrator running an entire epic lifecycle autonomously. This skill chains planning (/epic-start), development (/develop per story), and closing (/epic-close) into a single session. Follow these phases in order. Do NOT skip phases.
When to use: Executing a complete epic end-to-end in a single session. Only pauses for beta → main promotion.
When NOT to use: When you want to run individual phases separately (use /epic-start, /develop, /epic-close).
Delegation principle: Each phase delegates to the corresponding sub-skill's steps. When this skill says "Execute /develop steps 2–11", read and follow those exact steps from the /develop skill file (.claude/skills/develop/SKILL.md). Do not re-implement or paraphrase them.
$ARGUMENTS contains either:
If empty, ask the user to describe the epic or provide an issue number before proceeding.
Each story has a retry budget of 3. The counter increments when:
/develop) requires re-launching an implementation agent/develop) requires a full spec→implement→commit cycleAt 3 failed retries:
Merged PRs and closed issues are durable state. If the session crashes:
/epic-run on the same epic/develop then re-run /epic-runUse tasks to track progress across the entire epic lifecycle. Tasks survive context compression — after any compression event, run TaskList to recover your place.
Phase 0 — create these tasks immediately:
After story queue is built — create one task per story:
4–N. Story #<number>: <title> — Full /develop cycle for this story
After all stories complete — create closing tasks:
Progress rule: Before starting each step, mark its task in_progress. After completing, mark it completed. If a step is skipped, mark it completed with a note.
Recovery rule: If you lose track of progress (e.g., after context compression), run TaskList to see which tasks are completed and resume from the first pending task.
Dynamic task rule: When fix loops, UAT rounds, or E2E fix cycles start, create a new task for each round so iterations are tracked.
Fetch and rebase the worktree branch onto origin/beta:
git fetch origin beta && git rebase origin/beta
git submodule update --init wiki && git -C wiki pull origin master
Maintain these variables throughout the session:
storyQueue — ordered list of story issue numbers to develop (topologically sorted by dependencies)completedStories — stories successfully merged to betafailedStories — stories that exhausted their retry budgetepicIssueNumber — the epic's GitHub Issue number/epic-start)Execute /epic-start steps 3–5 (Product Owner, Product Architect, Present to User). Steps 1–2 (Rebase, Wiki Sync) are already handled by Phase 0.
Specifically:
Execute /epic-start step 3 (Plan: Product Owner) — launches the PO agent to create the epic issue, decompose into stories, link sub-issues, set board statuses, and post acceptance criteria.
Execute /epic-start step 4 (Plan: Product Architect) — launches the architect agent to design schema/API/ADRs and update wiki pages.
Execute /epic-start step 5 (Present to User) — post the plan as a comment on the epic issue and present it to the user. Skip the step 6 handoff instructions (the user is not invoking /develop manually — Phase 2 handles it).
After both agents complete:
addBlockedBy relationshipsstoryQueuePost the execution order as a comment on the epic issue and proceed immediately to Phase 2.
/develop)For each story in storyQueue:
gh issue view <story-number> --json state --jq '.state'
If the story is already CLOSED, add it to completedStories and skip to the next story. This enables session recovery.
Post a status comment on the epic issue:
gh issue comment <epic-number> --body "**[orchestrator]** Starting story #<number> — <title> ($(echo $completedStories | wc -w) of $(echo $storyQueue | wc -w) complete)"
Create a fresh branch from the latest beta for each story:
git fetch origin beta
git checkout -B feat/<issue-number>-<short-description> origin/beta
Note: This replaces /develop step 1 (Rebase) and step 4 (Branch). The branch is created directly from origin/beta rather than renaming the worktree branch — since /epic-run processes multiple stories sequentially, each needs a fresh branch.
/develop steps 2–11Execute /develop steps 2 through 11 for the current story, using single-item mode throughout:
beta/exit — the session continues with the next story.After step 11 completes, add the story to completedStories.
If any stories in storyQueue had addBlockedBy dependencies on the just-completed story, verify they are now unblocked and ready for development.
After every 4 completed stories, post a lean progress summary on the epic issue:
gh issue comment <epic-number> --body "**[orchestrator]** Progress: <N>/<total> stories complete. Completed: #X, #Y, #Z, #W. Remaining: <count>. Failed: <count or none>."
/epic-close)If failedStories is non-empty, ask the user: proceed with completed stories only, retry failures, or abort. Note excluded stories for inclusion in the promotion PR body.
/epic-close steps 2–7Execute /epic-close steps 2 through 7 in order. Step 1 (Rebase) is skipped — the worktree is already on the latest beta from the story loop.
/release) — handles branch sync, promotion PR, CI gate, mandatory human gate with autonomous feedback fix loop, documentation, lessons learned, merge & post-mergeIf any step in /epic-close references "failed stories" or "excluded stories", use the failedStories list from Phase 2.