Skip to content

Commit e68e9f2

Browse files
madebygpsclaude
andcommitted
Improve task extraction intelligence in daily planning
Enhanced the LLM prompt for task extraction to be smarter about: - Temporal context recognition (tomorrow, next, specific times) - Narrative future actions ("Tomorrow I have to X") - Scheduled events with times (10:30 AM, 3pm, etc.) - Context-aware preparation tasks - Better distinction between completed vs future actions This addresses issues where valid future tasks written in narrative form were not being extracted from diary entries. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 292c5fc commit e68e9f2

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

brain_cli/plan_commands.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,36 @@ def extract_tasks_from_diary(diary_entry_content: str, diary_date: str, llm_clie
4949
if not diary_entry_content or len(diary_entry_content.strip()) < 50:
5050
return []
5151

52-
system_prompt = """You are a task extraction assistant. Analyze diary entries and extract actionable tasks for today.
52+
system_prompt = """You are an intelligent task extraction assistant. Analyze diary entries and extract actionable tasks for the next day.
5353
5454
Extract tasks that:
5555
- Are mentioned as incomplete, pending, or needing follow-up
5656
- Represent specific actions (not vague intentions)
57-
- Are relevant for the next day
57+
- Are relevant for the next day or future
5858
- Include follow-ups from meetings or conversations
59+
- Are scheduled events with specific times (e.g., "10:30 meeting", "3pm call")
60+
- Are mentioned in future context even if narrative (e.g., "Tomorrow I have to...", "I will need to...", "On Friday I should...")
61+
- Require preparation based on context (e.g., "meeting with VP" implies "prepare talking points")
62+
63+
Be SMART about temporal context:
64+
- "Tomorrow I have to X" = future action, extract it
65+
- "I will have to X" = future action, extract it
66+
- "I need to X" = action item, extract it
67+
- "On [day/date] I'm doing X" = scheduled action, extract it
68+
- Look for time markers: tomorrow, next, Friday, specific times (10:30, 3pm, etc.)
5969
6070
Do NOT extract:
61-
- Completed activities (past tense)
62-
- General reflections or feelings
63-
- Vague intentions without clear actions
71+
- Already completed activities (e.g., "I did X", "X was finished", "I went through X and it's done")
72+
- General reflections about feelings or mood
73+
- Past events with no follow-up needed
74+
- Vague intentions without actionable steps
6475
6576
Format: Return ONLY a numbered list of tasks, one per line.
6677
Example:
67-
1. Follow up with Sarah about project proposal
68-
2. Review and merge pull request #42
69-
3. Prepare slides for Thursday presentation
78+
1. Pick up rental car at 10:30 AM
79+
2. Prepare talking points for Patrick meeting at 3:05 PM
80+
3. Moderate Pamela's stream
81+
4. Review deck changes before stream
7082
7183
If no actionable tasks are found, return: NO_TASKS"""
7284

0 commit comments

Comments
 (0)