When to use
- •You are refactoring
src/agent_loom/server/templates/*.htmland the structure/sections may move. - •You are adding new sections that should be addressable by agents/tests.
Goal
Keep server HTML legible and testable via stable markers, not brittle formatting.
Checklist
- •
Add/keep stable anchors
- •Prefer
data-*markers for key sections (for example:data-page,data-section,data-item). - •Avoid using random IDs, timestamps, or absolute paths in attributes/text.
- •Prefer
- •
Make repeated content deterministic
- •Ensure template loops render in a stable order.
- •If the data source is unordered, sort it before rendering.
- •
Write resilient assertions
- •In
tests/test_server_api_contract.py, assert presence of markers/section labels and ordering. - •Avoid full HTML snapshots and whitespace-sensitive expectations.
- •In
- •
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.