Summary
The spec-compliance audit for config-cascade-variants found three discrepancies where the specs do not match the actual code. All three are spec drift — the code is correct and the specs need updating.
1. ConfigWriter.initProject signature (core:config)
Spec says: initProject(configPath: string, options: InitProjectOptions) — two parameters.
Code has: initProject(options: InitProjectOptions) — single parameter where configPath is options.projectRoot.
Fix: Update the spec to reflect the single-parameter signature with projectRoot inside InitProjectOptions.
2. ConfigWriter.listPlugins — type required vs optional (core:config)
Spec says: listPlugins(configPath: string, type: string) — type is required.
Code has: listPlugins(configPath: string, type?: string) — type is optional.
Fix: Either make type optional in the spec, or make it required in the code. The optional version is more permissive and likely intentional.
3. Hook type mapping responsibility (core:config-loader)
Spec says: "The loader MUST map hooks.post: [{ run: 'make test' }] to { type: 'run', command: 'make test' }"
Code does: The config-loader preserves raw schemaOverrides data. Hook mapping (run → type: 'run', instruction → type: 'instruction') happens at schema resolution time, not during config loading.
Fix: Move this requirement out of core:config-loader and into the appropriate spec (likely core:schema-merge or core:composition).
Context
- Source: spec-compliance audit
20260520-095622
- Change:
config-cascade-variants (archivable)
- These are pre-existing discrepancies, not introduced by the cascade change
Summary
The spec-compliance audit for
config-cascade-variantsfound three discrepancies where the specs do not match the actual code. All three are spec drift — the code is correct and the specs need updating.1.
ConfigWriter.initProjectsignature (core:config)Spec says:
initProject(configPath: string, options: InitProjectOptions)— two parameters.Code has:
initProject(options: InitProjectOptions)— single parameter whereconfigPathisoptions.projectRoot.Fix: Update the spec to reflect the single-parameter signature with
projectRootinsideInitProjectOptions.2.
ConfigWriter.listPlugins—typerequired vs optional (core:config)Spec says:
listPlugins(configPath: string, type: string)—typeis required.Code has:
listPlugins(configPath: string, type?: string)—typeis optional.Fix: Either make
typeoptional in the spec, or make it required in the code. The optional version is more permissive and likely intentional.3. Hook type mapping responsibility (core:config-loader)
Spec says: "The loader MUST map
hooks.post: [{ run: 'make test' }]to{ type: 'run', command: 'make test' }"Code does: The config-loader preserves raw
schemaOverridesdata. Hook mapping (run→type: 'run',instruction→type: 'instruction') happens at schema resolution time, not during config loading.Fix: Move this requirement out of
core:config-loaderand into the appropriate spec (likelycore:schema-mergeorcore:composition).Context
20260520-095622config-cascade-variants(archivable)