Context
Executes exactly one kind: service ticket per invocation (no internal polling loop — repeated processing is the caller's responsibility). Never touches kind: manual tickets. Service tickets (tickets/*.yaml) are gitignored by design — their history[] field is the audit trail; governance tickets (tickets/governance/) are tracked in git. Design: docs/archive/superpowers/specs/2026-07-16-service-ticket-kanban-design.md.
Execution Steps
- Run
bun scripts/ticket.ts next. If it prints "No waiting service tickets.", stop. - Otherwise parse the printed ticket JSON. Load
services.yaml, look upticket.servicein the catalog (this is the only placerun.refis read from — never from ticket content). - Execute via array-form spawn only — never build a shell command string:
run.type: script→Bun.spawn(['bun', absPath, '--inputs-json', JSON.stringify(ticket.inputs ?? {})])<!-- encoding-check-ignore -->run.type: skill→ invoke the named skill, passingticket.inputsas its argument object
- On success (exit code 0):
bun scripts/ticket.ts move <id> review - On failure:
bun scripts/ticket.ts move <id> failed --error "<captured stderr/stdout tail>"— the--errorflag writes the message onto the ticket'serrorfield as part of the same atomic transition.
Related
scripts/ticket.ts,scripts/helpers/ticket-store.ts,scripts/helpers/ticket-schema.tsscripts/dispatch.ts— a different, session-scoped mechanism; a service's own execution may invoke it internally, butticket-runitself does not.