--- name: implement-plan description: "Sub-skill of agile-10-implement. Read every linked artifact (ADR, Specs UI, PRD, linked Bugs) and produce a concrete implementation plan + ACβ†’test map, posted as the πŸ€– plan marker. Not user-invoked." user-invocable: false --- # implement_plan ## Host execution **Claude Code:** retain the agent-dispatch and concurrency behavior defined below. **Codex:** use only the inline behavior stated here. On Codex this sub-skill runs inline under `agile-10-implement` with `concurrency=0`; never spawn or assume a named agent. Perform its full gate and return its normal receipt to the caller. ## Purpose Planning phase for `agile-10-implement`, invoked with a validated ticket. Produces the plan and posts the `πŸ€– agile:phase=plan` marker β€” the orchestrator recovers the plan body from that comment on resume. **Autonomous β€” never prompt the user.** Decide and document everything reversible, flagging it for the reviewer. The only stop is a *critical* decision (irreversible or high-blast-radius **and** not derivable from the ADR / PRD / Specs): return `critical` to the orchestrator, which parks that one ticket and asks. This holds in `concurrency=0` inline mode too, where no agent wraps this skill. ## Read everything before planning - **The ticket, re-fetched in full** (`mcp__atlassian__getJiraIssue`: description, *every* AC, DoD, technical notes). This is the spec of record β€” plan from it, never from memory or from prior-context assumptions about what it "probably" says. If a planned change contradicts an AC (column list, table shape, API surface), stop and re-read: the AC wins. - **ADR** β€” stack, API style, auth, data model, infra constraints. - **Specs UI** β€” every screen and every state (default / loading / empty / error / success) for UI Stories. - **PRD** β€” the edge-case context behind the ACs. - **Linked QA Bugs**, on a re-implementation β€” what previously failed. ## Produce the plan - **Files / modules to touch**, in implementation order: data β†’ service β†’ API β†’ frontend β†’ tests. - **ACβ†’test map** β€” every AC to at least one test; every edge-case AC to its own. - **Flagged decisions** β€” anywhere the ADR is silent and a reversible choice gets made; note the choice. A *critical* decision surfacing here is not planned around β€” surface it so the orchestrator can escalate. Post it as `πŸ€– agile:phase=plan` and return it. ## When the ticket text itself is wrong Specs drift from code: an AC written weeks ago names a file that moved, a test pinning a *different* component's state, a renamed symbol, a path that never existed. Planning is where this surfaces, because planning is the first phase that reads the code the AC points at. This is **not** a rejection (the intent is clear, only a reference is stale), **not** a literal edit of the file the AC names (that ships a change nobody wanted while reporting "AC satisfied"), and **not** a silent fix (the correction then lives only in your context and the reviewer reads it as an unexplained deviation). Correct it in the open, then satisfy the AC by intent: 1. **Establish ground truth** β€” confirm the reference is actually wrong (missing, or present but not doing what the AC says) and find what the AC *meant*. 2. **Post the correction to the ticket** as its own comment, before planning around it. Evidence is mandatory: a correction with no `path:line` or command result is just a second opinion about the spec. Never edit the AC text β€” append, so the trail shows both what was written and what was built. ``` πŸ€– **spec correction β€” agile-10-implement β€” ** AC says: "" Ground truth: β€” evidence: Reading instead: β€” because Intent satisfied by: ``` 3. **Plan against the intent**, referencing the correction. The AC is satisfied when its purpose is met, not when its literal wording is pattern-matched. 4. **Carry it forward** β€” into the plan's flagged decisions and into the PR body, so the reviewer meets the correction before the diff. **Escalate instead when the intent is unclear.** A broken reference whose two candidate readings imply different *features* (not different paths) is a genuine blocking unknown: surface it as a validation-gate `rejected` on re-entry, or a critical escalation when a wrong guess is expensive. "The reference is broken" is a correction; "the requirement is unknowable" is a rejection. ## Marker β€” mandatory, exact format Post via `mcp__atlassian__addCommentToJiraIssue` (`contentFormat="markdown"`). The comment **must begin with the literal HTML comment** or resume detection (which greps `πŸ€– `) misses it and the phase re-runs. Never delete prior markers. ``` πŸ€– **plan β€” agile-10-implement β€” ** ```