thermiteau/maverick-claude/do-epic
Claude Code and agent skill by thermiteau/maverick-claude
- community
Checking that the SKILL.md file is still in the repository.
Work on a multi-story GitHub epic end-to-end. Builds a DAG from the child stories, groups them into waves, runs waves in parallel via per-story worktrees, ejects PRs that fail agent-code-review for human handling, and propagates blocks to downstream stories. Requires git worktrees.
Install
npx vskill@latest install thermiteau/maverick-claude/do-epicSKILL.md
The same SKILL.md was published earlier as thermiteau/maverick-claude/do-epic.
Work on GitHub Epic (Autonomous, DAG-scheduled)
Work on epic issue $ARGUMENTS end-to-end. Builds a dependency DAG from the epic's child stories, schedules them into waves, runs each wave in parallel via per-story worktrees, and drives every story through agent code review with binary PASS/FAIL verdicts.
Preflight (mandatory)
Run this first. If it exits non-zero, halt and report the stderr output to the user verbatim. Do not claim, do not branch, do not start any worktree.
The check verifies: the project is initialised, the Maverick GitHub App is configured (maverick gh-app status reports configured: true), git worktrees are usable, and required tools (gh, git, uv) are on PATH. PR code review runs locally inside each story's worktree as the agent-code-reviewer subagent (delegated from do-issue-solo Phase 9). For epics that fan out across many parallel workers, consider opting into the CI-side re-run described in mav-bp-remote-code-review so the merge is gated by an independent check even if a worker's local review fails to fire — that workflow is optional and not enforced by preflight.
Before You Begin
$ARGUMENTS must be the GitHub issue number of a Maverick epic — an issue whose body contains a task table of child stories. If it is a single story, dispatch do-issue-solo instead.
Phase 0: Coordination
- Resolve repo:
gh repo view --json nameWithOwner. - Cold-start hydrate per
mav-durability-on-gh:
- Read the
maverick-dagmarker on the epic. - Read the
maverick-statemarker. - Read the
maverick-bpropmarker — if present, **resume block
propagation first** before continuing.
- Read open PRs for the epic's child-story branches.
- Decide claim scope:
- Whole epic if no live claim exists.
- A specific wave if another instance already holds other stories.
- Single story if another instance holds the epic but not the story
you were asked about.
- Claim:
uv run maverick coord claim <repo> $ARGUMENTS --scope <csv-of-issues>.
On ClaimRejected, abort and report per mav-multi-instance-coordination.
- Start heartbeat daemons for every issue in the claim scope. Each
daemon exits on its own when the matching claim is released; check liveness anytime with coord heartbeat-status: ``bash for issue in <epic> <story1> <story2> …; do uv run maverick coord heartbeat-loop <repo> $issue --daemonize done ` Never background the foreground loop with &` — a process backgrounded from a tool shell dies with the shell or leaks unobservably.
- Release on exit is automatic. The plugin's SessionEnd hook runs
coord release-all, releasing every claim this instance recorded — the matching heartbeat-loop processes detect the cleared labels and exit on their own; lease expiry covers machine death. Your only explicit releases are the per-story ones at workflow boundaries (merged / ejected). Do not attempt trap-on-exit wrappers — each Bash call is a fresh shell, so a trap cannot survive to session end.
Phase 1: Design + task decomposition (if needed)
If the epic does not yet have a solution design:
- Dispatch
agent-issue-analystwith the epic issue. - Dispatch
agent-github-issue-planner— the planner will
create child stories as sub-issues (per the ≥ 5-tasks threshold in mav-create-tasks).
- Extend the claim to cover every newly-created child story:
uv run maverick coord claim <repo> <child-issue> for each.
If the epic already has stories, skip to Phase 2.
Phase 2: DAG analysis
Build a machine-readable DAG of child stories.
- For each child story, read its issue body. Look for:
- Explicit "depends on #N" references
- Shared files in the implementation plan
- Shared APIs or data models
- Construct the DAG payload per the schema in
docs/conventions/github-markers.md: ``json { "epic": $ARGUMENTS, "stories": { "140": {"deps": [], "files": ["app/src/boot.ts"]}, "142": {"deps": ["140"], "files": ["app/src/admin/guard.ts"]} } } ``
- Persist the DAG to GitHub — this is durable for any instance to
resume from. Pipe the payload JSON on stdin and let the CLI compose and upsert the fenced marker (never hand-compose marker comments, and never stage the payload in a fixed /tmp path — concurrent runs share it, #159): ``bash uv run maverick gh-state write <repo> $ARGUMENTS maverick-dag --payload-file - <<'EOF' <DAG payload JSON> EOF ``
Phase 3: Wave grouping
The output is a list of lists — each inner list is a set of stories with no un-satisfied deps on later waves. Record the waves in the epic's human-readable task-table comment as well, so a human skimming the epic can see execution order.
Phase 4: Initialise epic state
- For each child story, seed
maverick-statewith initial status:
pendingif not yet startedmergedif already merged (detected by reading PR state)in_flightonly if another instance's heartbeat is live for it
- Persist:
``bash uv run maverick state set <repo> $ARGUMENTS <story> <status> ` Each call mirrors the local cache to the maverick-state` marker on the epic.
Phase 5: Wave loop
Repeat until every story is terminal (merged or ejected) or every remaining wave is fully blocked.
Phase 5a: Select the next wave
- Read waves:
uv run maverick dag waves <repo> $ARGUMENTS. - Read current state:
uv run maverick state show <repo> $ARGUMENTS. - Pick the first wave whose every member is not yet merged.
- Exclude stories carrying `blocked-by:#N` — re-read the labels at
selection time so human-resolved ejections automatically unblock.
- If every remaining story in every remaining wave is blocked, halt
the epic cleanly:
- Update
maverick-state. - Post a summary comment on the epic listing the blockers.
- Release the epic-level claim.
- Report to the user.
Phase 5b: Create worktrees
Resolve the story base branch from config:
For each unblocked story in the wave, decide its base branch:
- If the story depends on a sibling in the same wave that is still
unmerged, stack per mav-stacked-prs.
- Otherwise, branch from
$STORY_BASE.
Create the worktree:
Phase 5c: Parallel-or-serial decision
Decide based on:
- User policy: does the user want parallel subagents? (Check the
session; if unsure, default to serial.)
- Capacity: no more than
MAX_CONCURRENT_WORKTREES=4active at once.
If parallel: dispatch one subagent per worktree, running do-issue-solo for that story inside that worktree. Track the subagents and aggregate results. Every story prompt must:
- end with the line
maverick-issue: <story>, and - tell the subagent to
cdinto its worktree first and to put
maverick-issue: <story> in every agent it dispatches and every inner skill it invokes.
This session holds the epic's claim plus one per in-flight story, so the plugin hooks can only attribute a dispatch to the right story's report through that marker (or the story branch checked out in the working directory). Without it, story reports show no dispatches.
If serial: iterate worktrees one at a time, running do-issue-solo in each.
Phase 5d: Per-story flow
For each story being worked on (whether as subagent or serially):
- Re-verify the claim:
uv run maverick coord heartbeat <repo> <story>
— if the story now carries blocked-by:#N, abort without pushing.
- Run the story through
do-issue-solo's per-story phases
(Phase 4 onward — branch is already created).
- On FAIL from agent-code-reviewer (eject) — FAIL means the
MAVERICK_VERDICT: FAIL marker parsed in do-issue-solo Phase 9; a missing or ambiguous marker counts as FAIL:
- Mark story
ejectedin epic state:
uv run maverick state set <repo> $ARGUMENTS <story> ejected.
- Run block propagation per
mav-block-propagation: - Write
maverick-bpropmarker on the epic. - Walk descendants, apply
blocked-by:#<story>to each. - Cancel any in-flight subagent work for a now-blocked story.
- Clear the
maverick-bpropmarker when the walk completes.
- On PASS + auto-merge:
- Mark story
mergedin epic state. - Release the story-level claim.
- Destroy the worktree.
Draft until the story's agent reports done. Every story PR is opened as a draft (do-issue-solo Phase 8), and only that story's own run marks it ready, at its Phase 10 step 3 or on eject. The coordinator treats a draft story PR as unfinished, and never marks one ready or merges it on a story's behalf. If the coordinator itself changes a story branch — a conflict resolution, a base merge, a regenerated migration — it first runs uv run maverick pr ready <repo> <pr> --undo, and the story goes back through do-issue-solo Phase 8 step 5 onward. A project that merges story PRs through its own queue instead of auto-merge runs uv run maverick pr ready <repo> <pr> --expect-head <sha> immediately before gh pr merge, so a head that moved since the gates ran is never merged.
Phase 5e: Wave completion
When every story in the wave is terminal (merged or ejected):
- If every remaining wave is fully blocked by ejections, halt
(Phase 5a's block check handles this on the next iteration).
- Otherwise, return to Phase 5a for the next wave.
Phase 6: Epic completion
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/do-epic/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thermiteau/maverick-claude/do-epic)