Repository navigation
writ's scopes and segments take singular keys: writ.scope and writ.segment #1024
Description
writ's two name-keyed families take singular keys: writ.scopes becomes writ.scope, and writ.segments becomes
writ.segment. The variables family, <program>.variable, takes the same form in #1023.
Ruled 2026-10-02
The owner, asked whether the families' keys should be singular or plural: "whatever we do, we should do it to scopes,
segments, and variables", then "yes, singular for all three". Scopes, segments and variables are the only families
whose entries the user names. The singular gives each family one name on every surface (--segment,
WRIT_SEGMENT_<NAME>, writ.segment), and for a map the file key yields its environment variable by #927's rule:
writ.variable.<NAME> is WRIT_VARIABLE_<NAME>.
What changes
- The schema (
schema/devlore-config.json), writ's reads (writ.scopesthrough viper incmd/writ/writ,
writ.segmentsincmd/writ/writ/config.go), the defaults, the tests and the pages namewrit.scopeand
writ.segment. The plural keys are not read: there is no legacy to keep. - Segments keep their declared order: a directory name carries the extra segments in the order they are declared, so
writ.segmentstays an ordered list. --scopestays the selector it is; scopes take no definition flag, since--scope NAME=rootwould collide with it.- Whether a scope's root also reads from
WRIT_SCOPE_<NAME>, the environment layer segments and variables have, is
decided in this issue's plan. If it does,WRIT_SCOPE_joins the reserved families of The environment prefix is doubled: WRIT_WRIT_VERBOSE works and WRIT_VERBOSE does not; the variable is the prefix plus the bare key, for every program #927's collision test.
Acceptance
- The schema, writ's code, its tests and fixtures, and every page and guide name
writ.scopeandwrit.segment. - A configuration that sets
writ.scopesorwrit.segmentsdeploys nothing those keys meant. - Segments deploy in their declared order, as before.
-
docs/architecture/10-command-line-interface.md§11 already names the singular keys (written 2026-10-02); the
guides (docs/guides/selectors.md,docs/guides/manage-environments.md) follow when the code does.
Related
#1023 (the variables family, whose <program>.variable follows the same ruling), #927 (the variable-naming rule and
the collision test), #926 (--scope and the scope model), #944 (segments in the selector).
Plan and design documents
| Kind | Document |
|---|---|
| Plan | Not yet opened |
| Design | docs/architecture/10-command-line-interface.md § Introducing a name and setting its value |
Epic: #441 · Feature: #456 · Schedule: #916, lane 41, PR C′, in lane 38
Activity
docs: settings and variables are orthogonal, and the name-keyed famil…