Skip to content

T-KO35-config-sdlc-yaml

Status: closed/done · Impact: medium · Complexity: medium

sdlc.yaml is the project contract, and it is read three different ways with no shared loader or schema. D-0007 names config/ a first-class tier. Make lib/config the single way project configuration is loaded, expanded, and validated, so the quality and lease ports read it one way.

LocationRole today
plugin/cli/lease_cli/_common.ts#resolveAuthorityreads sdlc.yaml inline; expands ~/relative lease_authority paths
plugin/scripts/run_quality_checks.tsreads sdlc.yaml inline for quality_checks:/worktree_init:
plugin/validators/validate_sdlc_yaml.tsajv validation with python-style error translation; its own loader

lib/config/sdlc_yaml.ts (load, resolve, authority expansion) plus lib/config/schema.ts (the validation schema, absorbed from validate_sdlc_yaml.ts); the three readers import it. The validate_sdlc_yaml CLI behavior is locked by golden test and rides the shared loader.

  1. Golden-snapshot validate_sdlc_yaml.ts outputs (valid, invalid, missing-file).
  2. Create lib/config/sdlc_yaml.ts + lib/config/schema.ts; port the validator core.
  3. Re-point lease_cli/_common.ts#resolveAuthority and run_quality_checks.ts to the loader.
  4. Parity test the validator against the goldens; bun test green.
LocationKindChange
plugin/lib/config/sdlc_yaml.tsnewsingle loader/resolver
plugin/lib/config/schema.tsnewsdlc.yaml schema + validation core
plugin/validators/validate_sdlc_yaml.tsmodifythin over lib/config (deletion is T-YBKU-shim-deletion-guard)
plugin/cli/lease_cli/_common.tsmodifyresolveAuthority imports lib/config
plugin/scripts/run_quality_checks.tsmodifyconfig read via lib/config
  • AC-1: exactly one code path under plugin/ parses sdlc.yaml (grep for the filename shows lib/config + thin callers only).
  • AC-2: validate_sdlc_yaml golden parity — byte-identical output and exit codes.
  • AC-3: lease CLI authority resolution behavior unchanged (existing lease tests green).
  • AC-4: full bun test + tsc green.
  • docs/plans/op-substrate-full-sweep.md §1e (sdlc.yaml ×3 duplication); D-0007 §1 placement rules (config/ is first-class, not util).

← Back to Tasks