Files
Maven/docs/plans/03-memory-evaluation.md
T
kami 5fe8f228c1 feat(mavweb): /ecosystem page consuming Nexus/Praxis/Hexis + shell fixes
Add a read-only /ecosystem page that consumes the sibling services'
JSON APIs (Nexus entities, Praxis attention, Hexis capabilities),
fetched concurrently with honest per-panel error states. Siblings stay
headless — mavweb is their human surface (arch §16). Wired via mavweb
-nexus/-praxis/-hexis flags; mavweb joins the ecosystem compose network.

Fix mobile horizontal overflow across all pages: .content is a flex
child with default min-width:auto, so it refused to shrink below the
tables' intrinsic width. min-width:0 lets wide tables pan inside .scroll
instead of dragging the page sideways. Verified via CDP geometry check
(scrollWidth === clientWidth at 430px).

Also includes in-progress Ethos UI redesign, ecosystem deploy compose,
and planning docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 22:04:23 +04:00

28 lines
2.1 KiB
Markdown

# Plan: Background Memory Evaluation & Idea Generation
**Goal:** Maven periodically reviews her own memory stores (facts, notes, events, nudges), evaluates coherence and gaps, and generates proactive proposals — new routines, configuration tweaks, observations she can share with the user.
**Done when:**
- `internal/memory/eval.go` — periodic evaluation loop runs on a slow cadence (1h)
- Evaluation reads `RecentFacts`, `RecentNotes`, `RecentNudges`, `RecentEvents` via `store.Store` or `ipc.CoreAPI`
- LLM summarizes state, detects anomalies (e.g. "you haven't recorded a meal in 3 days — is your routine broken?"), proposes new care rules
- Generated proposals are written as notes (kind `note`, source `infer:memory-eval`) and/or trigger nudges through the dispatcher
- Evaluation trace visible on `/history` page in mavweb
**Scope:**
- New `internal/memory/eval.go` — evaluator struct calling `internal/llm.Client` with a summarization prompt
- Reuses `internal/delivery.Dispatcher` for surfacing insights as care nudges (sev1)
- Reuses `internal/store` for reading memory state and writing evaluation notes
- Daemon wiring: new evaluation goroutine in `cmd/mavend/main.go`
- Config: `memory_eval_interval` in `config.Config` (default 1h, 0 to disable)
**Steps:**
1. Create `internal/memory/eval.go``Evaluator` struct holding `*store.Store`, `*llm.Client`, `*delivery.Dispatcher`
2. Implement `Evaluate(ctx)` — reads last N facts, notes, nudges, events, builds a prompt summarizing patterns, anomalies, gaps
3. LLM call returns structured observations: `{"observation":"...","confidence":0.8,"suggested_action":"remind|propose|notify"}`
4. High-confidence observations written as notes (`source:infer:memory-eval`) or dispatched as care nudges (sev1) through `dispatcher.DispatchNudge`
5. Wire evaluator goroutine in `cmd/mavend/main.go` — separate ticker, not on the main tick loop
6. Add `/eval` API method to `ipc.CoreAPI` (or reuse `Chat` with system context) so mavweb can show evaluation history
7. Add `memory_eval` block to `deploy/mavend.json`
8. Test with synthetic store state — verify observations match expected patterns