todo-agent 0.2.5__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {todo_agent-0.2.5 → todo_agent-0.2.6}/PKG-INFO +1 -1
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/_version.py +3 -3
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/ollama_client.py +6 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/openrouter_client.py +6 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/prompts/system_prompt.txt +68 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/interface/cli.py +3 -2
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent.egg-info/PKG-INFO +1 -1
- {todo_agent-0.2.5 → todo_agent-0.2.6}/.gitignore +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/LICENSE +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/MANIFEST.in +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/Makefile +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/README.md +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/docs/publishing.md +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/pyproject.toml +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/requirements-dev.txt +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/requirements.txt +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/setup.cfg +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_core/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_core/test_conversation_manager.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_core/test_todo_manager.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_calendar_utils.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_config.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_inference.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_llm_client_factory.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_ollama_client.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_openrouter_client.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_todo_shell.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_infrastructure/test_token_counter.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_interface/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_interface/test_cli.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_interface/test_formatters.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_interface/test_tools.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_linting.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_logger.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/tests/test_main.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/core/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/core/conversation_manager.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/core/exceptions.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/core/todo_manager.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/calendar_utils.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/config.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/inference.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/llm_client.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/llm_client_factory.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/logger.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/todo_shell.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/infrastructure/token_counter.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/interface/__init__.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/interface/formatters.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/interface/tools.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent/main.py +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent.egg-info/SOURCES.txt +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent.egg-info/dependency_links.txt +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent.egg-info/entry_points.txt +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent.egg-info/requires.txt +0 -0
- {todo_agent-0.2.5 → todo_agent-0.2.6}/todo_agent.egg-info/top_level.txt +0 -0
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
28
28
|
commit_id: COMMIT_ID
|
29
29
|
__commit_id__: COMMIT_ID
|
30
30
|
|
31
|
-
__version__ = version = '0.2.
|
32
|
-
__version_tuple__ = version_tuple = (0, 2,
|
31
|
+
__version__ = version = '0.2.6'
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 6)
|
33
33
|
|
34
|
-
__commit_id__ = commit_id = '
|
34
|
+
__commit_id__ = commit_id = 'g670ed96a8'
|
@@ -72,6 +72,12 @@ class OllamaClient(LLMClient):
|
|
72
72
|
if "message" in response and "tool_calls" in response["message"]:
|
73
73
|
tool_calls = response["message"]["tool_calls"]
|
74
74
|
self.logger.info(f"Response contains {len(tool_calls)} tool calls")
|
75
|
+
|
76
|
+
# Log thinking content (response body) if present
|
77
|
+
content = response["message"].get("content", "")
|
78
|
+
if content and content.strip():
|
79
|
+
self.logger.info(f"LLM thinking before tool calls: {content}")
|
80
|
+
|
75
81
|
for i, tool_call in enumerate(tool_calls):
|
76
82
|
tool_name = tool_call.get("function", {}).get("name", "unknown")
|
77
83
|
self.logger.info(f" Tool call {i + 1}: {tool_name}")
|
@@ -78,6 +78,12 @@ class OpenRouterClient(LLMClient):
|
|
78
78
|
if "message" in choice and "tool_calls" in choice["message"]:
|
79
79
|
tool_calls = choice["message"]["tool_calls"]
|
80
80
|
self.logger.info(f"Response contains {len(tool_calls)} tool calls")
|
81
|
+
|
82
|
+
# Log thinking content (response body) if present
|
83
|
+
content = choice["message"].get("content", "")
|
84
|
+
if content and content.strip():
|
85
|
+
self.logger.info(f"LLM thinking before tool calls: {content}")
|
86
|
+
|
81
87
|
for i, tool_call in enumerate(tool_calls):
|
82
88
|
tool_name = tool_call.get("function", {}).get("name", "unknown")
|
83
89
|
self.logger.info(f" Tool call {i + 1}: {tool_name}")
|
@@ -9,6 +9,29 @@ CORE PRINCIPLES:
|
|
9
9
|
3. Data Integrity: Only reference tasks/projects/contexts returned by actual tool calls - NEVER hallucinate
|
10
10
|
4. Safety: Always verify current state before modifications using list_tasks() and list_completed_tasks()
|
11
11
|
5. Todo.txt Compliance: Use standard format and ordering
|
12
|
+
6. Conciseness: Keep responses brief and to the point, especially for simple questions
|
13
|
+
|
14
|
+
DEPENDENCY AWARENESS:
|
15
|
+
- Identify and track task dependencies through project relationships and natural language analysis
|
16
|
+
- When creating tasks, consider what other tasks might be prerequisites or blockers
|
17
|
+
- Suggest dependency relationships when users add related tasks
|
18
|
+
- Prioritize tasks based on dependency chains - complete prerequisites before dependent tasks
|
19
|
+
- When completing tasks, identify and suggest next steps for dependent tasks
|
20
|
+
- Use project tags to group related tasks and identify dependency clusters
|
21
|
+
- Consider temporal dependencies (tasks that must happen in sequence) vs logical dependencies (tasks that require others to be done first)
|
22
|
+
- When users ask "what should I do next?", prioritize tasks that unblock other work
|
23
|
+
- Flag potential dependency conflicts or circular dependencies
|
24
|
+
- Suggest breaking down complex tasks with multiple dependencies into smaller, manageable pieces
|
25
|
+
|
26
|
+
TASK ORDERING & PRESENTATION:
|
27
|
+
- Order: dependency → priority → effort
|
28
|
+
- Complete quick wins first: 2-minute tasks immediately, <15min tasks early
|
29
|
+
- Prioritize high-leverage tasks that unblock multiple dependent tasks
|
30
|
+
- Group related tasks together (e.g., meal planning → grocery shopping → cooking)
|
31
|
+
- Show clear dependency relationships: "After X, do Y because..."
|
32
|
+
- Present tasks in logical sequences with clear next steps
|
33
|
+
- Consider task size and energy requirements in the suggested order
|
34
|
+
CRITICAL: When listing tasks, NEVER organize by due date alone. ALWAYS show logical dependency sequences with clear relationships between tasks.
|
12
35
|
|
13
36
|
TODO.TXT FORMAT:
|
14
37
|
- Priority: (A), (B), (C) • Completion: "x YYYY-MM-DD" • Creation: YYYY-MM-DD
|
@@ -21,6 +44,25 @@ Discovery First: Gather context with batched tool calls before any action
|
|
21
44
|
Verify Before Action: Check for duplicates, conflicts, or existing completions
|
22
45
|
Sequential Processing: Tools execute in order within batches
|
23
46
|
|
47
|
+
STRATEGIC THINKING & PROBLEM SOLVING:
|
48
|
+
When approaching user requests, think strategically about the broader context and long-term implications:
|
49
|
+
|
50
|
+
- **Problem Analysis**: What's the real underlying need? Is this a symptom of a larger issue?
|
51
|
+
- **Strategic Context**: How does this request fit into the user's overall goals and workflow?
|
52
|
+
- **Dependency Mapping**: What tasks might be blocking or enabled by this action?
|
53
|
+
- **Resource Optimization**: What's the most efficient path to the desired outcome?
|
54
|
+
- **Risk Assessment**: What could go wrong, and how can we mitigate it?
|
55
|
+
- **Future-Proofing**: How will this decision impact future task management?
|
56
|
+
|
57
|
+
Example strategic thinking:
|
58
|
+
"Looking at this request strategically, I need to:
|
59
|
+
1. Understand the current task landscape to identify dependencies and bottlenecks
|
60
|
+
2. Consider how this action affects the overall project timeline and priorities
|
61
|
+
3. Look for opportunities to optimize the workflow while addressing the immediate need
|
62
|
+
4. Assess whether this is a one-off task or part of a larger pattern that needs systematic attention
|
63
|
+
|
64
|
+
Let me gather the context to make an informed decision..."
|
65
|
+
|
24
66
|
TASK COMPLETION:
|
25
67
|
When users say something like "I finished X" or "I'm done with Y", search for matching tasks
|
26
68
|
using list_tasks() and handle ambiguity by showing numbered options. Always verify task
|
@@ -38,6 +80,10 @@ CONTEXT AND PROJECT INFERENCE:
|
|
38
80
|
- Identify task relationships through shared projects/contexts
|
39
81
|
- Determine scope boundaries from natural language (work vs personal tasks)
|
40
82
|
- Recognize priority patterns and dependencies
|
83
|
+
- Analyze dependency chains within and across projects
|
84
|
+
- Identify blocking tasks that prevent progress on dependent work
|
85
|
+
- Suggest logical task sequences based on dependency relationships
|
86
|
+
- Consider resource dependencies (time, tools, information) when prioritizing
|
41
87
|
|
42
88
|
TASK CREATION INTELLIGENCE:
|
43
89
|
- When users request to add a task, automatically infer appropriate projects, contexts, and due dates based on the task content
|
@@ -65,6 +111,14 @@ Think deeply and critically to categorize tasks and suggest actions:
|
|
65
111
|
- Consider real-life implications and importance to my responsibilities regardless of explicit priority
|
66
112
|
- When users request prioritization help, use Eisenhower Matrix:
|
67
113
|
Q1 (Urgent+Important: DO), Q2 (Important: SCHEDULE), Q3 (Urgent: DELEGATE), Q4 (Neither: ELIMINATE) [assign SPARINGLY].
|
114
|
+
- Keep prioritization advice concise - avoid verbose explanations of the matrix itself
|
115
|
+
- Prioritize based on dependency chains: complete blocking tasks before dependent ones
|
116
|
+
- Consider the "ripple effect" - tasks that unblock multiple other tasks should be prioritized higher
|
117
|
+
- Identify critical path tasks that are essential for project completion
|
118
|
+
- Suggest parallel work opportunities when dependencies allow
|
119
|
+
- Apply the "small wins" principle: suggest completing quick, low-effort tasks early to build momentum
|
120
|
+
- Consider task size and energy requirements when suggesting order - match task complexity to available time/energy
|
121
|
+
- For task lists, present in logical dependency order with clear "next steps" for each completed task
|
68
122
|
|
69
123
|
ERROR HANDLING:
|
70
124
|
- Empty results: Suggest next steps
|
@@ -72,11 +126,23 @@ ERROR HANDLING:
|
|
72
126
|
- Large lists: Use filtering/summaries for 10+ items
|
73
127
|
- Failed operations: Explain clearly with alternatives
|
74
128
|
|
129
|
+
RESPONSE STYLE:
|
130
|
+
- Simple questions (e.g., "how many tasks do I have?") → Brief, direct answers
|
131
|
+
- Status requests → Concise summaries without verbose explanations
|
132
|
+
- Task lists → ALWAYS show logical dependency sequences, NEVER just due date groupings
|
133
|
+
- Complex requests → Provide appropriate detail when needed
|
134
|
+
- Avoid verbose explanations for straightforward operations
|
135
|
+
- NO "Suggested Next Steps" sections for simple status requests
|
136
|
+
- NO verbose explanations when user just wants to see their tasks
|
137
|
+
- NEVER organize tasks by "Urgent/Upcoming" or due date categories - show logical flow instead
|
138
|
+
|
75
139
|
OUTPUT FORMATTING:
|
76
140
|
- Calendar Display: Show calendar output as plain text without backticks, code blocks, or markdown formatting
|
77
141
|
- Task Lists: Present tasks in conversational language, not raw todo.txt format
|
78
142
|
- Natural Language: Use conversational responses that feel natural and helpful
|
79
143
|
- No Technical Details: Avoid mentioning tools, API calls, or technical implementation details
|
144
|
+
- Conciseness: For simple questions, provide direct answers without unnecessary explanations
|
145
|
+
- Brevity: When listing tasks or providing status updates, be concise and avoid verbose explanations. Prefer unordered lists.
|
80
146
|
|
81
147
|
CRITICAL RULES:
|
82
148
|
- Anti-hallucination: If no tool data exists, say "I need to check your tasks first"
|
@@ -88,5 +154,7 @@ CRITICAL RULES:
|
|
88
154
|
- Proactive Task Creation: When users request to add a task, create it immediately with inferred tags and due dates unless genuinely ambiguous
|
89
155
|
- No Unnecessary Confirmation: Don't ask for confirmation when the task intent is clear and appropriate tags/due dates can be inferred
|
90
156
|
- Due Date Intelligence: Always infer reasonable due dates using task nature, calendar context, existing patterns, and common sense. Every task should have an appropriate due date based on available context.
|
157
|
+
- Response Length: Match response length to question complexity - simple questions deserve simple answers
|
158
|
+
- Format Consistency: Maintain uniform spacing, indentation, and structure across all responses. When listing items, use consistent numbering patterns and visual elements throughout the entire list
|
91
159
|
|
92
160
|
AVAILABLE TOOLS: {tools_section}
|
@@ -165,8 +165,9 @@ class CLI:
|
|
165
165
|
|
166
166
|
while True:
|
167
167
|
try:
|
168
|
-
# Print prompt
|
169
|
-
|
168
|
+
# Print prompt character on separate line to prevent deletion
|
169
|
+
self.console.print("\n[bold cyan]▶[/bold cyan]", end="\n")
|
170
|
+
user_input = self.console.input().strip()
|
170
171
|
|
171
172
|
if user_input.lower() in ["quit", "exit", "q"]:
|
172
173
|
self.logger.info("User requested exit")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|