When to use
- •You changed
src/agent_loom/ticket/cli.py,src/agent_loom/ticket/core.py, orsrc/agent_loom/ticket/store.py. - •You changed ticket file format / serialization (
src/agent_loom/ticket/frontmatter.py). - •You added/changed ticket state fields, storage shape, or CLI behavior.
Goal
Keep ticket behavior consistent across CLI, core logic, and persistence; keep invariants testable.
Checklist
- •
Surface area audit
- •Identify the behavior you changed: CLI parsing/output, core semantics, persistence shape, adapters/API.
- •Confirm the CLI maps cleanly to core operations (no duplicate business logic in CLI).
- •
Persistence + format invariants
- •If store schema/format changed, define upgrade/migration expectations.
- •Ensure read/write paths are symmetric.
- •If frontmatter/serialization changed, add a round-trip test (load -> write -> reload) to lock the format.
- •Ensure errors are actionable (what file, what field, what expected shape).
- •
Deterministic output
- •Keep CLI output stable and parseable where possible.
- •Use explicit ordering for fields/lists; do not rely on dict/set iteration.
- •
UX contract tests
- •If output formatting/UX changed, add/update a focused contract test in
tests/test_ticket_ux.py.
- •If output formatting/UX changed, add/update a focused contract test in
- •
LSP first
- •Run
lsp_diagnosticson touched files. - •Fix errors/warnings before lint/tests.
- •Run
- •
Lint
- •Run
uv run ruff check ..
- •Run
- •
Targeted tests
- •Add/adjust focused tests for the changed behavior (CLI + core + store + format).
- •Start with
uv run pytest tests/test_ticket_ux.pywhen UX/output is involved. - •Otherwise run the smallest relevant subset first, then expand if needed.
Common failure modes
- •CLI behavior changes but core/store invariants are not covered by tests.
- •Store changes land without clear handling of existing on-disk data.
- •Frontmatter/file-format changes land without a round-trip regression test.
- •Output becomes order-dependent (dict/set iteration) and breaks snapshots or tooling.
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.