When to use
- •You changed any of:
- •
src/agent_loom/workspace/diff_ops.py - •
src/agent_loom/workspace/repo_ops.py - •
src/agent_loom/workspace/poly_ops.py - •
src/agent_loom/dashboard/workspace_read.py
- •
- •You touched logic that emits diffs, file lists, repo state summaries, or any data that could vary by machine.
Goal
Keep workspace diff/read outputs deterministic, agent-legible, and regression-tested.
Checklist
- •
Deterministic ordering
- •Explicitly sort lists derived from the filesystem, git, dicts/sets.
- •Prefer stable keys (path, name, type) and document the ordering in tests.
- •
Path stability
- •Prefer repo-root-relative paths in emitted data.
- •Avoid absolute paths and machine-specific prefixes.
- •Normalize separators and casing only if required by the repo contract.
- •
Output shape is a contract
- •Keep keys/fields stable.
- •Avoid embedding timestamps, random IDs, or nondeterministic hashes.
- •
Add/extend focused tests
- •Assert invariants (required fields, ordering rules, normalization) rather than entire payload dumps.
- •Add targeted fixtures that cover edge cases:
- •empty repo / no changes
- •rename vs delete
- •binary files
- •ignored/untracked files
- •
Verification gate
- •
uv run basedpyright - •
uv run ruff check . - •
uv run pytest <smallest relevant module(s)>
- •
Common failure modes
- •Output order changes due to nondeterministic iteration.
- •Absolute paths leaking into results (breaks determinism and agent parsing).
- •Tests asserting full payloads that include volatile details.
- •Git plumbing returning platform-specific results without normalization.
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.