agent-planner-mcp 0.8.1 → 0.9.1

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.
package/AGENT_GUIDE.md CHANGED
@@ -1,269 +1,84 @@
1
- # AgentPlanner Quick Reference for AI Agents
1
+ # AgentPlanner Quick Reference (v0.9.0)
2
2
 
3
- This guide is optimized for AI agents using AgentPlanner MCP tools.
3
+ Tight cheat sheet for AI agents. Full docs: [SKILL.md](SKILL.md). Migration from 0.8.x: [docs/MIGRATION_v0.9.md](docs/MIGRATION_v0.9.md).
4
4
 
5
- ## Core Workflow
5
+ ## Start here
6
6
 
7
7
  ```
8
- 0. check_coherence_pending() → See if plans/goals need alignment review
9
- If stale items: run_coherence_check(plan_id) on each
10
- 1. suggest_next_tasks(plan_id) → Find ready tasks (dependency-aware)
11
- 2. get_task_context(node_id, depth=2) → Load progressive context
12
- 3. Work on tasks (quick_status to track)
13
- 4. quick_log your progress
14
- 5. add_learning when you discover something important
15
- 6. recall_knowledge before making decisions (check cross-plan history)
8
+ get_started()
9
+ // Returns the BDI tool surface map and recommended workflows
16
10
  ```
17
11
 
18
- ## Essential Tools
12
+ ## The 15 tools
19
13
 
20
- ### Preflight: Alignment Check
21
- ```javascript
22
- check_coherence_pending()
23
- // Returns stale plans/goals that changed since last review
14
+ ### Beliefs (read state)
15
+ | Tool | When |
16
+ |---|---|
17
+ | `briefing` | Mission control loops, dashboard refresh, daily check-in |
18
+ | `task_context` | Loading context for a specific task; depth 1-4 |
19
+ | `goal_state` | Single goal deep-dive |
20
+ | `recall_knowledge` | Search facts, entities, episodes, contradictions |
21
+ | `search` | Text search across plans/nodes |
22
+ | `plan_analysis` | Impact, critical path, bottlenecks, coherence |
24
23
 
25
- run_coherence_check({ plan_id: "..." })
26
- // Evaluates quality (coverage, specificity, ordering, knowledge)
27
- // → Stamps plan as reviewed, returns score breakdown
28
- ```
29
-
30
- ### Before Starting Work
31
- ```javascript
32
- get_plan_context({ plan_id: "..." })
33
- ```
34
- Returns: plan overview, phase summaries, linked goals, knowledge
35
-
36
- ### Update Task Status
37
- ```javascript
38
- quick_status({
39
- task_id: "...",
40
- plan_id: "...",
41
- status: "in_progress" // or "completed" or "blocked"
42
- })
43
- ```
44
-
45
- ### Log Progress
46
- ```javascript
47
- quick_log({
48
- task_id: "...",
49
- plan_id: "...",
50
- message: "What I did or learned"
51
- })
52
- ```
53
-
54
- ### Check What Needs Attention
55
- ```javascript
56
- get_my_tasks({}) // Gets blocked and in-progress across all plans
57
- check_goals_health({}) // Health dashboard for all goals
58
- ```
59
-
60
- ### Claim a Task Before Working
61
- ```javascript
62
- claim_task({ task_id: "...", plan_id: "...", ttl_minutes: 30 })
63
- // When done or abandoning:
64
- release_task({ task_id: "...", plan_id: "..." })
65
- ```
66
-
67
- ## Temporal Knowledge Graph
68
-
69
- AgentPlanner includes a temporal knowledge graph for persistent, cross-plan knowledge. Five tools for reading and writing knowledge:
70
-
71
- ### add_learning - Record Knowledge
72
- Writes to the temporal knowledge graph. Use after research, decisions, and discoveries.
73
- ```javascript
74
- add_learning({
75
- content: "Detailed description of what you learned or decided", // required
76
- title: "Short title",
77
- entry_type: "decision", // decision | learning | context | constraint
78
- plan_id: "...", // optional: link to plan
79
- node_id: "..." // optional: link to task
80
- })
81
- ```
82
-
83
- ### recall_knowledge - Search Cross-Plan Knowledge
84
- Searches temporal knowledge graph across ALL plans.
85
- ```javascript
86
- recall_knowledge({
87
- query: "what auth pattern did we choose?", // required
88
- max_results: 10
89
- })
90
- ```
91
-
92
- ### find_entities - Search Entity Nodes
93
- Returns entities (technologies, people, patterns) with their relationships from the knowledge graph.
94
- ```javascript
95
- find_entities({
96
- query: "FalkorDB", // required
97
- max_results: 10
98
- })
99
- ```
100
-
101
- ### check_contradictions - Detect Outdated Facts
102
- Returns current and superseded facts. Use before making decisions to avoid acting on stale information.
103
- ```javascript
104
- check_contradictions({
105
- query: "deployment strategy", // required
106
- max_results: 10
107
- })
108
- ```
109
-
110
- ### get_recent_episodes - Temporal History
111
- Returns recent knowledge episodes in chronological order. Useful for understanding what happened recently.
112
- ```javascript
113
- get_recent_episodes({
114
- max_episodes: 10
115
- })
116
- ```
117
-
118
- ### Knowledge Entry Types
24
+ ### Desires (goals)
25
+ | Tool | When |
26
+ |---|---|
27
+ | `list_goals` | Goal list with health summary |
28
+ | `update_goal` | Atomic goal change (subsumes link/unlink/achievers) |
119
29
 
