When to use
- •You changed team spawn/integrator wiring, usually in
src/agent_loom/team/core.pyorsrc/agent_loom/team/cli.py. - •You added/changed how an integrator process/module is selected, started, or configured.
- •You changed what gets returned/persisted as a result of spawning (IDs, config, paths, status).
Goal
Keep spawn/integrator behavior deterministic and locked by a focused contract test.
Checklist
- •
Define the contract
- •What exactly should be started (and what should not)?
- •What arguments/config must be passed?
- •What observable outputs must be stable (returned values, persisted state, printed summaries)?
- •
Make behavior deterministic
- •Explicit ordering when building lists (agents, steps, commands).
- •Avoid relying on dict/set iteration.
- •Stub/mock nondeterminism (temp paths, timestamps, random IDs) in tests.
- •
Add/update
tests/test_team_spawn_integrator.py- •Assert stable invariants (not incidental implementation detail).
- •Prefer direct unit-style tests over full snapshots unless the full output is the contract.
- •
Verify
- •Run LSP diagnostics on touched files.
- •Run
uv run ruff check .. - •Run
uv run pytest tests/test_team_spawn_integrator.py.
Common failure modes
- •Tests accidentally assert on nondeterministic content (paths, random IDs, timing).
- •Spawn code changes without updating the contract test, letting wiring drift.
- •Ordering-dependent behavior differs across machines/runs due to implicit iteration.
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.