personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Reduce activity state fragmentation via prompt tuning

Analysis of Feb 9-10 journal data showed 43% false-new rate in
activity_state: the LLM was marking coding as "new" on consecutive
segments because the description changed (different files, different
subtask), producing 33 separate coding records for a single day.

Key prompt changes:
- Define "continuing" as the default when same type is in previous state
- Narrow "new" to only when the type wasn't previously active or there
is a clear session boundary (different meeting, different participants)
- Add "prefer continuing" as the most prominent rule
- Scope same-type transitions to meetings/calls only, not coding/reading
- Clarify that description evolution is normal for continuing activities
- Rebalance examples from 3 new/1 continuing to 2 continuing/1 new
- Include "focused reading/review" as evidence of active engagement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+23 -13
+23 -13
muse/activity_state.md
··· 31 31 ## Task 32 32 33 33 Analyze the current segment and determine the state of each detected activity: 34 - - **continuing** - Was active in the previous segment AND you see evidence it is still happening 35 - - **new** - Just started in this segment (or same type restarted — e.g., one meeting ended, another began) 34 + - **continuing** - Was active in the previous segment AND the same type of activity is still happening. **This is the default** when the same activity type appears in both previous state and current segment. Changing focus within the same activity (different files, different subtask, different topic) is still "continuing" — update the description instead. 35 + - **new** - This activity type was NOT active in the previous segment, or there was a clear session boundary (e.g., one meeting ended and a distinctly different meeting with different people began). Shifting focus within the same activity type is NOT "new." 36 36 - **ended** - Was active in the previous segment but stopped during this segment 37 37 38 38 ## Output Format ··· 58 58 ## Rules 59 59 60 60 1. **Only detect configured activities** — Ignore activity that doesn't match the facet's list 61 - 2. **Active vs. visible** — Only report an activity if the user is actively interacting with it during this segment. An application merely visible on screen but unchanged is NOT active. Look for evidence of interaction: typing, clicking, new content, spoken discussion. 62 - 3. **Report endings** — If an activity listed as **active** in the Previous State is no longer happening, report it as `"ended"`. Only report endings for activities that were active — do not re-report activities that already ended previously. 63 - 4. **Same-type transitions** — If a meeting ends and a different meeting starts, report both: the old one as `"ended"` and the new one as `"new"` 64 - 5. **Update descriptions** — As activities continue, refine the description with new context 65 - 6. **Empty is valid** — `[]` is correct when no activities are detected 61 + 2. **Prefer continuing** — If the same activity type was active in Previous State and you see evidence of that type still happening, always use `"continuing"`. Switching files, changing subtasks, or shifting focus within the same activity type is NOT a new activity — it is a continuation with an updated description. Only use `"new"` when the activity type was not previously active, or there is a clear session boundary (e.g., one meeting ended and a different meeting with different participants began). 62 + 3. **Active vs. visible** — Only report an activity if the user is actively engaged with it. Look for evidence: typing, clicking, new content, spoken discussion, or focused reading/review. An application merely visible on screen but unchanged and not being read is NOT active. 63 + 4. **Report endings** — If an activity listed as **active** in the Previous State is no longer happening, report it as `"ended"`. Only report endings for activities that were active — do not re-report activities that already ended previously. 64 + 5. **Same-type transitions** — These are rare and apply mainly to meetings/calls: if one meeting ends and a clearly different meeting begins (different participants, different topic), report the old as `"ended"` and the new as `"new"`. For other activity types like coding, browsing, or reading, a change in focus is just a continuation — do NOT split. 65 + 6. **Update descriptions** — As activities continue, evolve the description to reflect current focus. The description changing is normal and expected for continuing activities. 66 + 7. **Empty is valid** — `[]` is correct when no activities are detected 66 67 67 68 ## Examples 68 69 69 - **New activity starts:** 70 + **Activity continues — same type, different focus (most common):** 71 + 72 + Previous state had: `coding [high]: Implementing user auth flow` 70 73 ```json 71 - [{"activity": "coding", "state": "new", "description": "Implementing user auth flow", "level": "high", "active_entities": ["Claude Code", "VS Code"]}] 74 + [{"activity": "coding", "state": "continuing", "description": "Writing tests for the auth flow and fixing a bug in token refresh", "level": "high", "active_entities": ["Claude Code", "VS Code"]}] 72 75 ``` 73 76 74 - **Activity continues from previous:** 77 + **Activity continues — same type, different project:** 78 + 79 + Previous state had: `coding [high]: Working on backend API endpoints` 75 80 ```json 76 - [{"activity": "meeting", "state": "continuing", "description": "Sprint planning - now discussing blockers", "level": "high", "active_entities": ["Alice Johnson", "Bob Smith"]}] 81 + [{"activity": "coding", "state": "continuing", "description": "Switched to updating the CLI tool's help text and argument parsing", "level": "high", "active_entities": ["VS Code", "terminal"]}] 77 82 ``` 78 83 79 - **One meeting ends, another starts:** 84 + **New activity starts (no previous state for this type):** 85 + ```json 86 + [{"activity": "messaging", "state": "new", "description": "Slack thread about deployment", "level": "low", "active_entities": ["DevOps"]}] 87 + ``` 88 + 89 + **Meeting transition (rare same-type split — different participants):** 80 90 ```json 81 91 [ 82 92 {"activity": "meeting", "state": "ended", "description": "Sprint planning completed"}, 83 - {"activity": "meeting", "state": "new", "description": "1:1 with manager", "level": "high", "active_entities": ["Manager Name"]} 93 + {"activity": "meeting", "state": "new", "description": "1:1 with manager about performance review", "level": "high", "active_entities": ["Manager Name"]} 84 94 ] 85 95 ``` 86 96