/plan-epic $ARGUMENTS
You are starting the epic-level planning phase. Your goal is to design the big picture: architecture, data models, integration strategy, and deliverable breakdown for an entire epic. You use opus-level reasoning for deep architectural decisions.
This skill does NOT plan individual tasks. It produces the master plan that individual tasks will reference. For task-level planning, use /plan-task.
Step 1 — Read the Jira epic
Use the Atlassian MCP to read the Jira issue $ARGUMENTS:
- Summary, description, and acceptance criteria
- Story points and issue type (should be Epic or Story with sub-tasks)
- Sub-tasks / child issues — list them all
- Links, attachments, and design references
Also read any linked issues or sub-tasks to understand the full scope.
Step 2 — Read the pre-plan
Check for a pre-plan at docs/agomez/preplans/$ARGUMENTS.md. Also check for
docs/agomez/preplans/$ARGUMENTS-v2.md — /preplan writes that variant rather than overwriting
an existing draft, so when both exist the -v2 file is the newer one. If several exist, ask the
user which one is current rather than guessing.
If a pre-plan exists, it is the primary input to this skill. It is not background reading and
it is not a suggestion. It is the shape the user has already worked out and agreed, usually over
several sessions, and it outranks the Jira text wherever the two disagree — the ticket is what was
asked for, the pre-plan is what was decided after reading the code.
Read it in full and treat it as follows:
- Its deliverable and sub-task breakdown is settled.
D<n> deliverables and D<n>-T<m>
sub-tasks carry over into the epic plan with the same names and the same boundaries. This skill
adds depth to that breakdown — architecture, data models, dependency graph, risks — it does not
re-derive it.
- Answered questions are decisions, not options. Any entry in the pre-plan's open-questions
section marked Answered has already been settled by the user. Do not re-open it, do not
present an alternative, and do not let the architect design around a different answer.
- Unanswered questions and "to complement" notes are the open items the epic plan is expected
to close, or to carry forward explicitly if they are still not decidable.
- Recorded findings are evidence, not guesses. Where the pre-plan states what the current code
does, use it to steer Step 4's investigation rather than rediscovering it from nothing.
If you believe a deliverable in the pre-plan is genuinely wrong — not merely shaped differently
from how you would shape it — raise it with the user in Step 6 as a flagged concern. Never
silently restructure it.
If no pre-plan exists, say so plainly and continue; the remaining steps work without one.
Step 3 — Read the branch strategy
Read docs/agomez/dx/epic-git-branch-strategy.md to understand the epic branch model.
Also check the current git branch with git branch --show-current.
If an epic plan-progress file already exists at docs/agomez/plans/, read it to understand what's already been decided. This skill may be run to create or update the epic plan.
Step 4 — Investigate the codebase (broad)
Launch the codebase-investigator agent with a prompt that includes:
- The full epic description and scope
- The pre-plan's deliverable breakdown and its recorded findings about the current code (from
Step 2), so the investigator confirms and extends them rather than starting from zero
- All sub-tasks and their descriptions
- Key domain areas mentioned in the epic
The investigation should be broad — this is about understanding the landscape, not a single feature. Ask the investigator to find:
- All existing code related to the epic's domain (models, services, API routes, pages)
- Data shapes and relationships between entities
- Integration points with external systems
- Existing patterns for similar features
- Architecture constraints (auth, RBAC, feature flags, real-time)
Wait for the investigation results.
Step 5 — Design the epic architecture
Launch the solution-architect agent (opus model) with a prompt that includes:
- The full Jira epic details (from Step 1)
- The full pre-plan text (from Step 2), if one exists, with its status stated explicitly: the
deliverable breakdown is approved, and its answered questions are decisions already taken
- The codebase investigation summary (from Step 4)
- The branch strategy (from Step 3)
- The epic plan template:
docs/agomez/dx/epic-workflow.md
Tell the architect to focus on:
- Architecture decisions — data models, service layer design, API contract design, real-time strategy, integration approach
- Data model design — new collections, schema shapes, indexes, relationships to existing data
- Deliverable breakdown — group sub-tasks into self-contained, testable deliverables that can be PRed to develop independently. When a pre-plan exists, this breakdown is already fixed: carry its deliverables and sub-tasks over by name and add depth to them.
- Dependency graph — which deliverables depend on others, what's the critical path
- Risk identification — technical risks, open questions, decisions that need stakeholder input
Tell the architect NOT to:
- Write a migration number anywhere in the plan — not the next number, not the current last journal entry, not "as a sanity check". Many engineers push to develop daily, so both migration sequences (Drizzle in
packages/db/migrations and Mongo db-update) move constantly, and a number written into an epic plan is wrong within days while still reading as an input. Migrations are referred to by what they do; where the number matters, the plan states the rule instead of a figure — read it from the migration journal when the migration is generated, and read it again immediately before the branch merges
- Write detailed implementation steps for individual tasks (that's
/plan-task's job)
- Copy patterns from existing code — apply best practices constrained by the tech stack
- Re-derive, rename, merge, split or re-order the pre-plan's deliverables and sub-tasks
- Re-open any pre-plan question marked Answered, or design against a different answer. If one of those answers makes the architecture unworkable, say so as a flagged concern instead of quietly overriding it
The architect writes the plan to docs/agomez/plans/$ARGUMENTS-plan-progress.md (or updates it if it already exists).
Step 6 — Present the plan for approval
After the architect completes:
- Read the plan file that was written
- Present the full plan to the user inline
- If a pre-plan was used, state plainly how the plan relates to it: which pre-plan decisions it
carries, which "to complement" notes it closes, and which it carries forward still open. Raise
any flagged concern about a pre-plan deliverable or answered question here, as a concern for
the user to rule on — never as a change already made
- STOP and wait for approval
Tell the user:
- "Here's the epic plan. Review architecture decisions, deliverable breakdown, and data models. Let me know if you'd like changes, or approve to start task-level planning."
- Do NOT proceed to write any implementation code
- Do NOT plan individual tasks — the user will run
/plan-task for each one
Important Rules
- No implementation code — this skill only produces the epic plan document
- The pre-plan wins — when
docs/agomez/preplans/$ARGUMENTS.md exists, its deliverable breakdown and its answered questions are settled input. This skill deepens them; it never quietly redesigns them. Disagreement is raised to the user, not resolved unilaterally
- Always use both agents — investigator (sonnet) first, then architect (opus)
- Always stop for approval — never auto-proceed
- Big picture only — architecture, data models, deliverables, dependency graph. NOT implementation steps for individual tasks.
- No migration numbers in the plan — refer to a migration by what it does, never by number, for the reason given in Step 5. An epic plan lives for weeks, so a number in it is stale almost immediately. Check this when you read the plan back in Step 6 and strip any number the architect wrote in, replacing it with the read-the-journal rule. The same applies to anything you say when presenting the plan.
- Plan file:
docs/agomez/plans/$ARGUMENTS-plan-progress.md
1---2name: plan-epic3description: Plan an entire epic: read the pre-plan and Jira epic, investigate codebase broadly, design architecture/data models/deliverable breakdown, and present for approval. Picks up docs/agomez/preplans/MLID-XXXX.md automatically when it exists. Usage: /plan-epic MLID-XXXX4---56# /plan-epic $ARGUMENTS78You are starting the **epic-level planning phase**. Your goal is to design the big picture: architecture, data models, integration strategy, and deliverable breakdown for an entire epic. You use **opus-level reasoning** for deep architectural decisions.910**This skill does NOT plan individual tasks.** It produces the master plan that individual tasks will reference. For task-level planning, use `/plan-task`.1112## Step 1 — Read the Jira epic1314Use the Atlassian MCP to read the Jira issue `$ARGUMENTS`:1516- Summary, description, and acceptance criteria17- Story points and issue type (should be Epic or Story with sub-tasks)18- Sub-tasks / child issues — list them all19- Links, attachments, and design references2021Also read any linked issues or sub-tasks to understand the full scope.2223## Step 2 — Read the pre-plan2425Check for a pre-plan at `docs/agomez/preplans/$ARGUMENTS.md`. Also check for26`docs/agomez/preplans/$ARGUMENTS-v2.md` — `/preplan` writes that variant rather than overwriting27an existing draft, so when both exist the `-v2` file is the newer one. If several exist, ask the28user which one is current rather than guessing.2930**If a pre-plan exists, it is the primary input to this skill.** It is not background reading and31it is not a suggestion. It is the shape the user has already worked out and agreed, usually over32several sessions, and it outranks the Jira text wherever the two disagree — the ticket is what was33asked for, the pre-plan is what was decided after reading the code.3435Read it in full and treat it as follows:3637- **Its deliverable and sub-task breakdown is settled.** `D<n>` deliverables and `D<n>-T<m>`38 sub-tasks carry over into the epic plan with the same names and the same boundaries. This skill39 adds depth to that breakdown — architecture, data models, dependency graph, risks — it does not40 re-derive it.41- **Answered questions are decisions, not options.** Any entry in the pre-plan's open-questions42 section marked *Answered* has already been settled by the user. Do not re-open it, do not43 present an alternative, and do not let the architect design around a different answer.44- **Unanswered questions and "to complement" notes are the open items** the epic plan is expected45 to close, or to carry forward explicitly if they are still not decidable.46- **Recorded findings are evidence, not guesses.** Where the pre-plan states what the current code47 does, use it to steer Step 4's investigation rather than rediscovering it from nothing.4849If you believe a deliverable in the pre-plan is genuinely wrong — not merely shaped differently50from how you would shape it — raise it with the user in Step 6 as a flagged concern. Never51silently restructure it.5253If no pre-plan exists, say so plainly and continue; the remaining steps work without one.5455## Step 3 — Read the branch strategy5657Read `docs/agomez/dx/epic-git-branch-strategy.md` to understand the epic branch model.5859Also check the current git branch with `git branch --show-current`.6061If an epic plan-progress file already exists at `docs/agomez/plans/`, read it to understand what's already been decided. This skill may be run to **create** or **update** the epic plan.6263## Step 4 — Investigate the codebase (broad)6465Launch the `codebase-investigator` agent with a prompt that includes:6667- The full epic description and scope68- The pre-plan's deliverable breakdown and its recorded findings about the current code (from69 Step 2), so the investigator confirms and extends them rather than starting from zero70- All sub-tasks and their descriptions71- Key domain areas mentioned in the epic7273The investigation should be **broad** — this is about understanding the landscape, not a single feature. Ask the investigator to find:7475- All existing code related to the epic's domain (models, services, API routes, pages)76- Data shapes and relationships between entities77- Integration points with external systems78- Existing patterns for similar features79- Architecture constraints (auth, RBAC, feature flags, real-time)8081Wait for the investigation results.8283## Step 5 — Design the epic architecture8485Launch the `solution-architect` agent (opus model) with a prompt that includes:8687- The full Jira epic details (from Step 1)88- **The full pre-plan text (from Step 2), if one exists**, with its status stated explicitly: the89 deliverable breakdown is approved, and its answered questions are decisions already taken90- The codebase investigation summary (from Step 4)91- The branch strategy (from Step 3)92- The epic plan template: `docs/agomez/dx/epic-workflow.md`9394**Tell the architect to focus on:**95961. **Architecture decisions** — data models, service layer design, API contract design, real-time strategy, integration approach972. **Data model design** — new collections, schema shapes, indexes, relationships to existing data983. **Deliverable breakdown** — group sub-tasks into self-contained, testable deliverables that can be PRed to develop independently. **When a pre-plan exists, this breakdown is already fixed: carry its deliverables and sub-tasks over by name and add depth to them.**994. **Dependency graph** — which deliverables depend on others, what's the critical path1005. **Risk identification** — technical risks, open questions, decisions that need stakeholder input101102**Tell the architect NOT to:**103- Write a migration number anywhere in the plan — not the next number, not the current last journal entry, not "as a sanity check". Many engineers push to develop daily, so both migration sequences (Drizzle in `packages/db/migrations` and Mongo `db-update`) move constantly, and a number written into an epic plan is wrong within days while still reading as an input. Migrations are referred to by what they do; where the number matters, the plan states the rule instead of a figure — read it from the migration journal when the migration is generated, and read it again immediately before the branch merges104- Write detailed implementation steps for individual tasks (that's `/plan-task`'s job)105- Copy patterns from existing code — apply best practices constrained by the tech stack106- Re-derive, rename, merge, split or re-order the pre-plan's deliverables and sub-tasks107- Re-open any pre-plan question marked *Answered*, or design against a different answer. If one of those answers makes the architecture unworkable, say so as a flagged concern instead of quietly overriding it108109The architect writes the plan to `docs/agomez/plans/$ARGUMENTS-plan-progress.md` (or updates it if it already exists).110111## Step 6 — Present the plan for approval112113After the architect completes:1141151. Read the plan file that was written1162. Present the full plan to the user inline1173. If a pre-plan was used, state plainly how the plan relates to it: which pre-plan decisions it118 carries, which "to complement" notes it closes, and which it carries forward still open. Raise119 any flagged concern about a pre-plan deliverable or answered question here, as a concern for120 the user to rule on — never as a change already made1214. **STOP and wait for approval**122123Tell the user:124- "Here's the epic plan. Review architecture decisions, deliverable breakdown, and data models. Let me know if you'd like changes, or approve to start task-level planning."125- Do NOT proceed to write any implementation code126- Do NOT plan individual tasks — the user will run `/plan-task` for each one127128## Important Rules129130- **No implementation code** — this skill only produces the epic plan document131- **The pre-plan wins** — when `docs/agomez/preplans/$ARGUMENTS.md` exists, its deliverable breakdown and its answered questions are settled input. This skill deepens them; it never quietly redesigns them. Disagreement is raised to the user, not resolved unilaterally132- **Always use both agents** — investigator (sonnet) first, then architect (opus)133- **Always stop for approval** — never auto-proceed134- **Big picture only** — architecture, data models, deliverables, dependency graph. NOT implementation steps for individual tasks.135- **No migration numbers in the plan** — refer to a migration by what it does, never by number, for the reason given in Step 5. An epic plan lives for weeks, so a number in it is stale almost immediately. Check this when you read the plan back in Step 6 and strip any number the architect wrote in, replacing it with the read-the-journal rule. The same applies to anything you say when presenting the plan.136- **Plan file**: `docs/agomez/plans/$ARGUMENTS-plan-progress.md`