- Added intermediate_path config field with KB_INTERMEDIATE_PATH env var support
- Updated Pipeline to use configurable intermediate directory
- Updated CLI to default to intermediate_path instead of cwd
- Completed requirements: INT-01, INT-02, INT-03
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use pydantic-settings naming convention (KB_INTERMEDIATE_PATH env var)
Preserve output_dir parameter for testing/custom override
Configurable paths via pydantic-settings with env var override support
INT-01
INT-02
INT-03
2min
2026-03-16
Phase 5 Plan 1: Unified Intermediate Directory Summary
Unified intermediate directory configuration with KB_INTERMEDIATE_PATH support for customizable analysis output paths
Performance
Duration: 2 min
Started: 2026-03-16T15:12:20Z
Completed: 2026-03-16T15:14:10Z
Tasks: 3
Files modified: 3
Accomplishments
Added intermediate_path field to KBSettings with pydantic-settings env var support
Updated Pipeline to use settings.intermediate_path as default output directory
Updated CLI process_command to default to intermediate_path instead of cwd
Task Commits
Each task was committed atomically:
Task 1: Add KB_INTERMEDIATE_PATH config to KBSettings - c5b2c66 (feat)
Task 2: Update Pipeline to use configurable intermediate directory - 10f4dfa (feat)
Task 3: Update CLI to use configurable intermediate directory default - 7f9caa3 (feat)
Files Created/Modified
kb_pipeline/config.py - Added intermediate_path field with default ~/work/intermediate/analysis/
kb_pipeline/pipeline.py - Changed default output_dir from cwd to settings.intermediate_path
kb-workflow/kb_workflow.py - Updated process_command to use intermediate_path default
Decisions Made
Default path is ~/work/intermediate/analysis/ (consistent with project conventions)
Use pydantic-settings naming convention for env var (KB_INTERMEDIATE_PATH)
Preserve output_dir parameter override for testing and special cases
Deviations from Plan
None - plan executed exactly as written.
Issues Encountered
One pre-existing test failure detected (test_workflow_skips_completed_steps) - this is unrelated to our changes. The test has a bug where it doesn't mock _ask_rerun_step, causing it to prompt for stdin during pytest. This is a pre-existing issue and not in scope for this plan.
User Setup Required
None - no external service configuration required.
Next Phase Readiness
Intermediate directory configuration complete
Ready for archive directory implementation
Users can now customize intermediate path via KB_INTERMEDIATE_PATH env var