Summary
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.
Observed output shape
Constraints: [ok] entry_loc: 0 / 500 [lines] -- PASS
- No default warning/failure about oversized runtime source files.
Expected
At minimum, one of:
- A built-in optional policy profile for source LOC ceilings (for common patterns like
src/index.ts, route files, service classes), or
- A clear warning during
doctor/evidence when only entry_loc is enforced and no runtime LOC ceilings exist, or
- A first-class Charter config block to define per-path LOC budgets with sane defaults + explicit fail/warn behavior.
Proposed acceptance criteria
- Add a documented + supported way to enforce source-file LOC budgets without custom scripts.
charter doctor surfaces when LOC coverage is effectively absent for runtime source files.
- Teams can select
warn vs fail policy per path pattern.
Summary
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.tsinopsbrainreach 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_locis enforced by default.Repro (from real repo usage)
src/index.ts) until it exceeds intended team threshold.npx charter doctor --adf-only --ci --format textnpx charter adf evidence --auto-measure --cientry_loconly, unless custom sync constraints were manually configured.Observed output shape
Constraints: [ok] entry_loc: 0 / 500 [lines] -- PASSExpected
At minimum, one of:
src/index.ts, route files, service classes), ordoctor/evidencewhen onlyentry_locis enforced and no runtime LOC ceilings exist, orProposed acceptance criteria
charter doctorsurfaces when LOC coverage is effectively absent for runtime source files.warnvsfailpolicy per path pattern.