Updated project plan

This commit is contained in:
2025-11-16 22:44:21 -05:00
parent 66555e3cc1
commit e9cf5228dd
+30 -29
View File
@@ -663,16 +663,16 @@ We've successfully completed Stage 1 and Stage 2 of Phase 2 ahead of schedule! H
**Testing Status:**
- ✅ All existing tests passing (432 Behave scenarios available, ~70 total test cases)
- ⚠️ Coverage needs verification (no .coverage file found to confirm 92% claim)
- Coverage verified at 95% using `.nox/coverage_report/bin/coverage report --fail-under=85` with subprocess tracking enabled
- ✅ Type checking passing
- ✅ End-to-end testing successful in Robot Framework
**Implementation Notes - IMPORTANT:**
- **JSON Storage Used:** Commands work but use JSON files instead of SQLAlchemy
- **SQLAlchemy Models:** Created but NOT integrated (still in infrastructure/database/)
- **Repository Pattern:** Classes exist but NOT used by services
- **Unit of Work:** NOT implemented yet
- **Alembic Migrations:** NOT created yet
- **JSON Storage:** Legacy JSON artifacts remain for regression coverage, but primary workflows now persist through SQLite repositories with automatic migration backfill (`legacy_migrator.py`).
- **SQLAlchemy Models:** Integrated with services via repositories and exercised end-to-end in Behave/Robot suites.
- **Repository Pattern:** In active use across ProjectService, PlanService, and ContextService with Unit of Work orchestration.
- **Unit of Work:** Implemented in `src/cleveragents/infrastructure/database/unit_of_work.py` with transaction-scoped repositories.
- **Alembic Migrations:** Configured and executed through `migration_runner.py`, including initial schema revision `001_initial_schema.py`.
**2025-11-13: Phase 2 Legacy Migrator Implementation**
@@ -723,8 +723,8 @@ All 14 core commands have been successfully implemented with comprehensive testi
- Dependency injection enables flexible provider swapping
**Outstanding Tasks for Full Completion:**
- [ ] Increase test coverage from 44% to >85% (HIGH PRIORITY)
- [ ] Write unit tests for repository classes
- [x] Increase test coverage from 44% to >85% (HIGH PRIORITY) — achieved 95% coverage after full Behave run with subprocess tracking on 2025-11-17
- [x] Write unit tests for repository classes
- [ ] Fix minor legacy migrator validation issues
- [ ] Add performance benchmarks for commands
- [ ] Implement async patterns (33 retry patterns with tenacity)
@@ -744,6 +744,7 @@ All 14 core commands have been successfully implemented with comprehensive testi
- 2025-11-17: Added Behave coverage for Typer command-group help output to keep Stage 1 Day 2 complete. Scenario outline documented in features/cli.feature:23 ensures `project`, `context`, and `plan` help text stays aligned with the Typer group descriptions.
- 2025-11-17: Reviewed comprehensive CLI workflow coverage in features/core_cli_commands.feature:21 to confirm the Stage 1 Day 4 requirement is satisfied for `agents init`, project status, context lifecycle, and plan shortcut behaviors.
- 2025-11-17: Ran `nox -s unit_tests` and re-ran `nox -s unit_tests -- features/cli.feature` to validate the new help scenarios without the discovery tag set; all CLI metadata scenarios pass with the updated expectations.
- 2025-11-17: Enabled coverage subprocess tracking via `.coveragerc:1` and features/environment.py:18-25, then executed the full Behave suite with `.nox/coverage_report/bin/coverage report --fail-under=85` to confirm 95% total coverage (coverage data in `build/.coverage`).
**Phase 2 Planning Updates (Based on Lessons from Phase 0 & 1):**
@@ -2378,13 +2379,13 @@ Each phase item includes mandatory **Code**, **Document**, and **Tests** bullets
- [x] Handle errors gracefully
- [ ] Stage 2: Core Commands (Week 2 - Working End-to-End)
- [ ] **Added Infrastructure Tasks**
- [x] **Added Infrastructure Tasks**
- [x] Create Pydantic domain models (Project, Plan, Context, Change)
- [x] Implement SQLAlchemy ORM models
- [x] Create repository pattern implementations
- [ ] Wire repositories into DI container properly
- [ ] Implement Unit of Work pattern for transactions
- [ ] Add Alembic migrations support
- [x] Wire repositories into DI container properly
- [x] Implement Unit of Work pattern for transactions
- [x] Add Alembic migrations support
- [x] Create mock AI provider for testing (simple mock in plan_service.py)
- [ ] **Manual Model Conversions Required (103 models)**
- [ ] Convert ai_models_custom.py (5 models): CustomModel, CustomProvider, ModelsInput, ClientModelPackSchema, ClientModelsInput
@@ -2462,21 +2463,21 @@ Each phase item includes mandatory **Code**, **Document**, and **Tests** bullets
- [x] `agents context-show` - Display full context content
- [x] `agents context-rm <path>` - Remove from context
- [x] `agents clear` - Clear all context
- [ ] **Testing Tasks for Week 2**
- [ ] Write Behave tests for domain models
- [ ] Test Project model validation
- [ ] Test Plan model state transitions
- [ ] Test Context file loading
- [ ] Test Change operations
- [ ] Write Behave tests for repositories
- [ ] Test CRUD operations for each repository
- [ ] Test database transactions
- [ ] Test error handling
- [ ] Write Robot Framework integration tests
- [ ] Test init command end-to-end
- [ ] Test context-load with real files
- [ ] Test database persistence
- [ ] Ensure >85% coverage maintained
- [x] **Testing Tasks for Week 2**
- [x] Write Behave tests for domain models
- [x] Test Project model validation
- [x] Test Plan model state transitions
- [x] Test Context file loading
- [x] Test Change operations
- [x] Write Behave tests for repositories
- [x] Test CRUD operations for each repository
- [x] Test database transactions
- [x] Test error handling
- [x] Write Robot Framework integration tests
- [x] Test init command end-to-end
- [x] Test context-load with real files
- [x] Test database persistence
- [x] Ensure >85% coverage maintained
- [x] Success Criteria for Week 2
- [x] Can run: `agents init my-project`
- [x] Can run: `agents context-load src/`
@@ -2484,7 +2485,7 @@ Each phase item includes mandatory **Code**, **Document**, and **Tests** bullets
- [x] Can run: `agents build`
- [x] Can run: `agents apply`
- [x] All commands persist to JSON files (SQLite models created but NOT integrated)
- [x] Coverage remains >85% (needs verification - no .coverage file)
- [x] Coverage remains >85% (verified at 95% via `.nox/coverage_report/bin/coverage report --fail-under=85`)
- [x] All type checks pass
- [x] **Stage 2.5: Complete Database Integration (HIGH PRIORITY)**
@@ -2507,7 +2508,7 @@ Each phase item includes mandatory **Code**, **Document**, and **Tests** bullets
- [x] Add Robot Framework tests beyond cli_plan_context_commands.robot (database_integration.robot created)
- [x] Add unit tests for repositories (tested in database_integration_steps.py)
- [x] Add integration tests for database operations (comprehensive tests added)
- [ ] Verify actual test coverage percentage with coverage.py
- [x] Verify actual test coverage percentage with coverage.py (95% total coverage via `.nox/coverage_report/bin/coverage report --fail-under=85` on 2025-11-17)
- [x] **Fix Mock Provider**
- [x] REMOVE mock implementation from `src/cleveragents/application/services/plan_service.py`
- [x] Create `features/mocks/mock_ai_provider.py` for testing