120
- | Type | When to Use |
121
- |------|-------------|
122
- | `decision` | A choice was made - capture the WHY |
123
- | `learning` | Something useful discovered |
124
- | `context` | Background info others need |
125
- | `constraint` | Rules/limitations to respect |
30
+ ### Intentions (act)
31
+ | Tool | When |
32
+ |---|---|
33
+ | `claim_next_task` | Pick + claim + load context (one call) |
34
+ | `update_task` | Atomic status+log+release+learning |
35
+ | `release_task` | Explicit handoff |
36
+ | `queue_decision` | Escalate to human |
37
+ | `resolve_decision` | Pick up human's answer |
38
+ | `add_learning` | Write to knowledge graph |
126
39
 
127
- ## Dependencies & Impact Analysis
40
+ ## Three workflow templates
128
41
 
129
- ### suggest_next_tasks - Find Ready Work
130
- Returns tasks where all upstream blockers are completed, prioritized by RPI chain position and downstream impact.
131
- ```javascript
132
- suggest_next_tasks({ plan_id: "..." })
42
+ ### A) Mission control (Cowork autopilot)
133
43
  ```
134
-
135
- ### get_task_context - Progressive Context Loading
136
- ```javascript
137
- get_task_context({
138
- node_id: "...",
139
- depth: 2, // 1=task only, 2=+siblings+deps, 3=+knowledge, 4=+plan+goals
140
- token_budget: 0 // 0=unlimited, or max tokens to stay within context window
141
- })
142
- ```
143
-
144
- ### create_dependency - Link Tasks
145
- ```javascript
146
- create_dependency({
147
- plan_id: "...",
148
- source_node_id: "...", // this node...
149
- target_node_id: "...", // ...blocks this node
150
- dependency_type: "blocks" // blocks | requires | relates_to
151
- })
152
- ```
153
-
154
- ### analyze_impact - What-If Analysis
155
- ```javascript
156
- analyze_impact({
157
- plan_id: "...",
158
- node_id: "...",
159
- scenario: "block" // delay | block | remove
160
- })
161
- ```
162
-
163
- ## RPI Chains (Research -> Plan -> Implement)
164
-
165
- For complex tasks, decompose into a 3-step chain with blocking dependencies:
166
-
167
- ```javascript
168
- create_rpi_chain({
169
- plan_id: "...",
170
- parent_id: "...", // phase to add chain under
171
- title: "Auth Service",
172
- research_description: "Research auth patterns for microservices"
173
- })
44
+ briefing → check goal_health.summary
45
+ top_recommendation? act
46
+ → at_risk goals? goal_state(goal_id), then update_task or queue_decision
47
+ → add_learning to record
174
48
  ```
175
49
 
176
- Creates 3 tasks:
177
- - **Research** (R) - Investigate, log findings
178
- - **Plan** (P) - Design approach, mark `plan_ready` for human review
179
- - **Implement** (I) - Build it (automatically gets compacted research context)
180
-
181
- Task modes: `research`, `plan`, `implement`, `free`
182
-
183
- ## Task Status Values
184
-
185
- | Status | When to Use |
186
- |--------|-------------|
187
- | `not_started` | Default - work hasn't begun |
188
- | `in_progress` | You're actively working on it |
189
- | `completed` | Done and verified |
190
- | `blocked` | Can't proceed - **always add a note explaining why** |
191
- | `plan_ready` | Plan phase complete - waiting for human review |
192
-
193
- ## Creating Plans
194
-
195
- ### Quick (Most Common)
196
- ```javascript
197
- quick_plan({
198
- title: "Plan Name",
199
- tasks: ["Task 1", "Task 2", "Task 3"]
200
- })
50
+ ### B) Single task (Claude Code, ap CLI)
201
51
  ```
