Skip to main content

Module instance_config

Module instance_config 

Source
Expand description

What a project declares about the files its gates judge.

One hand-edited file, .spec-driven-docs/config.yaml, states which paths no delivered gate judges and which filters each named gate takes. The managed pre-commit block is rendered from it, so the block stays wholly owned by sdd and an upgrade never meets a project’s edit.

§The two keys are named apart

ESLint’s flat config overloads one ignores key whose meaning changes with what else sits beside it, and it is a documented, repeated source of user confusion. reserved and gates mean one thing each.

§The composition algorithm

Four layers, in this order, and one function implements it:

layer 1  registry   the row's include and exclude in GATES
layer 2  project    the gates: entry for that gate
layer 3  flag       --include and --exclude on the command line
layer 4  reserved   the reserved: list, as excludes only

Per field, a later layer extends rather than replaces, with one stated exception: a project include list replaces the registry include list. A registry include is a whitelist, so extending it can only widen what a gate judges, which is the opposite of what a project asking for include wants. Every exclude layer extends, and reserved is last, so nothing reopens it. No layer can reopen an exclusion at all, because the grammar carries no negation: crate::domain::path_filter refuses a leading !.

Structs§

GateFilters
The filters one named gate takes.
InstanceConfig
The declaration as written.

Enums§

ConfigError
A declaration that does not parse, or that names something no gate has.

Constants§

CONFIG_PATH
Where an instance keeps its declaration.

Functions§

resolve
Build one gate’s filter from every layer.
with_reserved
Record reserved paths in a declaration, keeping every comment.