AGENT SKILL

ticket-authoring

Turn a reported or observed defect into one reviewable ticket under tickets/ with reproduction, evidence, impact, and closure criteria, bound to a fix version — without fixing it or rewriting it into a specification.

License 许可
MIT
最近更新
2026-07-29
Stars
★ 0
Forks
0

01 前言 Front Matter

name
ticket-authoring
metadata
{ "version": "1.0.0" }
description
Turn a reported or observed defect into one reviewable ticket under tickets/ with reproduction, evidence, impact, and closure criteria, bound to a fix version — without fixing it or rewriting it into a specification.
compatibility
Codex and OpenCode

03 SKILL.md 正文

Ticket Authoring

Record what is wrong, precisely enough that someone else can reproduce it, judge its severity, and know when it is fixed. One ticket per independently fixable defect.

A ticket is not a fix and not a specification. Writing the fix here removes the review that a fix would otherwise get; writing a specification here invents a product decision nobody made. Both are failures of this role, not shortcuts.

Inputs

  • The defect report: a failing test, a stack trace, a review finding, a run artifact under ai/runs/<run_id>/, telemetry, or a human's description.
  • tickets/TEMPLATE.md and tickets/README.md.
  • ai/releases/roadmap.json for the versions that exist and docs/ROADMAP.md for their status.
  • The artifact the defect is against: the specification, docs/INVARIANTS.md, docs/DESIGN.md, or the code path.
  • Existing tickets, to find a duplicate before opening a new one.

Procedure

  1. Search tickets/ for the same defect first. A duplicate splits the evidence and hides the real frequency; link to the original instead.

  2. Create the file with the allocated id — never hand-number it:

    ./scripts/ai/create-ticket.sh <severity> "<title>" <type> <found_in> <source> <artifact> <owner>
    
  3. Title the ticket by the wrong behavior, not the suspected cause. "Hold expires while the order is being confirmed" is a title; "race condition in HoldService" is a guess.

  4. Write reproduction as an exact command, request, or click path. If it is not reliably reproducible, say what varies and what was tried — do not round it up to a reproduction.

  5. State expected versus actual, and cite the authority for "expected": a REQ-, an AC-, an INV-, or a named section of docs/DESIGN.md. A ticket with no cited authority is a preference unless the behavior is self-evidently wrong, and then say why. When the authority contradicts itself — a defect-in-spec — use the template's undecided form: name both identifiers, state what is wrong under either answer, and pick neither. Watch the wording in every other section too; a severity line that says "the wrong balance" has silently chosen which value is wrong.

  6. Attach evidence by path — run directory, log excerpt, failing test name. Preserve the raw evidence before summarizing it.

  7. Set severity by consequence, not by how annoying it is: data loss or a security boundary is critical; a wrong result a user acts on is high; a workaround-able defect is medium; cosmetic is low.

  8. Set type. defect-in-spec when the specification itself is wrong or contradictory, design-defect when the UI contradicts docs/DESIGN.md, doc-defect when a document is untrue, regression when it used to work.

  9. Write closure criteria as observable conditions plus the regression test that must fail today.

  10. Leave fix_version null and status: OPEN unless a human has already scheduled it. Scheduling belongs to release-planner.

  11. Append a disposition-history row for every change you make.

Triage

When triaging an existing ticket rather than opening one: confirm or correct the severity with a reason, name an owner, record the fix_version a human decided, move the file to tickets/triaged/, and update the history. Never lower a severity to make a release possible — that decision is a human's and belongs in the release stop conditions.

Routing

Type Where the fix belongs
bug, regression A fix under the current version; promote to a specification only if the correct behavior is genuinely undecided
defect-in-spec spec-writer, through NEEDS_HUMAN_DECISION → SPEC_READY; the run does not resume until the specification is corrected
doc-defect docs-author
design-defect docs-author if docs/DESIGN.md is wrong, otherwise a fix if the implementation is

When a defect needs a product decision, promote it and let spec-writer write the specification:

./scripts/ai/promote-ticket.sh tickets/triaged/TICKET-00X-name.md specs/draft/SPEC-00Y-name.md

Stop conditions

Stop and ask the human when: the expected behavior is not defined anywhere, so "wrong" cannot be established; the report describes two unrelated defects (open two tickets instead); the defect is a security issue that should not be described in a tracked file in this detail; or you are being asked to close a ticket without evidence that the defect is gone.

Scope limits

  • Modify only files under tickets/.
  • Never fix the defect, edit specs/, docs/, blueprint/, guide/, code, tests, or configuration.
  • Never assign fix_version yourself, and never edit ai/releases/roadmap.json.
  • Never close a ticket without closed_as and evidence.
  • Never delete a ticket. A wrong ticket is closed as not-a-defect with the reason, so the report stays on record.

Output

Report the ticket path and id, its severity and type with the reason for each, the authority the expected behavior was cited from, whether it duplicates an existing ticket, and what a human must decide next — normally the fix_version.

04 同仓库更多 Skills