AGENT SKILL

ticket-standard

Check a ticket draft before filing.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 15
Forks
2

01 前言 Front Matter

name
ticket-standard
description
Check a ticket draft before filing.

03 SKILL.md 正文

ticket-standard — no plan, no done-condition, no proof: no ticket

Lean-invoke: run it when you are about to file a ticket, or to complete a draft that was parked. Not always-on. The checker is a script, so the verdict does not depend on you remembering the rules.

The draft shape (seven sections)

Write in plain user language. The first section says who notices and what changes; jargon-only tickets are refused by a human at review even when the script passes them.

  1. Impact - who notices, what changes for them.
  2. What - the change, one short paragraph.
  3. Why - the decision or incident behind it.
  4. Plan - numbered steps.
  5. DoD - the observable done-condition, one line per check.
  6. Proof - the named evidence (rule below).
  7. Agent detail - what a worker needs that a reader does not (files, suites, ordering).

Each section is a ## heading, or a bare line that is exactly its name (as Jira renders a heading back); a bold line is never a heading. Also give a primary Sector: --sector NAME or a Sector: <name> line. Each section needs at least one real line, and Plan and DoD each need a real bullet or numbered line; TBD, TODO, TBC, N/A, none, ..., ? and <placeholder> count as empty. Fenced code never makes a heading, a list item, a Metric: or an Edges: line.

Give the ticket's labels with --labels a,b. Without it, a draft's Labels: line is the offline fallback; when both are given and differ, that is a finding.

A ticket whose labels carry ci, guard, guardrail, stability or flake (or a ci-… / guard-… variant) also needs a Metric: <scorecard column> line naming the stability-scorecard metric it moves (columns: specs/research/stability-scorecard.tsv). Metric: may be bare, bulleted (- Metric:) or bold (**Metric:**), in any case. Without one it is refused like a missing section.

A Plan that names two or more ticket keys also needs an Edges: line: which ticket blocks which and whether hard or soft, e.g. Edges: PROJ-100 blocks PROJ-101 (hard), or Edges: none when they are independent. The chain graph orders dispatch from it. It may be bare, bulleted or bold, in any case; a multi-ticket Plan without one is refused like a missing section (the message names the line). A Plan naming one key or none is unaffected. Any ABC-123-shaped token in the Plan counts as a key, prior-art keys included; Edges: none is the escape for a false hit.

A Bug draft also asks for two labels, so the weekly escape report (scripts/ci/escape-report.sh) can group it: found-by:<who> (operator, worker, console, tick, ci-pr, ci-main, review or user) and escape:<class> (contract, merge-skew, platform, guard or flake). Ask for both when you file a Bug; a Bug missing either is listed as UNLABELLED in the report. This is a request, not a refusal: the checker does not gate on it.

The title

One of two kinds:

  • System: <Sector>: <the result>, e.g. Ship loop: merge waits for the signed GO.
  • User-facing: a short plain sentence of what the user can now do, e.g. See which tickets are system work.

No commit prefix (feat(x):), no ticket id, no internal names (--flag, field_name, file paths, backticked code), at most 90 characters. jira create warns with this template for a Task, Story or Bug that breaks it (exit 0, the ticket is still filed); an Epic or Subtask is not checked.

Proof rule per kind

Kind Proof names
Feature an end-to-end run of the real user path, or a POC
Guard a RED row plus a negative control
Hygiene the check that would have caught it, shown green

A check that cannot fail is not proof.

Refuse and warn

Type Missing section Missing Sector
Task, Story, Bug refused: names every missing section, parks the draft, exit 1 warns, exit 0
Epic, Subtask warns, exit 0 warns, exit 0

Optional deterministic normalization before filing

Offer a deterministic punctuation pass, not a model rewrite. Skip is valid and never blocks filing. Keep the original and write a separate candidate:

python3 -I marketplace/plugins/himmel-ops/scripts/humanizer-facts.py --normalize draft.md normalized.md

Only continue with the candidate if normalization succeeds. It changes spaced em/en dashes after leading bold/code labels to colons, other spaced dashes to commas, and curly quotes to straight quotes. Its banned-word list only flags possible filler; it never removes or rewrites words. Technical uses may be valid. No model runs, no plugin is enabled, and no default profile changes.

Run the checker with --draft draft.md --rewrite normalized.md. Both steps compare ticket keys, numbers, file names, inline code, fenced/indented code and bare command lines. If punctuation changes a protected literal, normalization refuses without writing a candidate; keep the original rather than altering code. Changed facts, an unreadable candidate or an unavailable checker also retain the original. An accepted candidate still has to meet the ticket standard. Read its diff: punctuation and literal checks do not prove semantic equivalence. File normalized.md only after normalization succeeds, humanizer: accepted and the ticket-standard ok:; otherwise file the passing original.

Record humanizer: skipped, humanizer: kept <count>, or humanizer: dropped <count> in the filing note (counts are passages the writer kept or rejected, not a style score). Never add this bookkeeping to user-facing prose. The pilot counts later operator-kept changes; acceptance by the script is not that count.

Run it

D="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT}"
[ -f "$D/scripts/ticket-standard-check.sh" ] || D="$(git rev-parse --show-toplevel)/marketplace/plugins/himmel-ops"

bash "$D/scripts/ticket-standard-check.sh" --type Task --sector "Planning & tracking" --labels standalone --draft draft.md

The draft file is never changed. A passing draft prints ok: and writes nothing to the queue.

The intake queue

A refused draft is copied to <HANDOVER_DIR>/<USER_SLUG>/himmel/intake/<UTC time>-<Type>-<rand>.md (override: TICKET_STANDARD_QUEUE_DIR). Copies never overwrite each other. If the copy cannot be written the script says NOT PARKED and still exits non-zero. Without HANDOVER_DIR or the override it refuses to guess a queue.

To re-run a parked draft: edit the parked file (or your original), then run the checker on it again with the same --type. Work the queue until it is empty: a parked draft is unfinished work, not trash.

File a passing draft

Use the Jira CLI by absolute path from the primary checkout, with the draft as the description file; see docs/internals/jira-plugin.md for the ops.

JIRA_PROJECT_KEY=HIMMEL node <repo-root>/scripts/jira/dist/index.js create --type Task --title "<title>" --sector "<Sector>" --parent <EPIC-KEY> --desc-file draft.md

create also refuses a Task, Story or Bug with no --sector, or with neither --parent <EPIC-KEY> nor --labels standalone; an Epic or Subtask only warns. Sectors: Fleet orchestration, Ship loop, Safety & enforcement, Cost & efficiency, Visibility, Quality & proof, Deployment, Knowledge & steering, Planning & tracking.

jira create runs the same ticket policy (scripts/ticket-policy.mjs) on the body against the labels it will write; this skill is the earlier step that keeps what it refuses. A checker pass says body check passed (body only ...): home, placement and the final labels are still checked by jira create. If node or the policy cannot run, the checker fails closed (exit 2).

04 同仓库更多 Skills