--- name: implement-validate description: "Sub-skill of agile-10-implement. The per-ticket gate: confirm the ticket targets the current repo, then score readiness (AC/DoD/Specs/ADR). Returns pass / out-of-scope / rejected(Needs Info) / critical-park. Not user-invoked." user-invocable: false --- # implement_validate ## 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 Per-ticket gate for `agile-10-implement`: decides whether one Story may enter the build pipeline. Returns exactly one verdict and posts the `πŸ€– agile:phase=validate` marker. It never asks the user β€” `critical-park` hands the question up to the orchestrator. ## Repo-scope check first (hard gate) Establish which repo you are in (`git remote get-url origin` + the consumer `AGENTS.md` (preferred) or `CLAUDE.md` `repo` / `repo-component-map` / `service-name`), then determine the ticket's target repo from its labels (`repo:foo`, or `backend`/`frontend` when those map to separate repos), component field, technical notes, or the ADR's serviceβ†’repo mapping. - **Not this repo β†’** `out-of-scope`, naming the actual target. Leave the ticket in `To Do` β€” no transition, no `needs-info` label; it is correctly specified, just not for here. - **Genuinely ambiguous** (nothing resolves it) β†’ treat as a missing-spec rejection. Never assume it belongs here. ## Readiness score β€” a per-criterion breakdown, not a bare number Score 0–10 across the 7 criteria (skill 8's readiness gate). For each, state the points **and quote the ticket text that earns or fails them**, so the judgement is checkable rather than asserted. A bare "score: 7 β†’ pass" is treated as **not-run** and re-dispatched. 1. **Persona summary** β€” a clear "As a … I want … so that …". 2. **β‰₯2 falsifiable Given/When/Then ACs** β€” quoted; falsifiable means a test could fail it. 3. **DoD present** β€” quoted or referenced. 4. **Specs UI link** β€” present for UI Stories, N/A otherwise. 5. **Technical notes reference the ADR** β€” quoted. 6. **Dependencies resolvable** β€” every "is blocked by" link accounted for. 7. **No open question forcing a mid-implementation architecture decision.** **In this repo AND score β‰₯ 6 AND AC + DoD present β†’ `pass`.** Resolve remaining minor ambiguities by inference from the ADR / Specs UI / PRD standard patterns, recording *every* inference in the marker β€” never infer silently. Transition `To Do β†’ In Progress` and record it with a literal `Transitioned: β†’ ` line: that line is the resume signal, and a `validate` marker without it means the transition never landed and must be re-applied before `plan` starts. **Score < 6, or no AC, or no DoD, or a genuine blocking unknown β†’ `rejected`.** List exactly what is missing and what skill 8 (Refinement) must add, naming the specific failing criteria rather than "score too low". Transition to `needs-info-status-name`, or leave in `To Do` and label `needs-info`. ### Transitioning by discovery β€” never hardcode a transition id Transition ids are per-project and unstable; never assume `21`/`31`/etc. 1. `mcp__atlassian__getTransitionsForJiraIssue` for the ticket. 2. Match the target status (`in-progress-status-name`, default `In Progress`) **case-insensitively by substring against each transition's target `name`**, so localised names ("En cours", "Revue en cours") resolve. Use that transition's id. 3. **Read that list before concluding a status does not exist** β€” never assume from memory that a board has no In-Progress column. Only when no target name matches do you fall back to leaving it in place and noting it. ## A stale reference is not a rejection An AC naming a file, test, or symbol that does not exist β€” or that pins something other than what it describes β€” is **not** a readiness failure. The ticket is specified; one of its references has drifted from the code. Score criterion 2 on whether the AC is *falsifiable*, not on whether every path in it still resolves. Note it in the marker (`Spec drift: AC references β€” verify at plan time`) and let it `pass`. `implement-plan` owns the correction: it establishes ground truth, posts a `πŸ€– ` comment with evidence, and satisfies the AC **by intent**. Reject only when the *intent* is unrecoverable (criterion 7's blocking unknown), never for a broken pointer. **A false PREMISE is the same class as a broken pointer.** A ticket asserting a behaviour ("nothing covers X", "this path is unreachable") can simply be wrong β€” written from inspection, or true when filed and not since. Same handling, same owners: note it here, `implement-plan` establishes ground truth and posts the correction, `implement-pr` carries it into the PR body β€” a PR whose stated justification is one the author already knows is false gets reviewed against the wrong question. ## Critical-decision pre-check If validating already surfaces a **critical** decision β€” irreversible or high-blast-radius **and** not derivable from the ADR/PRD/Specs (destructive migration, auth/security change, breaking a shared contract, a new paid or infra dependency, data-loss risk) β€” return **`critical-park`** with the decision, the options, and your recommendation. The orchestrator escalates one consolidated question and parks the ticket. Never guess a critical decision into the spec. ## 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. A `pass` omitting the per-criterion breakdown or the `Transitioned:` line fails the orchestrator's gate and is re-dispatched. Never delete prior markers. ``` πŸ€– **validate β€” agile-10-implement β€” ** Readiness: /10 1. Persona ............... β€” "" 2. ACs (β‰₯2 falsifiable) .. β€” "" 3. DoD .................. β€” "" 4. Specs UI link ........ β€” 5. ADR reference ........ β€” "" 6. Dependencies ......... β€” 7. No blocking unknown .. β€” Inferences: Spec drift: references β€” verify at plan time / none> Transitioned: β†’ # pass only; omit on rejected/out-of-scope ```