When to use
- •You changed prompt assembly, templates, or any code in
src/agent_loom/team/prompts.py. - •You changed prompt-facing behavior in
src/agent_loom/team/core.pyorsrc/agent_loom/team/cli.py. - •You introduced/modified team runtime modules that influence prompt inputs (commonly
src/agent_loom/team/inbox.py,src/agent_loom/team/models.py,src/agent_loom/team/constants.py).
Goal
Keep prompt outputs stable, reviewable, and regression-tested.
Steps
- •
Identify the prompt contract you changed
- •Inputs: what variables/context are interpolated?
- •Outputs: what exact text format or invariants must hold?
- •
Add/update tests
- •Prefer updating
tests/test_team_prompts.py. - •Assert on stable invariants (sections/headers/required phrases) instead of brittle full snapshots unless a full snapshot is the contract.
- •Add a regression test for any bug fix.
- •Prefer updating
- •
Run diagnostics and checks
- •Run LSP diagnostics on touched files via
lsp_diagnostics. - •Run
uv run ruff check .. - •Run
uv run pytest tests/test_team_prompts.py(or the smallest relevant subset).
- •Run LSP diagnostics on touched files via
- •
Review prompt diffs like API diffs
- •Read the final prompt text as if you are the model.
- •Confirm: no accidental leakage (paths, secrets), no contradictory instructions, no duplicated sections, and consistent terminology.
Common failure modes
- •Tests assert full prompt text but the prompt contains nondeterministic content (timestamps, paths, order-dependent dict iteration).
- •Prompt changes land without corresponding test coverage, causing silent regressions.
- •“Small” refactors subtly reorder or drop constraints (role, tool rules, JSON-only requirements).
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.