mirror of
https://github.com/khodges42/nightShift.git
synced 2026-06-14 18:18:36 +00:00
Includes starter project generation, validation for configs/tasks/commands, artifact snapshot writing, structured stage results, command output capture, devlogs for phases 1-6, and unit coverage for the implemented MVP layers.
1.5 KiB
1.5 KiB
Phase 2 Devlog: Config Loading
Implemented
- Added typed configuration objects for project, safety, agents, pipeline, and stages.
- Added
load_config()for parsingnightshift.yaml. - Added
validate_config()for checking referenced task and prompt files. - Added validation for:
- required top-level sections
- required project fields
- non-empty agents
- supported stage types
- agent stage references
- command stage command lists
- duplicate stage IDs
on_failreferences
- Added unit tests for valid config loading and key invalid config cases.
Decisions Made
- Used PyYAML automatically when available, but added a small standard-library fallback parser for the YAML subset emitted by
nightshift init. - Deferred full YAML edge-case support to a future dependency/install pass. The fallback is intentionally documented as a starter-config parser, not a general YAML implementation.
- Validation currently confirms that scoped paths resolve inside the project root, but it does not require every scoped path to already exist. That allows users to scaffold configs before creating all source/test directories.
- Kept config validation focused on structural correctness and references. Command safety enforcement is left for Phase 3.
Notes
- The config layer now catches missing agent references with explicit messages such as
pipeline stage 'plan' references unknown agent 'critic'. - Tests use
unittestfrom the standard library so they can run before development dependencies are introduced.