20 lines
1.4 KiB
Bash
20 lines
1.4 KiB
Bash
# Growth budgets. `_MAX` fails verify.sh; `_WARN` prints and moves on.
|
|
# Raising a _MAX needs an ADR stating old and new values. Growth requires a signature.
|
|
#
|
|
# Only whole-system budgets fail. A hard per-file limit is the one gate whose cheapest fix makes the
|
|
# code worse — sharding a coherent file into a `_helpers.go` turns it green while creating the package
|
|
# CLAUDE.md rule 3.6 bans. Total mass cannot be gamed by moving code between files; file length can.
|
|
|
|
CORE_LOC_MAX=2000 # cmd/ + internal/{content,render,web} + repo root, non-test .go
|
|
EXT_LOC_MAX=2000 # internal/ext/ — composition, grows after the core freezes
|
|
FILE_LOC_WARN=500 # any single .go file — advisory
|
|
FUNC_LOC_WARN=60 # any single function — advisory
|
|
DEPS_MAX=6 # total modules in go.mod, direct plus indirect
|
|
|
|
# Two ceilings because "the core stops growing after Arc 2" (architecture.md invariant 9) is only an
|
|
# invariant if something measures it: post-freeze CORE holds and only EXT rises.
|
|
# Costed, not round: spine, bundles, queries, render, routing, templates ~1200-1800 → CORE 2000.
|
|
# Feeds, sitemap, OpenGraph, shortcodes, image sizing, galleries, paging, indieweb ~900-1200 → EXT
|
|
# 2000, deliberately loose since that is where growth belongs. Reaching CORE asks what to delete;
|
|
# reaching EXT asks whether a template would have done it — only .go lines count here.
|