202
-
203
- ### From Markdown
204
- ```javascript
205
- import_plan_markdown({
206
- markdown: `
207
- # Plan Title
208
-
209
- ## Phase 1
210
- - Task A
211
- - Task B
212
-
213
- ## Phase 2
214
- - Task C
215
- `
216
- })
52
+ claim_next_task(scope={plan_id})
53
+ update_task(status='in_progress')
54
+ ... work ...
55
+ update_task(status='completed', log_message=..., add_learning=...)
217
56
  ```
218
57
 
219
- ## Linking Plans to Goals
220
-
221
- ```javascript
222
- list_goals({})
223
- link_plan_to_goal({ goal_id: "...", plan_id: "..." })
58
+ ### C) Multi-agent (OpenClaw)
224
59
  ```
225
-
226
- ## When Stuck
227
-
228
- ```javascript
229
- quick_status({
230
- task_id: "...",
231
- plan_id: "...",
232
- status: "blocked",
233
- note: "Need X from human - waiting for access credentials"
234
- })
60
+ claim_next_task(ttl_minutes=30)
61
+ task_context(depth=4) for refreshes
62
+ update_task(...) for transitions
63
+ release_task(message='handoff') for explicit handover
235
64
  ```
236
65
 
237
- Then move to another task - a human will see the blocker.
238
-
239
- ## Autonomous Goal-Driven Loop (Quick Reference)
66
+ ## Decision rule
240
67
 
241
- For periodic/cron-driven agents, follow this 5-phase pattern:
242
-
243
- ```
244
- Phase 1: ORIENT → check_goals_health()
245
- Phase 2: PLAN → get_goal() → recall_knowledge() → quick_plan({..., goal_id})
246
- Phase 3: DECOMPOSE→ create_rpi_chain() for complex tasks
247
- Phase 4: EXECUTE → suggest_next_tasks() → claim_task() → work → quick_log() → quick_status("completed")
248
- Phase 5: REPORT → quick_log({..., log_type: "completion"})
249
- ```
68
+ When in doubt between act and queue:
69
+ - Reversible local action (status, log, learning) → **act** via `update_task` / `add_learning`
70
+ - External cost, public publish, strategy change, customer comm → **queue** via `queue_decision`
250
71
 
251
- Key rules:
252
- - **Always claim before working** — `claim_task()` prevents agent collisions
253
- - **Always link plans to goals** — enables health tracking
254
- - **Log decisions and learnings** — `add_learning()` persists cross-plan
255
- - **Check contradictions first** — `check_contradictions()` before acting on old knowledge
72
+ Never use `add_learning(entry_type='decision')` to fake a decision queue. `queue_decision` is a real tool now.
256
73
 
257
- ## Best Practices
74
+ ## Atomic patterns to remember
258
75
 
259
- 1. **Use `get_task_context` for task work, `get_plan_context` for plan overview** - progressive depth gives you exactly what you need
260
- 2. **Check dependencies before starting** - use `suggest_next_tasks` to find what's ready
261
- 3. **Log as you work** - helps humans and future agents follow
262
- 4. **Record important findings** - use `add_learning` after research, decisions, and discoveries
263
- 5. **Search before deciding** - check `recall_knowledge` for existing decisions across all plans
264
- 6. **Check for contradictions** - use `check_contradictions` before acting on remembered facts
265
- 7. **Mark blockers clearly** - use `status: "blocked"` with explanation
76
+ - `update_task` does status + log + claim release + learning in one call. Don't decompose.
77
+ - `claim_next_task` does suggest + claim + context. Don't decompose.
78
+ - `briefing` does goals + decisions + tasks + activity + recommendation. Don't decompose.
266
79
 
267
- ---
80
+ ## Output discipline
268
81
 
269
- **Remember**: AgentPlanner is your persistent memory and coordination tool. Use it to track what you're doing, remember what you learned, coordinate with humans, and help future agents understand context.
82
+ - Every response carries `as_of` surface this on live artifacts to indicate freshness.
83
+ - Every tool degrades gracefully on partial upstream failure — check `meta.failures` if present.
84
+ - Keep follow-up calls minimal — these tools are designed to bundle.