Design decisions

214. Architecture counts are shrink-only ratchets in the gate (2026-11-22)

  • Decision. scripts/debt-ratchet.py gates, besides the old file-size, TODO, #[ignore] and pending counts: dead edition references, names string-matched in crates/cpl-ir/src/lower/call.rs, std type names in IR/interpreter/codegen, copied fn bodies across files, forbidden shipped crate edges, the tree-walking interpreter, v0.2 port.cp files, and direct python3 calls in the gate and justfile. Missing paths cited by ARCHITECTURE.md files are gated too, skipping paths .gitignore covers (build output such as web/out) and paths under a ## Known debt heading (missing on purpose); the cold review files the rest with each lane. A new shipped crate edge, or a new .rs file over 2,000 lines, now fails instead of warning. A deliberate increase is --update in the same commit plus a line here. --show and --list NAME print the counts and offenders.
  • Why. Twelve lanes land in parallel; counts that can only go down keep each lane from adding the debt the architecture lane is removing. Warnings were ignored: 24 files over the cap had accumulated.
  • Reverse. Drop counters from COUNTERS in scripts/debt-ratchet.py (or their keys from scripts/debt-ratchet.json, which skips them), and turn the new-file error back into a warning in evaluate.
  • Increase, 2026-11-22 (lint-fmt). crates/cpl-lint/src/rules/mod.rs 2,144 -> 2,146 lines for mod literals; and its dispatch, which move L0506 out of crates/cpl-lint/src/rules/taste.rs (4,493 -> 4,410).