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 !.

§The writing style is the project’s to select

writing_style states where the writing convention comes from: this convention’s chapter, a document of the project’s own, or none. The managed documentation block routes authors to the selection, and none installs no route and imposes no conversion obligation. The combination is validated, not just the field: project without a path names nothing, and a path beside another source is a value nothing reads, which is a value that drifts.

Structs§

GateFilters
The filters one named gate takes.
InstanceConfig
The declaration as written.
WritingStyle
The writing-style selection as written.

Enums§

ConfigError
A declaration that does not parse, or that names something no gate has.
WritingSource
Where a project’s writing style comes from.

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.
with_writing_style
Record a writing-style selection in a declaration, keeping every comment.