mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
Remove file-budget guardrail
This commit is contained in:
@@ -1,25 +1,18 @@
|
||||
# File Size Budgets
|
||||
# Maintainability Guardrails
|
||||
|
||||
Purpose: keep large modules from becoming maintenance bottlenecks.
|
||||
Purpose: keep runtime composition boundaries maintainable.
|
||||
|
||||
## Current Budget
|
||||
## Current Checks
|
||||
|
||||
- TypeScript source files in `src/` and `launcher/`
|
||||
- Soft budget: `500` LOC
|
||||
- Excludes generated bundle artifacts (for example `subminer`)
|
||||
|
||||
## Commands
|
||||
|
||||
- Warning mode (non-blocking): `bun run check:file-budgets`
|
||||
- Strict mode (CI/local gate): `bun run check:file-budgets:strict`
|
||||
- Custom limit: `bun run scripts/check-file-budgets.ts --limit 650`
|
||||
- Main runtime fan-in (warning): `bun run check:main-fanin`
|
||||
- Main runtime fan-in (strict): `bun run check:main-fanin:strict`
|
||||
- Default main fan-in thresholds: `import lines <= 110`, `unique runtime paths <= 11`
|
||||
- Runtime cycle check (warning): `bun run check:runtime-cycles`
|
||||
- Runtime cycle check (strict): `bun run check:runtime-cycles:strict`
|
||||
|
||||
## Policy
|
||||
|
||||
- If file exceeds budget, prefer extracting domain module(s) first.
|
||||
- Keep composition/orchestration files focused on wiring.
|
||||
- Do not hand-edit generated artifacts; refactor source modules.
|
||||
- Keep `src/main.ts` runtime import fan-in low by routing domain imports through `src/main/runtime/domains/*` and `src/main/runtime/registry.ts`.
|
||||
- Avoid runtime import cycles by extracting shared helpers into leaf modules.
|
||||
|
||||
Reference in New Issue
Block a user