When to use
- •You are about to make a large change to
src/agent_loom/server/templates/*.html(especiallysrc/agent_loom/server/templates/dashboard.html). - •You expect lots of line churn (reindent, rearranging sections, extracting repeated markup).
Goal
Make the refactor readable and keep the server-rendered HTML contract deterministic.
Checklist
- •
Preserve stable anchors
- •Prefer
data-*hooks for sections/components that tests and agents rely on. - •Keep headings/section labels stable unless you are intentionally changing UX.
- •Prefer
- •
Minimize formatting-only churn
- •Avoid mass reformatting that obscures structural/behavior changes.
- •If formatting churn is unavoidable, keep changes isolated and explainable (single theme per edit).
- •
Enforce deterministic output
- •Explicit ordering for repeated items (no set/dict iteration).
- •Avoid timestamps/random IDs/absolute paths in rendered HTML.
- •
Update the request-level contract test
- •Prefer
tests/test_server_api_contract.py. - •Assert required markers/sections and ordering (avoid full HTML snapshots).
- •Prefer
- •
Verification gate
- •
uv run basedpyright - •
uv run ruff check . - •
uv run pytest tests/test_server_api_contract.py
- •
Manual notes
This section is preserved when the skill is updated. Put human notes, caveats, and exceptions here.