| name | to-bug-ticket |
| description | Write a single structured bug ticket to .workflow/kanban/backlog/ after running /diagnose. Use when diagnose has completed and you have a root cause, repro, and fix approach. Triggers: "to-bug-ticket", "/to-bug-ticket", "write bug ticket", "create bug ticket". |
to-bug-ticket
Writes one ticket to .workflow/kanban/backlog/ using the bug ticket template. Takes input from /diagnose output.
Input Required
Before writing the ticket, confirm you have:
If any are missing, tell the user to complete /diagnose first.
Ticket Filename
Format: .workflow/kanban/backlog/NN-<slug>.md
NN: next available number in backlog (check existing files)
slug: kebab-case description of the bug (e.g. null-pointer-on-empty-cart)
Frontmatter
---
id: <NN>
slug: <kebab-case-bug-description>
kind: bug
language: <typescript|python|kotlin|swift>
depends-on: []
parallel-safe: false
files-touched: [<list from diagnose>]
acceptance: "<one sentence: what correct behaviour looks like after the fix>"
---
kind: bug distinguishes from feature tickets. parallel-safe is always false for bugs — bugs share causal chains, never parallelize.
Ticket Body Template
## Repro
<!-- The failing test or script from diagnose Phase 1. Must be runnable. -->
<!-- This IS the TDD failing-test step — paste it here exactly. -->
<paste repro from diagnose>
## Root Cause
<!-- One paragraph from diagnose Phase 3–4. State the hypothesis that was confirmed. -->
<root cause from diagnose>
## Fix
<!-- Minimal change needed. Reference specific files and lines from diagnose Phase 5. -->
<fix approach from diagnose>
## Unit Tests
<!-- Unit tests that target the specific function/handler/logic being fixed. -->
<!-- These test logic in isolation — NOT the repro scenario end-to-end. -->
<!-- SCOPE: the exact function/branch/condition identified in Root Cause only. -->
<!-- Mirror the delta-scoping in to-tickets: test only the fixed logic path. -->
<!-- Do NOT add tests for callers, entry points, or behavior unaffected by this fix. -->
<!-- Write these RED first alongside the repro, then make both green with the fix. -->
- `test/<file>_test.<ext>::<test_name>` — what it asserts
## Regression Guard
<!-- The repro test above, now expected to pass after the fix. -->
<!-- Required section — kanban-loop will NOT mark this ticket done without it. -->
<!-- State: which test file, which test name, what assertion proves the bug is gone. -->
<!-- SCOPE: assert the fixed behavior delta ONLY. -->
<!-- Do not re-verify behavior the existing test suite already covers. -->
<!-- Those tests are unchanged and still run — do not re-assert them here. -->
<regression test plan from diagnose>
Rules
- One ticket per bug. Multi-ticket only if diagnose explicitly surfaced independent defects with separate root causes. Requires a one-line justification in each ticket body.
- Regression Guard is required and non-empty. The kanban-loop subagent will refuse to mark the ticket done if this section is empty.
- Unit Tests section is required and must contain ≥1 test. Tests must cover the specific logic path that contains the bug — not just the end-to-end repro. The kanban-loop subagent must write these RED before touching
src/.
- Unit tests and regression guard tests are scoped to the bug's logic path only. Do not re-assert behavior unaffected by this fix — that behavior is already covered by the existing test suite.
- Do NOT re-assert or re-verify behavior unaffected by this fix in the Unit Tests or Regression Guard sections. That behavior is already covered by the existing test suite and unchanged by this ticket.
- Do not write the fix — write the ticket. Implementation happens in
/kanban-loop.
- Do not create a PRD. Bugs have no PRD.
Next Step
Bug ticket written. Run /kanban-loop next to drain the backlog — it will implement the fix using TDD and gate on the regression guard passing.