When to use
- •You are simplifying or refactoring ticket behavior in
src/agent_loom/ticket/core.py. - •You are changing user-facing ticket output/flags in
src/agent_loom/ticket/cli.py.
Goal
Make ticket internals simpler without breaking the ticket UX contract.
Checklist
- •
Identify the contract surface
- •Decide what output/fields are guaranteed and what is incidental.
- •Write the invariants down as test assertions (not prose docs).
- •
Keep output deterministic
- •Explicitly sort anything originating from dict/set iteration.
- •Avoid timestamps, random IDs, or machine-specific absolute paths in output.
- •
Lock the behavior with a focused UX contract test
- •Prefer
tests/test_ticket_ux.py. - •Assert required sections/lines and ordering; avoid brittle full snapshots unless intentionally the contract.
- •Prefer
- •
Prune docs that duplicate contracts
- •If a large cookbook is removed or shrunk, ensure the equivalent invariants exist in tests.
- •Update any
.opencode/skills/references that pointed at removed docs/paths.
- •
Verification gate
- •
uv run basedpyright - •
uv run ruff check . - •
uv run pytest tests/test_ticket_ux.py
- •
Common failure modes
- •Removing “helpful” docs without replacing the safety net with tests.
- •Output order drifting due to nondeterministic iteration.
- •Tests asserting unstable strings (paths, environment-dependent values).
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.