Expand description
The delivered gates: every check an instance wires as a pre-commit hook.
This module owns the registry — identity, display name, hook wiring,
citable rules, and implementation for each gate — so a gate cannot exist
unwired: the exhaustive match over GateId is the declaration. Gate
implementations live one per file below; rendering the registry into
pre-commit YAML and running one gate from the command line live in
services and commands.
Modules§
- adr_
cites_ a_ live_ rule - Gate: a record’s
Enforced byline names rules the specs still define. - adr_
filename_ shape - Gate: a record filename is
ADR-<slug>.md, and the slug carries no digit. - adr_
word_ cap - Gate: a decision record’s body stays within 350 words, or within the ceiling its project recorded for it.
- agents_
digest_ size - Gate: agent digests stay within their line budgets, or within the ceiling its project recorded for one.
- budget
- What every budget gate does once it has measured: read the debt, judge each measurement against its ceiling or its budget, and report the entries the measurements no longer support.
- chapter_
size_ cap - Gate: a chapter stays within its line cap, or within the ceiling its project recorded for it.
- comparison_
dated_ tables - Gate: a comparison document carrying tables carries a verification date.
- comparison_
escaped_ pipes - Gate: a pipe inside a comparison cell’s code span is escaped.
- comparison_
legend - Gate: a comparison document carrying tables carries a legend.
- comparison_
one_ reference_ per_ cell - Gate: a comparison cell carries at most one reference.
- comparison_
verdict_ word - Gate: every verdict symbol carries the word the legend gives it.
- gate_
message_ cites_ a_ rule - Gate: every rule ID a gate can print resolves to a requirement in the local specs.
- instance_
manifest - Gate: the instance manifest is present and fits the schema.
- ki_
bugzilla_ report_ width - Gate: a Bugzilla report body fits in 79 columns.
- ki_
checked_ date - Gate: a record whose handling depends on an upstream state carries the date that state was last confirmed, and no other record carries one.
- ki_
filename_ shape - Gate: a case id is
KI-<slug>.md, and the slug is not a counter. - ki_
filing - Gate: a known-issue record carries one filing state.
- ki_
mechanism_ walkthrough - Gate: every known-issue record walks its mechanism step by step.
- ki_
record - What every known-issue gate reads: a record’s one-word axes.
- ki_
report_ body - Gate: a filed known-issue record carries the body it was filed with, and the issue it was filed as.
- ki_
retire_ when - Gate: a masked known-issue record carries the condition under which it is removed, and a mitigated one carries none.
- ki_
state - Gate: a known-issue record carries one state.
- markdown_
prose - Shared markdown structure for the prose gates.
- no_
personal_ path - Gate: a document carries no path into a person’s home directory.
- no_
self_ narration - Gate: a document states what is true now.
- paths
- Where an instance keeps the documents the gates read.
- prose_
stays_ unwrapped - Gate: prose stays unwrapped — a paragraph is one source line.
- spec_
change_ is_ typed - Gate: a spec change an entry document cites carries a well-formed clause.
- spec_
requirement_ parts - Gate: every requirement in a spec is a rule ID heading that owns exactly one verification.
- spec_
rule_ id_ unique - Gate: a rule ID resolves to exactly one requirement across the project.
- spec_
size_ cap - 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.
- spec_
verify_ hooks_ exist - Gate: every rule whose verification runs a hook names a hook that is still defined.
- suppression_
names_ its_ case - Gate: a cited known-issue case resolves to a record.
- tracking_
registry - Gate: the tracking registry is valid, current, and its dependents exist.
Structs§
- GateCtx
- Where a gate runs: the repository root pre-commit invoked it from, and the subject filter that bounds what it judges there.
- Gate
Spec - One registry row: everything the deliveries need to know about a gate.
Enums§
- Gate
Error - A gate that could not run at all — distinct from one that found violations.
- Violation
- One line a failing gate prints.
Constants§
- PRUNED_
DIRS - The directories every repository walk prunes: vendored or generated trees a consumer cannot be asked to author.
Statics§
- GATES
- The delivered gate set, in
GateId::ALLorder.
Functions§
- front_
matter_ values - Every value a front-matter key carries, in the order the keys appear.
- line_
count - Count the newline-terminated lines of a text, as
wc -ldoes. - read_
text - Read a repository-relative text file for a gate.
- spec
- Look up one gate’s registry row.
- walk_
files - Walk the repository and yield every file as a
./-prefixed repository-relative path in sorted order.
Type Aliases§
- GateFn
- The implementation shape shared by every gate.
- Gate
Result - What every gate returns: the violations it found, or why it could not run.