epic
Plan, refine and run epics with open-epic checks, affinity grouping, internal goal setting, and file/run/next modifiers. Only on explicit /epic or 'epic'.
disable-model-invocation: true
Plan, Refine and Run an Epic
You, the agent that received this invocation, are the Host Orchestrator. An epic is one ticket
that owns a task table; each task becomes a subticket run as a /lean-sprint. The host runs
the epic and orchestrates each sprint, but does not do the sprints (no direct coding
or feature implementation). Each sprint is executed by dispatching the Developer model
defined within the selected sprint skill (defaulting to /lean-sprint), with the host
reviewing worker diffs and running post-handoff verification tests as detailed in that skill.
Invocation: /epic "<idea>" drafts a new epic; /epic <n> refines or runs epic ticket <n>;
/epic <n> no-web skips the web fanout.
Dispatch
- Keep the explicit forms above unchanged. Accept modifiers before
/epic(file new /epic,run new /epic,next /epic) or after it (/epic file,/epic run,/epic next). file newdrafts and files an epic only.run newdrafts, files, and runs it.nextselects and runs the next logical epic or task in the current epic, using session context and its task table.- Bare
/epicchecks open epics withharnez find -d . issues -a status:active, then keeps tickets whose metadata saysCategory: Epic. If any exist, ask whether to run one or group new work. - With no open epic, group relevant session and active-backlog tickets by thematic affinity (shared subsystem, component, or context); use priority and tags to rank within a group, never to combine unrelated tickets. If affinity is ambiguous, propose the group and ask before filing.
- For a clear group, file the epic, adopt it as the current internal goal, then run it. Do not
invoke a harness
/goal; tell the user they can use one if they want a harness-level goal. - Automode may make routine implementation choices; stop for owner confirmation before destructive deletion, breaking changes, or bypassing a canary.
Delegate, don't restate: /issue (filing), /lean-sprint (roles, dispatch, review),
/study (study shape), /evergreen, /wrap. If .harnez/repo.yaml sets
issues.tracker: none or docs.studies: false, follow .harnez/rules/Index.md.
1. Draft
File the epic with /issue (direct). It contains:
/goalwith an exit clause and the circuit breaker (step 6b).- Out of scope, open decisions.
- Task table: ticket, what, sprint group, searcher → architect → developer, reviewer, status.
- Final tasks:
/evergreenand/wrap.
Tasks stay placeholders until steps 2–4 have run.
2. Prior-Art Web Fanout (optional; default on for new features)
Goal: check the direction and avoid rebuilding established, stable, maintained, non-bloated tools.
- Start several cheap read-only searchers in parallel (
--role advisor --model cheap), one angle each: existing tools, libraries to reuse, standards/specs, known pitfalls. - Each returns candidates with source link, last release date, activity, dependency weight, license, and a fit verdict. No link, no finding.
- The host aggregates them into one study (studies dir when present, otherwise the epic ticket) and records a "build vs. reuse" decision per task in the epic.
Skip it for pure refactors or internal fixes; say so in the epic.
3. Code Fanout
Cheap searchers check the live repo for each task's premise, location and size. A task that is not small, or hides an owner decision, moves into its own sprint group.
3a. Phases and Delivery
For multi-group epics, organize groups as prose phases with their dependencies, child tickets, and exit gates; use a DAG when work can proceed independently. Start a phase only when its dependencies' gates pass. Keep infrastructure and integration work after the standalone work it depends on. An operational epic owns one repository: for sibling-repository work, file a planning bridge here and an anchor ticket or follow-up epic in the owning repository.
Label each child code or design/discovery. Code work requires the ticket's tests, install,
and runtime canary before closure. Design/discovery work produces a study and a decomposed
backlog, and states that runtime delivery was not verified. A phase exits when its children
are closed, its declared canary or design review passes, and the working tree is clean.
4. Refine
Each task becomes a subticket (/issue) with acceptance, write set, and:
- Developer:
--role dev --model leanfor standard work;--role dev --model stdfor moderate work;--role dev --model smartfor complex work;--role dev --model fastfor easy work;--role dev --model cheapfor low-cost work. - Architect only when the design is open (
/lean-sprint§1.5 tiers). - Reviewer:
--role reviewer --model smartfor risky work; orchestrator diff review for small work. - No schema-only tasks: a task that defines a file format, JSON schema or data model also ships the first code that reads or writes it, with a visible result (a command's output or a written file). A format without a user cannot be reviewed against real needs and gets redesigned later (epic 942: schemas first, then a loader ticket that took 6 review rounds; re-cut into thin slices).
- Ask each allocated worker to report the allocated ticket number and confirm that every actionable study/retro follow-up was filed and linked; the study must list those numbers.
Mix vendors across a sprint. Update the epic's task table with the numbers.
5. Decisions
Batch owner questions once, each with a recommendation. When the owner delegates, decide
and record each choice in the subticket's ## Decision.
6. Run
Run each sprint group via the selected sprint skill (default /lean-sprint). The host
coordinates the run and runs verification tests upon handoff, but does not implement:
dispatch the sprint's configured Developer worker (harnez agent start) to write code
and tests. Update the task table as each lands (commit with the ticket update).
6b. Circuit Breaker
Every /goal this skill writes or runs carries one. When a worker loops, an architectural or
OS blocker is hard to solve, or the orchestrator sees no progress: clear the goal and write a
failure report in the epic (what was tried, why it failed, resume point).
7. Skip Rule
A subticket that needs new commands, unavailable resources or an owner decision nobody can default is skipped and named in the epic, not forced.
8. Close
The epic closes when every task is closed, skipped with a reason, or parked in its own ticket.
The close reason lists each. Compare delivery with the epic's /goal first.
9. Evergreen and Wrap
Run the final tasks: sprint study (front matter kind: sprint), review-learning entries, follow-up tickets (/evergreen),
then /wrap. Report the epic number, closed/skipped/parked tasks, and the next command.
These are the shipped picks. User models.yaml overrides are listed by harnez agent models --picks.
| Role | Trait | Meaning | Chain | Default | |---|---|---|---|---| | advisor | cheap | Low-cost work. | luna:low, haiku:low | yes | | advisor | smart | Difficult judgment. | opus:low, opus:med, sol:low | | | developer | ai | AI-oriented work. | unset | | | developer | cheap | Low-cost work. | luna:med | | | developer | fast | Fast work. | haiku:med | | | developer | gui | Graphical interfaces. | lean, std | | | developer | lean | Efficient standard work. | terra:low | yes | | developer | smart | Difficult judgment. | sol:med, opus:med | | | developer | std | Standard work. | terra:med, opus:low | | | developer | tui | Terminal interfaces. | smart | | | reviewer | smart | Difficult judgment. | sol:low | yes |
- Content
- file-backed
- License:
- AGPL-3.0-or-later
- Origin
- first-party
- Source:
- docs/commands/epic.md
- Source revision
3cb914dfaf6c43cbbbc43868d6b47c2cc7516c22- Requires
- Targets
- codex, claude
- Invocation
- /epic
Related skills
- bug-hunt — Run a bug hunt over active P1/P2 bug tickets: re-verify each against live code, close obsolete ones, fix the rest the way forward. Only on explicit /bug-hunt or 'bug hunt'.
- decide — Session-scoped autonomy for the orchestrating agent: answer simple questions yourself, consult cheap or smart advisors, push ready work without asking, and stop only for very critical questions. Only on explicit /decide.
- docup — Review and update bounded repository documentation by category (testing, architecture)
- evergreen — Create/update evergreen docs and issue files for the current session