/plan-task $ARGUMENTS
You are starting the task-level planning phase. Your goal is to design focused implementation steps for a single task — either a standalone task or a sub-task within an existing epic. Architecture decisions are already made (in the epic plan or in the Jira ticket); you refine the details into concrete, TDD-driven implementation steps.
Step 0 — Parse arguments
$ARGUMENTS contains the raw input. Split it into:
TASK_ID: the first whitespace-separated token (e.g., MLID-2082).
EXTRA_CONTEXT: everything after the first token, with surrounding quotes ("..." or '...') stripped. May be empty.
Treat EXTRA_CONTEXT as user guidance about how to plan — not as part of the ticket itself. It can narrow scope, point to reference implementations, flag constraints, or highlight a specific concern. If empty, proceed normally.
For the rest of this skill, use TASK_ID wherever the Jira ticket is referenced, and surface EXTRA_CONTEXT at the steps noted below.
Step 1 — Read the Jira ticket
Use the Atlassian MCP to read the Jira issue TASK_ID:
- Summary, description, and acceptance criteria
- Story points and issue type
- Parent/epic link — this determines if it's standalone or an epic sub-task
Step 2 — Determine task type and load context
If standalone task (no parent epic):
- Read
docs/agomez/dx/task-git-branch-strategy.md
- Base branch:
develop
- No prior architectural context to load
If epic sub-task (has parent epic):
- Read
docs/agomez/dx/epic-git-branch-strategy.md
- Find and read the epic plan-progress file at
docs/agomez/plans/. Search for files matching the epic ID.
- From the plan-progress, extract:
- Architecture decisions already made
- Data models already designed or built
- What's already been implemented (completed tasks/deliverables)
- What deliverable this task belongs to
- Dependencies on other tasks
- Integration points and data shapes defined in the epic plan
- Base branch: the epic branch (noted in the plan-progress file)
This is critical: The epic plan-progress contains architecture, data models, and design decisions that are the source of truth. Do NOT re-investigate or re-decide things that are already settled in the epic plan.
Also check the current git branch with git branch --show-current.
Step 3 — Investigate the codebase (focused)
Launch the codebase-investigator agent with a prompt that includes:
- The Jira ticket summary and acceptance criteria
- If epic sub-task: the relevant architectural context from the plan-progress (data models, service layer functions, API patterns already decided)
- Specific areas to investigate based on what this task touches
- If
EXTRA_CONTEXT is non-empty: include it verbatim in a "User guidance" section so the investigator can scope its search accordingly
The investigation should be narrow and focused — only the files and patterns directly relevant to this task. The investigator does NOT need to understand the whole epic.
Tell the investigator to focus on:
- Files this task will create or modify
- Existing functions/services this task will call or extend
- Test patterns used in adjacent test files
- Exact data shapes at integration boundaries
Wait for the investigation results.
Step 4 — Design the implementation plan
Launch the solution-architect agent with:
- The Jira ticket details (from Step 1)
- The epic context summary (from Step 2, if epic sub-task)
- The codebase investigation summary (from Step 3)
- The task type (standalone vs epic sub-task)
- The plan template:
docs/agomez/dx/individual-task-workflow.md
- If
EXTRA_CONTEXT is non-empty: include it verbatim under a "User guidance for planning" section, and instruct the architect to honor it (e.g., scope narrowing, preferred patterns, constraints)
Tell the architect:
- Architecture decisions are already made — do not redesign. Reference the epic plan for data models, API contracts, and service layer design.
- Focus on implementation steps: ordered, TDD-driven (RED -> GREEN -> REFACTOR), each step a single commit.
- Be specific: exact file paths, function signatures, type definitions, test cases.
- For epic sub-tasks, the base branch is the epic branch, not
develop.
- Never write a migration number into 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 a plan is wrong within days while still reading as an input. Refer to a migration by what it does, and where the number matters, state the rule instead of a figure: read it from the migration journal at the moment the migration is generated, and read it again immediately before the branch merges.
- Number every open question. If the plan has an Open Questions section with one or more entries, each entry gets a stable identifier —
Q1, Q2, Q3 — written into the entry itself, so the user can answer them by number in conversation, in review comments and in the Jira ticket. Format each as - **Q<n> — <the question>?** <reasoning and recommendation>. Numbers are assigned in the order the questions appear and are never reused and never renumbered: when a question is later answered, its answer is recorded under its own number rather than the entry being deleted, so a reference to "Q3" means the same thing months later. Add a short note at the top of the section stating that convention. If there are no open questions, say so in one line and add no numbering.
Model: use sonnet — the hard architectural thinking was done in /plan-epic. This is execution planning.
The architect writes the plan to docs/agomez/plans/{TASK_ID}-short-description.md (use the parsed TASK_ID, not the raw $ARGUMENTS).
Step 5 — Present the plan for approval
After the architect completes:
- Read the plan file that was written
- Present the full plan to the user inline
- STOP and wait for approval
Tell the user:
- "Here's the implementation plan for
TASK_ID. Review the steps and let me know if you'd like changes, or approve it to proceed with /implement-task TASK_ID." (substitute the actual task ID)
- Do NOT proceed to write any implementation code
Important Rules
- No implementation code — this skill only produces a task plan document
- Always use both agents — investigator first, then architect
- Always stop for approval — never auto-proceed to implementation
- Respect the epic plan — if this is a sub-task, the epic plan-progress is the source of truth for architecture. Do not contradict it.
- Focused scope — plan only what this task requires. Don't plan adjacent tasks or redesign the architecture.
- Plan file:
docs/agomez/plans/{TASK_ID}-short-description.md (separate file, not inside the epic plan-progress)
- No migration numbers in the plan — refer to a migration by what it does, never by number, for the reason given in Step 4. Check this when you read the plan back in Step 5 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.
- Open questions are always numbered —
Q1, Q2, Q3, assigned in document order, never reused, never renumbered when one is answered. Verify this when you read the plan back in Step 5, and fix it yourself if the architect returned an unnumbered list. When you present the plan and when you discuss the questions afterwards, refer to them by number.
- Extra context is guidance, not requirements —
EXTRA_CONTEXT shapes how you plan, but the Jira ticket remains the source of truth for what the task is. If the two appear to conflict, surface the conflict to the user before proceeding.
1---2name: plan-task3description: Plan a single task: read Jira ticket, load epic context (if sub-task), investigate codebase narrowly, design implementation steps, and present for approval. Usage: /plan-task MLID-XXXX ["extra context"]4---56# /plan-task $ARGUMENTS78You are starting the **task-level planning phase**. Your goal is to design focused implementation steps for a single task — either a standalone task or a sub-task within an existing epic. Architecture decisions are already made (in the epic plan or in the Jira ticket); you refine the details into concrete, TDD-driven implementation steps.910## Step 0 — Parse arguments1112`$ARGUMENTS` contains the raw input. Split it into:1314- **`TASK_ID`**: the first whitespace-separated token (e.g., `MLID-2082`).15- **`EXTRA_CONTEXT`**: everything after the first token, with surrounding quotes (`"..."` or `'...'`) stripped. May be empty.1617Treat `EXTRA_CONTEXT` as **user guidance about how to plan** — not as part of the ticket itself. It can narrow scope, point to reference implementations, flag constraints, or highlight a specific concern. If empty, proceed normally.1819For the rest of this skill, use `TASK_ID` wherever the Jira ticket is referenced, and surface `EXTRA_CONTEXT` at the steps noted below.2021## Step 1 — Read the Jira ticket2223Use the Atlassian MCP to read the Jira issue `TASK_ID`:2425- Summary, description, and acceptance criteria26- Story points and issue type27- **Parent/epic link** — this determines if it's standalone or an epic sub-task2829## Step 2 — Determine task type and load context3031### If standalone task (no parent epic):3233- Read `docs/agomez/dx/task-git-branch-strategy.md`34- Base branch: `develop`35- No prior architectural context to load3637### If epic sub-task (has parent epic):3839- Read `docs/agomez/dx/epic-git-branch-strategy.md`40- **Find and read the epic plan-progress file** at `docs/agomez/plans/`. Search for files matching the epic ID.41- From the plan-progress, extract:42 - Architecture decisions already made43 - Data models already designed or built44 - What's already been implemented (completed tasks/deliverables)45 - What deliverable this task belongs to46 - Dependencies on other tasks47 - Integration points and data shapes defined in the epic plan48- Base branch: the epic branch (noted in the plan-progress file)4950**This is critical:** The epic plan-progress contains architecture, data models, and design decisions that are the **source of truth**. Do NOT re-investigate or re-decide things that are already settled in the epic plan.5152Also check the current git branch with `git branch --show-current`.5354## Step 3 — Investigate the codebase (focused)5556Launch the `codebase-investigator` agent with a prompt that includes:5758- The Jira ticket summary and acceptance criteria59- **If epic sub-task:** the relevant architectural context from the plan-progress (data models, service layer functions, API patterns already decided)60- Specific areas to investigate based on what this task touches61- **If `EXTRA_CONTEXT` is non-empty:** include it verbatim in a "User guidance" section so the investigator can scope its search accordingly6263The investigation should be **narrow and focused** — only the files and patterns directly relevant to this task. The investigator does NOT need to understand the whole epic.6465**Tell the investigator to focus on:**66- Files this task will create or modify67- Existing functions/services this task will call or extend68- Test patterns used in adjacent test files69- Exact data shapes at integration boundaries7071Wait for the investigation results.7273## Step 4 — Design the implementation plan7475Launch the `solution-architect` agent with:7677- The Jira ticket details (from Step 1)78- The epic context summary (from Step 2, if epic sub-task)79- The codebase investigation summary (from Step 3)80- The task type (standalone vs epic sub-task)81- The plan template: `docs/agomez/dx/individual-task-workflow.md`82- **If `EXTRA_CONTEXT` is non-empty:** include it verbatim under a "User guidance for planning" section, and instruct the architect to honor it (e.g., scope narrowing, preferred patterns, constraints)8384**Tell the architect:**8586- Architecture decisions are **already made** — do not redesign. Reference the epic plan for data models, API contracts, and service layer design.87- Focus on **implementation steps**: ordered, TDD-driven (RED -> GREEN -> REFACTOR), each step a single commit.88- Be specific: exact file paths, function signatures, type definitions, test cases.89- For epic sub-tasks, the base branch is the **epic branch**, not `develop`.90- **Never write a migration number into 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 a plan is wrong within days while still reading as an input. Refer to a migration by what it does, and where the number matters, state the rule instead of a figure: read it from the migration journal at the moment the migration is generated, and read it again immediately before the branch merges.91- **Number every open question.** If the plan has an Open Questions section with one or more entries, each entry gets a stable identifier — `Q1`, `Q2`, `Q3` — written into the entry itself, so the user can answer them by number in conversation, in review comments and in the Jira ticket. Format each as `- **Q<n> — <the question>?** <reasoning and recommendation>`. Numbers are assigned in the order the questions appear and are **never reused and never renumbered**: when a question is later answered, its answer is recorded under its own number rather than the entry being deleted, so a reference to "Q3" means the same thing months later. Add a short note at the top of the section stating that convention. If there are no open questions, say so in one line and add no numbering.9293**Model: use sonnet** — the hard architectural thinking was done in `/plan-epic`. This is execution planning.9495The architect writes the plan to `docs/agomez/plans/{TASK_ID}-short-description.md` (use the parsed `TASK_ID`, not the raw `$ARGUMENTS`).9697## Step 5 — Present the plan for approval9899After the architect completes:1001011. Read the plan file that was written1022. Present the full plan to the user inline1033. **STOP and wait for approval**104105Tell the user:106- "Here's the implementation plan for `TASK_ID`. Review the steps and let me know if you'd like changes, or approve it to proceed with `/implement-task TASK_ID`." (substitute the actual task ID)107- Do NOT proceed to write any implementation code108109## Important Rules110111- **No implementation code** — this skill only produces a task plan document112- **Always use both agents** — investigator first, then architect113- **Always stop for approval** — never auto-proceed to implementation114- **Respect the epic plan** — if this is a sub-task, the epic plan-progress is the source of truth for architecture. Do not contradict it.115- **Focused scope** — plan only what this task requires. Don't plan adjacent tasks or redesign the architecture.116- **Plan file**: `docs/agomez/plans/{TASK_ID}-short-description.md` (separate file, not inside the epic plan-progress)117- **No migration numbers in the plan** — refer to a migration by what it does, never by number, for the reason given in Step 4. Check this when you read the plan back in Step 5 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.118- **Open questions are always numbered** — `Q1`, `Q2`, `Q3`, assigned in document order, never reused, never renumbered when one is answered. Verify this when you read the plan back in Step 5, and fix it yourself if the architect returned an unnumbered list. When you present the plan and when you discuss the questions afterwards, refer to them by number.119- **Extra context is guidance, not requirements** — `EXTRA_CONTEXT` shapes *how* you plan, but the Jira ticket remains the source of truth for *what* the task is. If the two appear to conflict, surface the conflict to the user before proceeding.