skraft-config
Initializes and edits
skraft-config.json— the repository-wide settings file whose central key isdepthTier, the strictness dial that governs the TDD variant, mutation thresholds, reviewer lens count, and Gherkin gate across every phase of the pipeline.
When to use
- When initializing a new SKRAFT repository (
configure skraft,skraft-config init) - To change the repository strictness level (
set depth tier,change strictness) - Once per repository —
depthTieris a repository decision, not a per-task choice - Never for per-task settings — those live in
state.jsonvia the state CLI
Entry contract
- Read/write access to the repository root
depthTierchoice confirmed with the user (orcomprehensiveas default)- Optional
SKRAFT_CONFIG_ROOTto override the base directory
Exit contract
skraft-config.jsoncreated or updated at the repository rootdepthTierpersisted as one of{basic, standard, comprehensive, custom}depthTierRationalepersisted when the chosen tier is belowcomprehensive- Confirmation displayed to the user, e.g.
Repo depth tier set to 'standard' (was comprehensive).
Invariants
- Determinism S7 — every read and write of a governed key goes through
config.mjs; never hand-editskraft-config.jsonfordepthTier/depthTierRationale comprehensiveby default — any reduction requires an explicit decision with rationale- Mandatory A9 sequence — init → choose → set → verify; do not skip the verify step
- Unknown keys rejected —
config.mjs setreturns exit code 3 for any ungoverned key customnot managed byconfig.mjs set—customDepthis a structured field edited directly- Atomic backup — the CLI preserves ungoverned fields and backs up before writing
Why this shape
A repository-wide configuration file prevents silent quality-level drift between runs. Passing depthTier through dispatch context (rather than letting each agent read the file) guarantees consistency and auditability.
« The goal of software architecture is to minimize the human resources required to build and maintain the required system. » — Martin, R. C., Clean Architecture, 2017.
The separation between repository parameters (skraft-config.json) and per-task parameters (state.json) follows the single-responsibility principle: each file has exactly one owner and one scope.
Allowed customisation
depthTierchoice (basic,standard,custom) with rationale (L1)customDepthper gate whendepthTier: custom— edited directly inskraft-config.json(L2)SKRAFT_CONFIG_ROOTto point to a different base directory (L1)
See also
- skraft-difficulty-routing — 3-axis routing at DISCOVER exit; depth tier table
- craft-discipline — Software craft discipline that relies on pipeline invariants