# Epic-goal prompt template

A raw, copy-pasteable prompt for pointing an agent at an epic (or ticket list)
and having it work autonomously until everything — including work it
discovers along the way — is done. Background: see
https://tom-dickson.com/blog/epic-goal-prompt-pattern/

Fill in `{EPIC}`, `{N}`, and `{MODEL}`. Choose one `Self-feed` variant and
delete the other.

## Bounded variant (default — use when scope creep is the risk)

> **Goal:** work through {EPIC} autonomously until it is fully done.
>
> **Audit first:** before implementing anything, audit origin/main, open PRs, and local worktree state so already-finished or in-flight work is folded in, not redone.
>
> **Loop:** pick the next open ticket on the epic, implement it, verify (tests/build), commit, close the ticket, move on.
>
> **Self-feed (bounded):** file tickets for bugs, improvements and follow-on features you discover and link them to the epic — but only action ones that block or directly improve the epic's outcome. Park everything else in the backlog untriaged. At each review checkpoint, have the reviewer rank the parked tickets and drop any not worth keeping.
>
> **Review cadence:** after every {N} completed tickets, run an adversarial {MODEL} review of the accumulated diff; file and fix anything it finds before continuing.
>
> **Done when:** every ticket on the epic (original + actioned generated) is closed, verification is green, and everything is committed and pushed.
>
> **Decisions log:** instead of asking questions, make the call and record decisions, tradeoffs and anything needing human judgment as comments on the epic for review at the end. If two reasonable implementations diverge, comment both options on the ticket, pick the simpler, and flag it.

## Full variant (use when the discovered work is the point)

Same as bounded, with the self-feed clause replaced by:

> **Self-feed (full):** file tickets for bugs, improvements and follow-on features you discover, link them to the epic, and action them in the same loop — the goal covers generated work, not just the original tickets.

And "Done when" covers original + generated tickets (not "original + actioned generated").
