wtf.write-epic
Write Epic
Create a GitHub Epic issue capturing a strategic initiative with stakeholders, goals, success metrics, and a feature breakdown scaffold.
Process
0. GitHub CLI setup
Run the setup check from ../references/gh-setup.md. Stop if gh is not installed or not authenticated. Note whether the extensions are available — this determines whether native dependency links are created in step 8.
Skip this step if gh-setup was already confirmed this session (e.g. when this skill is re-invoked via wtf.write-feature step 11 "Write another Epic").
1. Capture the seed idea
Ask ONE question: "What initiative are you working on?"
Do not ask follow-up questions yet. Acknowledge the idea briefly and move straight to research.
2. Deep research
Run in parallel using the Agent tool and GitHub issue search:
Codebase exploration:
Use the Agent tool with these concrete searches (run in parallel):
Glob('**/{README,readme}.md')+Glob('docs/**/*.md')+Glob('**/*.{adr,ADR}.md')— for existing product descriptions, ADRs, and architectural notesGlob('src/**', 'lib/**', 'packages/**')— to understand the module structure and which systems existGrepfor the initiative's key domain nouns across*.{ts,tsx,js,jsx,py,go,rb,java,cs}files — to find existing implementations, prior attempts, or integration pointsGlob('**/{GLOSSARY,glossary,ubiquitous-language,domain}.md')+Glob('.github/**/*.md')— for any existing domain glossary, ubiquitous language docs, or prior DDD artefacts
Wiki / glossary fetch: Fetch relevant GitHub wiki pages or in-repo glossary docs. Search for pages matching the initiative's domain area. Use these to:
- Identify existing Ubiquitous Language terms the team already uses
- Avoid introducing synonyms for already-named concepts
- Surface any existing Bounded Context definitions
Related issues (optional — if GitHub is unavailable, skip this sub-step without comment):
- Open and closed issues/epics that overlap or inform this initiative
- Prior discussions, decisions, or rejected approaches
Synthesise findings internally. Do not dump raw research at the user.
3. Grill the user
Using what research revealed, ask targeted follow-up questions to close the remaining gaps. Apply ../references/questioning-style.md for questions in this step.
Completeness checklist (ask only about unanswered items):
- Scope boundaries (what is explicitly out of scope?)
- Success criteria (how will we know we're done?)
- Stakeholders (Product Owner, Lead Designer, Tech Lead — skip any that don't apply)
- Constraints or deadlines that must shape the approach
- Any known risks or dependencies the research surfaced that need confirmation
- Bounded Context: Which domain context(s) does this initiative live in? (Ask last — use an option list if multiple contexts were found in research.)
- Ubiquitous Language: What domain actors (named roles, not "users") and domain verbs (business actions) define this space? Are there existing terms the team already uses that must be preserved?
4. DDD Language Check
Before drafting, review the seed idea and all gathered context against the rules in ../references/ddd-writing-rules.md:
- Does the Epic title describe a business outcome, not a technology action?
- Does the Goal use domain vocabulary — not engineering jargon?
- Reframe any tech terms as business outcomes — the implementation detail belongs in Tasks.
- Flag any ambiguous or undefined term and propose the domain-correct alternative.
5. Vertical slice assessment
Run Stage 1 of ../references/scope-gates.md on the gathered context. The Epic-specific bar: a coherent, independently deliverable strategic initiative that produces real user or business value on its own, not only as a dependency for another epic.
Evaluate:
- Passes → proceed to draft.
- Too broad → propose focused epics and confirm with the user before continuing.
- Has dependencies → identify Epics this epic depends on and Epics that depend on this one. Record each dependency issue number for step 8; do not write them into the body yet.
6. Draft the Epic
Produce a complete draft. Success Metrics must be specific and measurable. Feature Breakdown stays as empty placeholders.
Load the EPIC template per ../references/issue-template-loading.md (verify existence, halt-or-setup if missing, read body below the second --- delimiter). Fill in all sections with the gathered context.
DDD writing rules for this draft:
- Bounded Context: Fill in the Bounded Context field. If the epic spans multiple contexts, name each and describe where the seam is.
- Context and Goal sections: Every sentence must use Ubiquitous Language. No tech jargon.
- Success Metrics: Phrase as business-observable outcomes ("Merchants can view settlement status within 2 minutes of payment"), not system metrics ("API latency < 200ms").
- Risks: Frame risks in domain terms ("Dispute resolution rules differ by jurisdiction") before listing technical risks.
7. Scope gate
Run Stage 2 of ../references/scope-gates.md on the written draft. Even if step 5 passed, run this — drafting sometimes reveals bundled objectives that were invisible in the abstract.
Epic-level split signals (heuristics — use judgement, not rigid thresholds):
- The Goal statement contains multiple distinct business objectives joined by "and" — each could stand alone as a separate initiative.
- The Feature Breakdown has more than 8 proposed features — treat this as a signal worth scrutiny, not an automatic trigger (8 tightly related features in one domain can be fine).
- The Epic spans more than one Bounded Context without a clear seam or handoff point.
- Success Metrics describe outcomes that belong to completely different user journeys.
- The epic's beneficiary cannot be stated in a single sentence without using "and" to cover unrelated groups.
If no signals fire, proceed to creation. If one or more fire, follow the Stage 2 procedure: state the signals, explain the risk, propose a concrete split (two or three focused epic titles with a one-line goal each), and use the keep/split/stop ask from ../references/scope-gates.md.
On Split it → return to step 3 with the chosen focused Epic as the seed. Carry forward all research and codebase findings already gathered — only re-ask stakeholder questions that the narrowed scope makes ambiguous. Note the remaining proposed sub-epics to the user as follow-on work.
8. Review with user
Show the draft. Then ask "Does this look right?" — header Review:
- Looks good — create the issue → proceed with issue creation
- I have changes → adjust first
Apply edits, then proceed immediately.
9. Create the issue
Note: Write the issue body to a temp file with the Write tool, then use
--body-fileto avoid shell quoting issues with multi-line content.
Title generation: Spawn a subagent using the
claude-haiku-4-5-20251001model to generate a concise, domain-language title from the Epic's Goal. Pass in the Goal text and ask for a title (no prefix emoji/label needed — that is added below).
# Ensure the label exists before creating the issue
gh label create epic --color 5319e7 --description "Strategic initiative spanning multiple features" 2>/dev/null || true
gh issue create --title "🎯 Epic: <title>" --body-file /tmp/wtf.epic-$(date +%s)-body.md --label "epic"
Print the issue URL and number.
Native dependency links: Epics are top-level — no gh sub-issue call is needed here. If gh-issue-dependency-available (from step 0), create a blocking link for each dependency identified in step 5:
# For each issue this epic depends on (must ship first):
gh issue-dependency add <this_epic_number> --blocked-by <blocker_number>
If the extension is unavailable, warn the user — do not write dependency references into the issue body.
10. Update the wiki / glossary
If this Epic introduced or refined any Bounded Context definitions or Ubiquitous Language terms (domain actors, domain verbs, domain objects), update the project's glossary:
- Check whether a wiki page or in-repo glossary doc exists for this Bounded Context (e.g.
docs/glossary.md, GitHub wiki page matching the context name). - If a page exists: add or update the relevant term definitions, linking back to the Epic issue number.
- If no page exists: create one (prefer the GitHub wiki if available, otherwise
docs/glossary.md), seeding it with the terms defined in this Epic.
Skip without comment if no terms were introduced. Report only the page name and terms added if an update was made.
11. Offer to continue
Ask "What's next?" — header Next step:
- Plan all Features → invoke
wtf.epic-to-features, passing the Epic number in as context (default) - Write one Feature → proceed with
wtf.write-feature, passing the Epic number in as context so the user is not asked for it again - Write another Epic → restart this skill from step 1
- Stop here → exit, no further action
Suggest clearing context before continuing to features if the conversation has grown long: "The context is getting long — you may want to
/clearbefore continuing."
More from xiduzo/wtf
wtf.write-feature
This skill should be used when a user wants to create a GitHub Feature issue, break down an Epic into user-facing capabilities, write user stories in domain language, or capture what a domain actor can do — for example "create a feature", "write a feature for this epic", "add a feature to an epic", "break this epic into features", "write user stories for this feature", or "describe what this actor can do". Use this skill to write a single Feature; use `wtf.epic-to-features` to generate the full set of Features for an Epic at once. Not applicable to Tasks, Epics, or bug reports.
38wtf.write-task
This skill should be used when a user wants to create a task, write a ticket, decompose a feature into implementable work, break down a story, define a vertical slice for development, or write Gherkin scenarios — for example "create a task", "write a task for this feature", "break this feature into tasks", "define implementation work", or "add a sub-issue to this feature". Guides creation of a GitHub Task issue linked to a parent Feature and Epic, derives Gherkin acceptance scenarios from the Feature's ACs, enforces DDD ubiquitous language in scenarios, and checks for vertical-slice integrity and task dependencies.
38wtf.steer-design
This skill should be used when a team wants to create or refine the design guidelines document — for example "create the design steering doc", "document our design system", "write the design principles", "document our component patterns", "set up the design guidelines", or "update the design doc". Generates docs/steering/DESIGN.md as a living document capturing design principles, the design system, tokens, component patterns, and accessibility standards. Generated once and refined — not regenerated from scratch.
37wtf.reflect
This skill should be used when a developer wants to capture learnings from a difficult session, record what Claude got wrong, save implementation gotchas, or update the steering docs with hard-won knowledge — for example "let's reflect", "capture what we learned", "that was painful, save this", "update the steering docs with what went wrong", "I need to debrief", "what went wrong today", "log this lesson", "save this gotcha", "document this mistake", "I want to write this down before I forget", "add this to the steering docs", or when prompted by the intervention tracker after multiple corrections. Routes each learning into the right steering doc (TECH, QA, DESIGN, or VISION) under a "Hard-Won Lessons" section.
37wtf.verify-task
This skill should be used when a QA engineer wants to test or verify a completed task, run through acceptance criteria, check Gherkin scenarios against the implementation, record pass/fail results, or sign off on a ticket before merge. Triggers on phrases like "verify task #42", "run QA on this issue", "test the acceptance criteria", "sign off on task", "check if this task is ready to merge", "does this task meet its acceptance criteria", "run acceptance tests for task #X", "walk through the Gherkin for task #X", or "I want to test this task".
37wtf.report-bug
This skill should be used when a developer or QA engineer wants to report a bug, create a bug ticket, document a test failure, log a defect, file an issue found during a QA session, or report something that is broken — for example "report a bug", "create a bug ticket", "I found a defect", "something is broken in task #X", or "document this test failure". Files a structured GitHub Bug issue that links the originating Task and Feature, maps failing Gherkin scenarios as reproducible test evidence, and fills every section of the BUG template.
37