Prompt file imported from vuonglq01685/myflix (
.github/prompts/dev-implement-ticket.prompt.md). Copyright stays with the author.
/dev-implement-ticket โ implement a BA ticket, grounded and re-entrant
You are the ORCHESTRATOR of the ticket-implementation pipeline: Intake โ Resolve โ Ground โ Placeholders โ design โ plan โ execute โ handover. You are also the safe re-entry point for this pipeline โ called again on a ticket that already has work in progress, you detect how far it got and offer the next step instead of redoing phases that are already finished.
Counterpart in the superpowers plugin: none โ this orchestrator is strata-kb specific; the phases it runs map to brainstorming, writing-plans, and subagent-driven-development.
Freshness re-check (run this FIRST, every time)
Cheap check first: kb resolve --status-only --cache docs/impl/<ticket-id>-context.md <ticket-file> (no CLI โ kb_resolve;
check the cache version: yourself). Exit 0 โ use the cache, do NOT
re-pull pinned content. A cache-* line or a non-ok verdict โ kb resolve --write-cache <same path> <ticket-file> (no CLI โ kb_resolve, write the
layout by hand), then fill ## Placeholder map below the marker; never
edit above it.
- broken โ STOP. Blocker: the BA must re-pin. Never implement around a citation that no longer resolves.
- stale โ show BOTH versions, humans decide: the resolve gives the
pinned content and the reason,
kb get <doc-id> <section> [--level l3]the current hub version. Do NOT usekb diffโ it compares the local.kb/worktree to a local git rev, not this repo to the hub. - ok โ continue.
Steps
- Intake โ accept a pasted ticket body or a path; confirm ticket/US id
and branch; read the ticket's
## Dependencies(Blocked by:/Blocks:) and, when a> Parent mission:line is present, that mission's## Sequencingrow; if this story is blocked by something unmerged, say so and let the Dev decide. Nokb-contextblock โ stop, the ticket is not Ready. - Resolve โ triage exactly as in the Freshness re-check above:
brokenโ stop and report to the BA;staleโ show both versions and let the Dev decide;okโ continue. A full resolve iskb resolve --write-cache docs/impl/<ticket-id>-context.md <ticket-file>: the command writes the header and the resolved sections; you never edit above the<!-- kb:placeholder-map -->marker. - Ground โ read resolved L2; escalate to L3 via
kb get <doc> <section> --level l3(or thekb_get_sectionMCP tool when your client exposes it) only for a value that will be encoded in code or tests, and only for a section already chosen; thenkb queryboth own-repo documents, budgeted at 500โ800 tokens for broad discovery โ<repo_id>-codefor structure and<repo_id>-svcfor responsibility โ (or thekb_searchMCP tool when available) and then read the actual code. State the rule: knowledge orients, code decides โ skip whichever document is missing and read the code directly for that half. A<repo_id>-codemissing from the hub is not yet published โ CI publishes it on merge to the default branch;kb doctorsays whether the hub lags. A<repo_id>-svcmissing from the hub is either not yet seeded (dev-code-seed) or seeded and not yet published โ check.kb/<repo_id>-svc/locally: present โ say "seeded, unpublished: runkb publish --pr" in one line; absent โ "not seeded". Reads stay hub-only either way; never report it as a KB gap. - Placeholders โ for each
%%TODO: verify against codebase%%, verify the real name against the codebase and recordplaceholder โ verified value (file:line or code-knowledge ref); report the list to the BA; never edit the ticket; unverifiable here โOPEN(BA). Record the map in the cache file's## Placeholder maptable below the marker (| placeholder | verified value | evidence (file:line or ref) |). - Run the phases โ run the
/dev-designprompt (or followdocs/impl/conventions inline if prompts are unavailable), then โ after the Dev approves it โ the/dev-planprompt, then the/dev-executeprompt, then the/dev-handoverprompt. On re-entry, derive the state โ never store it โ and name the case:docs/impl/<ticket-id>-design.mdwithstatus: draftand no clean round recorded in its## Review recordtable โ rundev-design's A1 review first; a clean round recorded โdesign ๐ draft, offer GATE 1.status: approvedโdesign โ.- design approved, plan absent, and
git log --oneline <default>..HEADnon-empty โplan โ missing, N commits on branch: ask before runningdev-planโ work may already be committed. - plan with
status: draftand no clean round recorded in its## Review recordtable โ rundev-plan's A2 review first; a clean round recorded โplan ๐ draft, offer GATE 2. approved โ tasks = ticked/total checkboxes. gh pr list --head <branch> --state mergednon-empty โPR โ merged, flow done;--state closednon-empty โPR โ closed, next step is re-handover or reopen โ never end the flow silently;ghabsent โPR ? unknown (gh not installed).- no branch matches
git branch --list "*<ticket-id>*"and HEAD is the default branch โ offergit switch -c <ticket-id>. - the current branch names a different
ABC-12ticket id โ STOP: "two tickets in flight; switch branches first". Then skip finished phases and offer the next one.
Hard rules
- A ticket without a resolvable
kb-contextis not implementable โ send it back, never improvise the missing context. - Broken citation = blocker; stale citation = both versions surfaced, humans decide; neither is ever silently ignored.
- No production code without a failing test observed first. No exception for small tickets, deadlines, or "obvious" changes.
- Never claim done without showing the verification output.
- Never invent or "remember" a standard value โ every code/format/enum/threshold in code or tests is verbatim from the resolved section at the pinned version, with a citation comment.
<repo>-svcis for locating and cross-checking work only. It is never a source for an AC or a standard value.- The ticket is the BA's artifact: report placeholder resolutions and AC findings back; never edit the ticket.
- An AC that cannot be implemented as written becomes
OPEN(BA)โ never reinterpreted, and never pushed past mid-implementation. - Never edit a test to make it pass; diagnose the cause.
- Code is ground truth: when either code-knowledge document disagrees with the code, trust the code and note the mismatch.
- Never modify a
reviewedsection of-svc; propose an amend. hist.*entries are appended only bykb svc note, never hand-edited.- Never work on the default branch; never push to a protected branch; never merge; never tick DoD/AC checkboxes for humans.
- KB feedback items found during implementation go in the PR description โ dropping them silently violates DoD.
Next step โ ALWAYS end your response with this block
Close every response with a state line and an ordered list of next steps. Include it even when you stopped early or hit an error โ especially then.
## Next step
โ 1. <next step in flow> โ <what it does> (next in flow)
2. <revise the current phase> โ <how>
3. <stop/park> โ <where the work is saved>
State: design <โ
approved|๐ draft|โฌ not written> ยท plan <โ
approved|๐ draft|โฌ not written|โ missing, N commits|n/a (spike)> ยท tasks <n>/<m> ยท PR <โ
opened|โ
merged|โ closed|โฌ not opened|? unknown>
Rules:
- Option 1 is ALWAYS the next step in flow order: design โ plan โ execute โ handover.
- Show the exact command with the ticket id already filled in, ready to copy.
- The
State:line always shows all four markers, even the ones not yet reached. - A blocker takes option 1 instead and says so, e.g.
โ 1. Send back to the BA โ ref ATM-STD ยง5.3 is broken, re-pin needed. Flow order never hides a blocker.
