High-signal rules for AI agents. Keep this brief and actionable. Last updated: 2026-06-13
. .venv/bin/activate
timeout 1200 make gate- Tools live in
.venv. make gateis mandatory before every commit.
For plan-based work, execute exactly this loop:
- Pick one next unchecked plan item (single scope).
- Implement only that scope.
- Run targeted tests for touched files.
- Run full gate (
timeout 1200 make gate). - Commit immediately (message references plan item).
- Mark plan checkbox
[x]only after commit. - Repeat for the next item.
Hard rules:
- If tests/gate fail: go back to implementation; no commit.
- Do not batch multiple plan items into one commit unless plan explicitly says so.
- Do not stop at “green but uncommitted”.
-
Undo edit path bypasses
JsonTreeItem.set_data()- Real replay path:
DocumentMutationGateway→ undo command →undo/diff.py:DiffApplier.apply(). - Type/value fixes often require changes in both item logic and
DiffApplier.
- Real replay path:
-
mpqwhole numbers are inferred as FLOAT unless converted- Convert
mpq(n,1)tointwhere integer semantics are required.
- Convert
-
UI uses proxy model
- Map indices proxy↔source before touching tree items.
-
Base64 auto-inference has a persisted minimum-length guard
- Automatic string→
BYTES/ZLIB/GZIPinference only runs when the string length meets the currentedit_limits/base64_min_length_charsthreshold (default100). - Short valid base64 stays
STRINGunless the type is pinned explicitly or the threshold is lowered.
- Automatic string→
editors/inline/*,editors/windowed/*must not importapp/,documents/,tree/.editors/factory.py,editors/context.pymust not importapp/,documents/.tree/must not importapp/,documents/,editors/,delegates/,state/,validation/.- No reflection (
getattr/hasattr/TYPE_CHECKING) outside allowlist.
- Types/coercion:
tree/types.py,tree/item_coercion.py - Item/model behavior:
tree/item.py,tree/model.py - Undo replay:
undo/commands.py,undo/diff.py - Tab composition/lifecycle:
documents/composition/*,app/tab_lifecycle.py,app/main_window.py - Validation:
documents/controllers/validation.py,validation/*
- Use
QT_QPA_PLATFORM=offscreenfor pytest. - Prefer focused tests during development, then full gate.
- Add regression tests for every bug fix or plan checkpoint.