module-size-discipline

Solid

Use when planning tasks that touch big source files, when an edit would push a file past the module-size ceiling, when the pre-commit module-size ratchet warns or blocks, or when generating policies/module-size-baseline.txt. Operationalizes FR-25 — module-size ratchet (ceiling default 800; over-ceiling files may shrink, never grow; extraction along a responsibility seam is in-scope, not scope creep). Do NOT use for docs/markdown size (FR-23 owns docs), to force decomposition of an existing monolith (that is its own explicit ticket), or to judge split quality by regex (seam-vs-mechanical is semantic — code-review owns it).

Code & Development 9 stars 0 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
33
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Module-Size Discipline (FR-25) ## Purpose Stop source files from accreting into monoliths nobody (human or agent) can load in one pass. Source in a Flow workflow is AI-read (FR-22/FR-24 audience principle): a 19k-line file forces slice-reads on every future session. Monoliths are the integral of N individually-reasonable diffs — no single diff is ever flagged — so the framework gates the accumulating dimension deterministically (line count is objective, unlike FR-22/FR-23 semantics) and steers extraction at plan- and write-time. ## The ratchet (deterministic gate) Config: `policies/module-size.yml` (`ceiling` default 800 · `source_globs` · `exempt_globs` · `baseline_file` · `enforcement` · gitignored `module-size.local.yml` override). Engine: `hooks/shared/module_size.py`, wrapper `hooks/local/check-module-size.sh`, wired into `hooks/git/pre-commit`. | Case | Verdict | |---|---| | Gated file NOT in baseline, lines ≤ ceiling | pass | | NOT in baseline, **NEW** over ceiling (crosses the ceiling in this change) | **BLOCK** — extract, or adopt (`--write-baseline`) | | NOT in baseline, **PRE-EXISTING** over ceiling (over ceiling at HEAD), touched/shrunk in a change gate (`--staged`/`--worktree`, not growing) | pass — the refactor path (delta-aware adoption grace) | | NOT in baseline, **PRE-EXISTING** over ceiling, **GROWN** | **BLOCK** — a monolith may be touched/shrunk, never grown | | Any over-ceiling not-baselined file under `--all` (audit) | **reported** (absolute; no H...

Details

Author
fusebase-dev
Repository
fusebase-dev/fusebase-flow
Created
4 months ago
Last Updated
1 weeks ago
Language
Shell
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category