adjustments + new tracks + tasks.md reduction of usage
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"track_id": "project_conductor_dir_20260308",
|
||||
"title": "Project-Specific Conductor Directory",
|
||||
"status": "pending",
|
||||
"created": "2026-03-08",
|
||||
"priority": "high",
|
||||
"owner": "tier2-tech-lead",
|
||||
"description": "Make conductor directory per-project. Each project TOML can specify custom conductor dir for isolated track/state management.",
|
||||
"dependencies": ["conductor_path_configurable_20260306"],
|
||||
"out_of_scope": [
|
||||
"GUI path configuration",
|
||||
"Runtime path switching",
|
||||
"Track migration between projects"
|
||||
]
|
||||
}
|
||||
58
conductor/tracks/project_conductor_dir_20260308/plan.md
Normal file
58
conductor/tracks/project_conductor_dir_20260308/plan.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Plan: Project-Specific Conductor Directory
|
||||
|
||||
## Phase 1: Extend paths.py
|
||||
Focus: Add project-specific path resolution
|
||||
|
||||
- [ ] Task 1.1: Add project-aware conductor path functions
|
||||
- WHERE: src/paths.py
|
||||
- WHAT: Add optional project_path parameter to get_conductor_dir, get_tracks_dir, get_track_state_dir
|
||||
- HOW: If project_path provided, resolve relative to project root; otherwise use global
|
||||
- SAFETY: Maintain backward compatibility with no-arg calls
|
||||
|
||||
- [ ] Task 1.2: Add project conductor path resolution
|
||||
- WHERE: src/paths.py
|
||||
- WHAT: New function `_resolve_project_conductor_dir(project_path)` that reads from project TOML
|
||||
- HOW: Load project TOML, check `[conductor].dir` key
|
||||
- SAFETY: New function, no side effects
|
||||
|
||||
## Phase 2: Update project_manager.py
|
||||
Focus: Use project-specific paths for track operations
|
||||
|
||||
- [ ] Task 2.1: Update save_track_state to use project conductor dir
|
||||
- WHERE: src/project_manager.py (around line 240)
|
||||
- WHAT: Pass project base_dir to paths.get_track_state_dir()
|
||||
- HOW: Get base_dir from project_path, call paths with project_path param
|
||||
- SAFETY: Maintain existing function signature compatibility
|
||||
|
||||
- [ ] Task 2.2: Update load_track_state to use project conductor dir
|
||||
- WHERE: src/project_manager.py (around line 252)
|
||||
- WHAT: Load track state from project-specific directory
|
||||
- HOW: Same as above
|
||||
|
||||
- [ ] Task 2.3: Update get_all_tracks to use project conductor dir
|
||||
- WHERE: src/project_manager.py (around line 297)
|
||||
- WHAT: List tracks from project-specific directory
|
||||
- HOW: Accept optional project_path param
|
||||
|
||||
## Phase 3: Update app_controller.py
|
||||
Focus: Pass project path to track operations
|
||||
|
||||
- [ ] Task 3.1: Update track creation to use project conductor dir
|
||||
- WHERE: src/app_controller.py (around line 1907, 1937)
|
||||
- WHAT: Pass active_project_path to track path functions
|
||||
- HOW: Get active_project_path, pass to paths.get_tracks_dir()
|
||||
- SAFETY: Use existing active_project_path attribute
|
||||
|
||||
## Phase 4: Tests
|
||||
Focus: Verify project-specific behavior
|
||||
|
||||
- [ ] Task 4.1: Write test for project-specific conductor dir
|
||||
- WHERE: tests/test_project_paths.py (new file)
|
||||
- WHAT: Create mock project with custom conductor dir, verify tracks saved there
|
||||
- HOW: Mock project_manager, verify path resolution
|
||||
- SAFETY: New test file
|
||||
|
||||
- [ ] Task 4.2: Test backward compatibility
|
||||
- WHERE: tests/test_project_paths.py
|
||||
- WHAT: Verify global paths still work without project_path
|
||||
- HOW: Call functions without project_path, verify defaults
|
||||
73
conductor/tracks/project_conductor_dir_20260308/spec.md
Normal file
73
conductor/tracks/project_conductor_dir_20260308/spec.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Track Specification: Project-Specific Conductor Directory
|
||||
|
||||
## Overview
|
||||
|
||||
Make the conductor directory per-project instead of global. Each project TOML can specify its own `conductor_dir` path, allowing separate track/state management per project. This enables using Manual Slop with multiple independent projects without track/ticket cross-pollution.
|
||||
|
||||
## Current State Audit
|
||||
|
||||
### Already Implemented
|
||||
- `src/paths.py`: Global path resolution via env vars and config.toml
|
||||
- `paths.get_conductor_dir()`: Returns global conductor directory
|
||||
- `config.toml [paths]` section: Global path overrides
|
||||
|
||||
### Gaps to Fill
|
||||
- No per-project conductor directory support
|
||||
- Tracks are always loaded from global conductor dir
|
||||
- No way to isolate tracks between projects
|
||||
|
||||
## Goals
|
||||
|
||||
1. Allow projects to specify custom conductor directory in their TOML
|
||||
2. Load track state from project-specific conductor dir
|
||||
3. Create new tracks in project-specific directory
|
||||
4. Maintain backward compatibility with global conductor
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
### Per-Project Conductor Path
|
||||
| Project TOML Key | Description | Default |
|
||||
|-----------------|-------------|---------|
|
||||
| `conductor.dir` | Path to conductor directory | `"conductor"` (relative to project root) |
|
||||
|
||||
### Example Project TOML
|
||||
```toml
|
||||
[project]
|
||||
name = "MyCProject"
|
||||
path = "/path/to/my-c-project"
|
||||
|
||||
[conductor]
|
||||
# This project's tracks will be in /path/to/my-c-project/my_tracks/
|
||||
dir = "my_tracks"
|
||||
```
|
||||
|
||||
### Path Resolution Order
|
||||
1. Project TOML `[conductor].dir` (project-specific)
|
||||
2. Environment variable `SLOP_CONDUCTOR_DIR` (global override)
|
||||
3. Config.toml `[paths].conductor_dir` (global default)
|
||||
4. Fallback to `"conductor"`
|
||||
|
||||
### API Changes
|
||||
- `paths.get_conductor_dir(project_path: str = None) -> Path`: Add optional project_path param
|
||||
- `paths.get_tracks_dir(project_path: str = None) -> Path`: Returns project-specific tracks dir
|
||||
- `paths.get_track_state_dir(track_id: str, project_path: str = None) -> Path`
|
||||
|
||||
### Integration Points
|
||||
- `project_manager.py`: Pass project_path to path functions when saving/loading tracks
|
||||
- `app_controller.py`: Use active project's conductor dir for track operations
|
||||
|
||||
## Architecture Reference
|
||||
|
||||
- **Existing paths.py**: `src/paths.py` - current global path resolution
|
||||
- **Project loading**: `project_manager.py:load_project()` - loads project TOML
|
||||
- **Active project**: `app_controller.py:active_project_path` - current project
|
||||
|
||||
## Out of Scope
|
||||
- GUI path configuration (separate track)
|
||||
- Runtime path switching (paths resolved at project load)
|
||||
- Migrating existing tracks between projects
|
||||
|
||||
## Relationship to Track 0
|
||||
This extends conductor_path_configurable_20260306:
|
||||
- Track 0: Global path configuration (done/impro track: Per-projectved)
|
||||
- This path override
|
||||
Reference in New Issue
Block a user