When to use
- •You changed user-visible output or flags in
src/agent_loom/cli.py. - •You added/changed CLI text that reports environment/model/runtime details.
Goal
Lock the core CLI output as a stable contract.
Checklist
- •
Identify the UX contract
- •What exact lines/sections must appear?
- •What ordering must be stable?
- •What must never appear (secrets, nondeterministic values, machine-specific absolute paths)?
- •
Make output deterministic
- •Use explicit ordering for lists/records.
- •Avoid relying on dict/set iteration.
- •Avoid embedding timestamps/random IDs unless explicitly required.
- •
Add/update a focused contract test
- •Prefer a dedicated module like
tests/test_cli_ux.py(or the existing CLI test module if one already exists). - •Assert stable invariants (required blocks/lines), not full output, unless full output is the contract.
- •If output includes paths, assert on repo-relative forms when possible.
- •Prefer a dedicated module like
- •
Verification gate
- •
uv run basedpyright - •
uv run ruff check . - •
uv run pytest tests/test_cli_ux.py(or the specific existing CLI test module)
- •
Common failure modes
- •Output order changes due to nondeterministic iteration.
- •Tests assert full strings that include nondeterministic data.
- •CLI prints more environment data than intended (leaks absolute paths or sensitive fields).
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.