| name | reflect |
| description | Process conversation history and staged items — extract facts, consolidate, then reset sessions |
Reflect
Memory maintenance — extract facts from conversation history and staging inbox, then consolidate.
Phase 1: Read pending material
Three sources to check:
- Your current session — already in your context. Extract facts from what you know.
- Inbox sessions — list
~/.clarvis/staging/inbox/ for session_*.jsonl files. Parse each with ctools read_sessions '{"path": "<file>"}'.
- Factoria's live session — parse
~/.clarvis/factoria/pi-session.jsonl with read_sessions (still active, not in inbox).
- Other inbox items — check for non-session files in inbox (user-submitted summaries from
/remember, staged markdown files).
If nothing new across all sources, report "nothing to reflect on" and stop.
Phase 2: Extract facts
For each piece of pending content (including your current session):
- Scan for salient facts (people, projects, decisions, preferences, events)
- Use
recall to check if each fact already exists
- Use
remember to store genuinely new facts with appropriate type and entities
What to extract:
- People and relationships (names, roles, affiliations)
- Projects and decisions (what's being built, technical choices, progress)
- Preferences and opinions (tools, approaches, aesthetics — include confidence 0.0-1.0)
- Events and experiences (concerts, meetings, milestones)
What to skip:
- Routine tool invocations (file reads, grep, test runs)
- Ephemeral task context (open files, working directory)
- Content already in memory
- Debugging noise
Guidelines:
- fact_type:
world (objective), experience (first-person), opinion (beliefs, 0.0-1.0 confidence)
- Write facts as standalone sentences — must make sense without surrounding context
- Preserve temporal anchors (dates, relative time)
- Include entity names (people, projects, places)
- Default bank: parletre. Use agora for shared knowledge.
- One fact per
remember call
Phase 3: Consolidate
- Check
stats for the current state of each bank
- Run
unconsolidated to find facts not yet grouped
- If fewer than 10 unconsolidated facts, skip consolidation
- Use
related_observations to find existing observations that cover the cluster
- Apply consolidation decisions via
consolidate
Phase 4: Mental model review
- Check
stale_models for models that need refreshing
- Update stale models with new consolidated information
Phase 5: Complete
- Call
reflect_complete — moves inbox to staging/digested/, resets all agent sessions (current sessions move to inbox and restart fresh)
- Report what was processed