feat(memory): complete CYA-WP-0006 Profile 1 production hardening

Add guided reflection capture with preview, cya memory reflections CLI,
near-duplicate compaction, budget-capped surfacing, and expanded tests.
Profile 1 is now documented as production-ready in README and MemoryVision.
This commit is contained in:
2026-06-22 01:39:07 +02:00
parent a0d24a31eb
commit c14d09c14d
12 changed files with 735 additions and 52 deletions

View File

@@ -0,0 +1,20 @@
# CYA-WP-0006 — Profile 1 Gap Checklist
Audit of shipped Profile 1 spike (CYA-WP-0005-T05) vs MemoryVision Profile 1 acceptance criteria.
Gates implementation tasks T02T05.
| Gap | Spike state | Target (production) | Task |
|-----|-------------|---------------------|------|
| Capture UX | Single optional prompt; no preview | Guided 13 prompts (well / remember / avoid); preview + confirm; skip leaves no empty records | T02 |
| Provenance | Plain key/value only | Session date + scope in reflection provenance | T02 |
| Review / export | Manual JSON inspection | `cya memory reflections` lists/exports by scope | T03 |
| Compaction | None | Near-duplicate detection; explicit merge/replace (no silent delete) | T03 |
| Activation boost | Kind filter only | Reflections sorted ahead when recalled | T04 |
| Explain surfacing | Item count + sample keys | Reflection count + truncated lesson text + provenance | T04 |
| Response surfacing | Two reflections, 60-char truncate | Budget-capped "reflections influenced this" line | T04 |
| Observability | `by_kind` in export | Reflection counts by scope in export | T05 |
| Safety regression | Preference "never" tested | Reflections cannot downgrade destructive confirmation | T05 |
| Tests | Single spike test | Paths for capture, compaction, surfacing, safety | T05 |
| Docs | "spike" wording | README example session; MemoryVision "production" | T06 |
**Profile 0 invariants (must not regress):** user-controlled JSON, full provenance, memory adds caution only.