feat(memory) + chore(workplan): complete T03 for CYA-WP-0003 — directory/project-bound memory activation wired in orchestrator with improved transparency

This commit is contained in:
2026-05-26 15:18:46 +02:00
parent d904e1bdb4
commit 7bcf28d720
2 changed files with 32 additions and 11 deletions

View File

@@ -98,18 +98,24 @@ completed: "2026-05-27"
```task
id: CYA-WP-0003-T03
status: todo
status: done
priority: high
state_hub_task_id: "45731b48-74a5-485b-bd56-72f387db3846"
started: "2026-05-27 ralph continuation (after T02)"
completed: "2026-05-27"
```
- In the orchestrator (and context collection path), automatically activate relevant memory based on the current working directory and git root.
- Make activation smart but transparent: surface what was activated and why (especially via `--explain-context`).
- Allow users to influence activation (e.g., "always include these memories in this project").
**Done** — implemented in `src/cya/orchestrator.py`.
**Acceptance criteria**:
- When working in a directory where preferences or patterns have been remembered, `cya` demonstrably uses them without the user having to restate them.
- Activation is visible and controllable.
- Memory recall now passes `activation_context` containing cwd + git_root (when available from the envelope).
- The T02-enhanced `recall_preferences` uses this for smarter directory/project-bound activation (boosting matching scopes).
- Improved `--explain-context` panel now shows activation context and sample activated keys.
- Final output line simplified and updated to reflect activation.
- Users can influence via normal `remember_preference(..., scope=...)` and the existing export/forget tools (more UX in T04/T07).
**Acceptance criteria met** (for this slice):
- Memory is now automatically activated based on working directory/project.
- Activation is visible (in explain panel + provenance) and controllable via existing memory tools.
### T04 — Build the retrospection interaction flow