Docs: Updated implementation plan with progress from last commit

This commit is contained in:
2025-12-19 13:45:48 -05:00
parent 34a29d7cc8
commit cc7be09678
+3 -1
View File
@@ -649,6 +649,8 @@ All 10 ADRs have been created in `docs/architecture/decisions/`:
- Porting scope: pull the entire git `v2` tag codebase into an isolated package (e.g., `src/cleveragents/actors/`) and adapt its entry points to the actor registry and ContextService without touching `plandex/`; migrate all relevant API/CLI docs and remove `--model/--provider` references in favor of `--actor`.
- Testing expectations: port git v2 tag unit/integration coverage into Behave and Robot suites for actor adapter, registry CRUD, default guard, safe/unsafe toggles, warning emission, built-in enumeration, chat/plan actor selection with context flags, and configuration blob/hash stability; wire new suites into nox with >85% coverage and pyright clean.
- 2025-12-19: Actor persistence primitives verified in codebase: actors table + default index present via `alembic/versions/c3d9b3d0cf3e_add_actors_table.py:1` and SQLAlchemy model carries default/built-in flags at `src/cleveragents/infrastructure/database/models.py:152`; repository enforces built-in/default guards and exposes default setters in `src/cleveragents/infrastructure/database/repositories.py:582` and `src/cleveragents/infrastructure/database/repositories.py:661`; UnitOfWork and DI wire the repository into services at `src/cleveragents/infrastructure/database/unit_of_work.py:170` and `src/cleveragents/application/container.py:85`; ActorService normalization plus default handling lives at `src/cleveragents/application/services/actor_service.py:22`. No gaps found for Stage 7.5 persistence prerequisite; next work is adapter import + CLI flag changes.
**2025-12-09: Provider streaming normalization + Behave coverage refresh**
- `PlanService.generate_plan_streaming` now consumes the new provider iterator contract, normalizes nested `__end__/response` payloads, validates streamed `Change` objects, persists token counts, and still emits the legacy CLI end event for compatibility (`src/cleveragents/application/services/plan_service.py:858`).
- `LangChainChatProvider.stream_changes` (plus both mock providers) now yield LangGraph workflow events followed by `{"__end__": {"response": ProviderResponse}}`, guaranteeing a consistent exit shape and structured usage logging (`src/cleveragents/providers/llm/langchain_chat_provider.py:154`, `features/mocks/langchain_mock_provider.py:269`, `features/mocks/mock_ai_provider.py:218`).
@@ -4402,7 +4404,7 @@ If you can do all of the above by end of Day 1, you're on track!
- [ ] Stage 7.5: Actor configuration import and git v2 tag's code port
- [ ] Code:
- [X] Add Actor domain model with canonical config hashing (`src/cleveragents/domain/models/core/actor.py`).
- [ ] Add actor persistence primitives (database schema/migration + repository + DI wiring).
- [X] Add actor persistence primitives (database schema/migration + repository + DI wiring).
- [ ] Vendor the entire git `v2` tag codebase into an isolated package `src/cleveragents/actors/` (or equivalent) preserving directory structure for imports; pin the referenced commit hash in **Phase 2 Notes**; add new dependencies to a dedicated `[project.optional-dependencies.actors]` group (no `plandex/` changes); ensure package `__init__` files are side-effect free and nothing initializes until the actor adapter loads it.
- [ ] Port the git v2 tag actor-configuration parser/runner into an adapter that emits `graph_descriptor`, provider/model requirements, normalized options, and `unsafe`; map git v2 tag's flags to a typed Pydantic config model; bind the adapter to the existing provider registry and `ContextService` so all context/state flows through current lifecycles, and inject adapter-produced initial context variables before graph execution.
- [ ] Implement an actor registry backed by the config DB with schema: `name`, `config_blob` (canonical JSON/YAML, no file path), `config_hash` (content hash), `graph_descriptor`, `unsafe` (bool), `created_at`, `updated_at`, `default_actor`; generate built-ins from the provider registry (`<provider>/<model>`) at startup as read-only rows; enforce `local/<id>` naming for customs; block removal when target is default; expose CRUD via repository + service layer; add migration to create/modify registry tables and the default pointer.