Skip to main content

Module spec_size_cap

Module spec_size_cap 

Source
Expand description

Gate: a spec stays within 300 authored lines and carries a TOC above 100, or within the ceiling and exception its project recorded for it.

The generated TOC is excluded from the count: it grows with the requirement list and would otherwise spend the author’s budget on navigation. Excluding it means trusting its delimiters, so the pair is checked first — a spec carrying one marker and nothing to close it would have every line after that marker deleted from the count, which is the over-budget file the cap exists to reject. A malformed pair takes no measurement and no debt entry: it stays strict.

The two dimensions are measured independently. Reporting the missing table of contents only once the line count fits would let a recorded ceiling silence the one active finding and let the second appear later, as a reward for shrinking the file.

Constants§

CITES
The rules this gate can cite.

Functions§

measure
Measure every spec under the documentation root on both dimensions. A spec with a malformed marker pair is skipped, as the gate skips it.
run
Judge every spec under the documentation root.