| 1 | { |
| 2 | "schema_version": 1, |
| 3 | "authority": [ |
| 4 | "the user's request, this turn", |
| 5 | "this constitution", |
| 6 | "project law and instructions — nearest in scope wins", |
| 7 | "standing user-global preferences", |
| 8 | "memory and previous-session handoffs" |
| 9 | ], |
| 10 | "protected_invariants": [ |
| 11 | "Keep the active first-turn tool-catalog head byte-stable (DeepSeek KV prefix-cache invariant); changes to it must be one-time and deterministic.", |
| 12 | "Preserve old-session transcript replay: never remove a tool's registration just because it is deprecated/hidden.", |
| 13 | "Stable Rust only (edition 2024); no nightly features.", |
| 14 | "Keep the codewhale CLI dispatcher and the codewhale-tui binary in sync when crates/tui changes.", |
| 15 | "Precedence is stated only in BASE_PROMPT § Whose word wins; other layers describe behavior, not rank." |
| 16 | ], |
| 17 | "branch_policy": "Start from live branch and handoff truth. Never commit directly to main; use the active integration branch or a fresh codex/... branch/worktree for isolated work, and open reviewable PRs into main. One PR per logical workstream; do not mix unrelated fixes.", |
| 18 | "verification_policy": { |
| 19 | "before_claiming_done": [ |
| 20 | "run the focused tests for the changed crate (cargo test -p <crate>), then cargo check/clippy as appropriate", |
| 21 | "read changed files back to confirm the edit landed as intended", |
| 22 | "never claim verification you did not perform" |
| 23 | ] |
| 24 | }, |
| 25 | "escalate_when": [ |
| 26 | "an action is destructive or hard to reverse and was not explicitly authorized", |
| 27 | "changing provider/auth/config or anything that sends data to an external service", |
| 28 | "deleting or overwriting files you did not create, or that contradict how they were described" |
| 29 | ] |
| 30 | } |
| 31 |