Originally created by: TheoV823
app/profiles/ package with four single-responsibility modules: signals.py, extractors.py, builder.py, renderer.pybuild_mneme_profile): QA signals dominate; extra-context can only confirm or extend; confidence levels are low / medium / high only — no floats, no blending{value, confidence, sources} — replaces raw JSON blob injection<user_profile> XML wrapper for backward compatibilityassemble_mneme() signature unchanged — engine.py untouchedadd-user gains --extra-context-path for optional free-text signal input via a synchronous Claude API callmigrate_add_extra_context.sql) for existing databases; one nullable extra_context TEXT column added to users```
JSON profile → extract_qa_signals()
↘
build_mneme_profile() → render_profile_for_prompt() → Claude
↗
free text → extract_extra_context_signals() (optional)
```
For any database created before 2026-04-07, run once:
```sql
ALTER TABLE users ADD COLUMN extra_context TEXT;
```
No data migration needed — existing `mneme_profile` values handled by legacy compat path.
🤖 Generated with Claude Code
Tickets: #100
Tickets: #149
Tickets: #161
Tickets: #2
Tickets: #214
Tickets: #3
Ticket changed by: TheoV823