feat: add learner memory ingestion

This commit is contained in:
user
2026-04-26 16:34:52 +09:00
parent 4a4240fea2
commit 600acf7303
23 changed files with 931 additions and 24 deletions

View File

@@ -0,0 +1,33 @@
# Phase 3 Research
## Question
How should learner memory be added without turning the diagnostic session store
into durable product truth?
## Findings
### Keep memory separate from interview sessions
Diagnostic sessions contain raw interaction records. Learner memory should be a
separate derived state built from graded evidence. This preserves the boundary
between temporary/session context and durable learning claims.
### Apply only evidenced updates
The memory service should ignore update candidates that do not include evidence.
This directly enforces the OpenSpec rule that inferred memory requires evidence.
### In-memory is still enough
The current product does not yet need restart durability. A store interface plus
tests gives the shape of persistence without adding database complexity early.
## Recommendation
1. Add `internal/learnermemory` with profile, mastery, misconception,
intervention, and review schedule records.
2. Extend workflow runner memory extraction to return evidenced candidates.
3. Wire diagnostic answer submission to memory ingestion.
4. Add HTTP read endpoint for learner memory snapshot.
5. Verify with tests and live smoke.