You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(adf): add source LOC budget enforcement to catch godobject drift #186
Charter ADF checks can pass while very large source files continue growing, unless teams explicitly configure additional LOC sync entries.
In practice this let src/index.ts in opsbrain reach 1600+ LOC without the Charter gate failing, despite repo governance intent to avoid godobjects.
Why this matters
Teams can believe they are fully covered by Charter's default pre-commit gate, but still miss high-risk architecture drift (godobject growth) because only entry_loc is enforced by default.
Repro (from real repo usage)
Repo has Charter wiring + pre-commit hook enabled.
Add many routes to one entry file (src/index.ts) until it exceeds intended team threshold.
Run:
npx charter doctor --adf-only --ci --format text
npx charter adf evidence --auto-measure --ci
Output still reports PASS with entry_loc only, unless custom sync constraints were manually configured.
charter doctor then measures matching files. Over the fail ceiling → WARN (fails CI under --ci); over warn only → advisory INFO (never fails CI). First matching pattern wins; per-rule ceilings fall back to the defaults.
Scoping note (important): enforcement lives in charter doctor — the pre-commit/CI gate that loads .charter/config.json. charter adf evidence --auto-measure is intentionally unchanged; it's manifest-driven (reads .ai, not .charter) and still reports only the metrics declared in manifest.adf. So re-running your original adf evidence repro will still show entry_loc only — that's expected; the god-object coverage is charter doctor --adf-only --ci.
Opt-in / non-breaking: with no locBudgets block, nothing is enforced — doctor just emits a soft INFO nudge that only entry_loc is covered.
Docs: docs/cli-reference.md → charter doctor → "Source LOC budgets". Closing as delivered; reopen if the doctor path doesn't cover your case.
Activity
feat(adf): per-path source LOC budgets to catch god-object drift (#186)…
stackbilt-admin commentedon May 30, 2026
Shipped in #194 (commit e1dcbd9). Quick usage + one scoping note so the rollout isn't surprising:
How to use — declare per-path budgets in
.charter/config.json:{ "locBudgets": { "defaultWarn": 300, "defaultFail": 600, "paths": [ { "pattern": "src/index.ts", "warn": 200, "fail": 500, "reason": "entry should stay thin" }, { "pattern": "src/**", "warn": 300, "fail": 600 } ] } }charter doctorthen measures matching files. Over the fail ceiling →WARN(fails CI under--ci); over warn only → advisoryINFO(never fails CI). First matching pattern wins; per-rule ceilings fall back to the defaults.Scoping note (important): enforcement lives in
charter doctor— the pre-commit/CI gate that loads.charter/config.json.charter adf evidence --auto-measureis intentionally unchanged; it's manifest-driven (reads.ai, not.charter) and still reports only the metrics declared inmanifest.adf. So re-running your originaladf evidencerepro will still showentry_loconly — that's expected; the god-object coverage ischarter doctor --adf-only --ci.Opt-in / non-breaking: with no
locBudgetsblock, nothing is enforced —doctorjust emits a softINFOnudge that onlyentry_locis covered.Docs:
docs/cli-reference.md→charter doctor→ "Source LOC budgets". Closing as delivered; reopen if the doctor path doesn't cover your case.fix(doctor): make tracked-telemetry diagnostic advisory, not a CI fai…
fix(doctor): detect tracked .charter/telemetry and name the untrack f…