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 +58 -243
- package/SKILL.md +135 -411
- package/package.json +1 -1
- package/src/tools/bdi/_shared.js +29 -0
- package/src/tools/bdi/beliefs.js +451 -0
- package/src/tools/bdi/desires.js +163 -0
- package/src/tools/bdi/index.js +46 -0
- package/src/tools/bdi/intentions.js +619 -0
- package/src/tools/bdi/utility.js +73 -0
- package/src/tools.js +34 -2629
package/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentplanner
|
|
3
|
-
description: "Agent orchestration skill for AgentPlanner —
|
|
4
|
-
version:
|
|
3
|
+
description: "Agent orchestration skill for AgentPlanner — BDI-aligned tools for state, goals, and committed actions with human oversight"
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
homepage: https://agentplanner.io
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -13,479 +13,203 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
# AgentPlanner — LLM Skill Reference
|
|
15
15
|
|
|
16
|
-
You have access to the AgentPlanner MCP tools. AgentPlanner is a collaborative planning system where you track work, manage dependencies, and coordinate with humans. This document is your complete reference
|
|
16
|
+
You have access to the AgentPlanner MCP tools. AgentPlanner is a collaborative planning system where you track work, manage dependencies, and coordinate with humans. This document is your complete reference.
|
|
17
17
|
|
|
18
|
-
> **Prerequisite:** This skill requires the `agent-planner-mcp` MCP server to be connected.
|
|
18
|
+
> **Prerequisite:** This skill requires the `agent-planner-mcp` MCP server (v0.9.0+) to be connected. Create an API token at Settings → API Tokens on [agentplanner.io](https://agentplanner.io).
|
|
19
19
|
>
|
|
20
20
|
> **Setup by client:**
|
|
21
|
-
> - **Claude
|
|
22
|
-
> - **Claude
|
|
23
|
-
> - **Cursor / VS Code:** Add to your MCP config with
|
|
24
|
-
> - **ChatGPT:**
|
|
25
|
-
> - **Other MCP clients:** Run `npx agent-planner-mcp` in stdio mode with env vars `API_URL` and `USER_API_TOKEN`
|
|
21
|
+
> - **Claude Desktop:** Download the [.mcpb](https://github.com/TAgents/agent-planner-mcp/releases/latest), double-click to install
|
|
22
|
+
> - **Claude Code:** `npx agent-planner-mcp setup`
|
|
23
|
+
> - **Cursor / VS Code:** Add `npx agent-planner-mcp` to your MCP config with env vars `API_URL` and `USER_API_TOKEN`
|
|
24
|
+
> - **ChatGPT:** HTTP endpoint at `https://agentplanner.io/mcp`
|
|
26
25
|
|
|
27
|
-
##
|
|
26
|
+
## The 15 tools, organized by intent
|
|
28
27
|
|
|
29
|
-
-
|
|
30
|
-
- You need to break down complex work into trackable steps
|
|
31
|
-
- You need to coordinate with humans on multi-step projects
|
|
32
|
-
- You want to persist findings, decisions, or progress across sessions
|
|
33
|
-
- You are asked to plan, research, or implement something as part of a tracked workflow
|
|
34
|
-
- A user wants help defining or refining a goal
|
|
28
|
+
AgentPlanner exposes a **BDI-aligned** surface — Beliefs (state queries), Desires (goal management), Intentions (committed actions). Each tool answers one whole agentic question and returns an `as_of` ISO 8601 timestamp.
|
|
35
29
|
|
|
36
|
-
|
|
30
|
+
### Beliefs — what is the state of the world?
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
- `briefing` — bundled mission control state (goals + decisions + my tasks + activity + recommendation) in one call
|
|
33
|
+
- `task_context` — single task at progressive depth 1-4 (task only → +neighborhood → +knowledge → +extended)
|
|
34
|
+
- `goal_state` — single goal deep dive (details + quality + progress + bottlenecks + gaps)
|
|
35
|
+
- `recall_knowledge` — universal knowledge graph query (facts, entities, recent episodes, contradictions)
|
|
36
|
+
- `search` — text search across plans, nodes, content
|
|
37
|
+
- `plan_analysis` — advanced reads: impact analysis, critical path, bottlenecks, coherence
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
1. Listen to the user's intent (however vague)
|
|
42
|
-
2. recall_knowledge() → Search for related context in the knowledge graph
|
|
43
|
-
3. list_goals() → Check for overlap with existing goals
|
|
44
|
-
4. list_plans() → Find related work that might link to this goal
|
|
45
|
-
5. Propose a structured goal:
|
|
46
|
-
- Clear title
|
|
47
|
-
- Description explaining why this matters
|
|
48
|
-
- Success criteria with specific metrics + targets
|
|
49
|
-
- Linked plans (existing or suggest new ones)
|
|
50
|
-
6. create_goal() + link plans
|
|
51
|
-
7. assess_goal_quality() → Check quality and get improvement suggestions
|
|
52
|
-
8. Iterate with the user until quality is high
|
|
53
|
-
```
|
|
39
|
+
### Desires — what are we pursuing?
|
|
54
40
|
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
- **Measurable** — has success criteria with specific metrics and targets (e.g., "API latency < 100ms p99")
|
|
58
|
-
- **Actionable** — has at least one linked plan with concrete tasks
|
|
59
|
-
- **Knowledge-grounded** — related facts exist in the knowledge graph (if not, suggest researching first)
|
|
60
|
-
- **Committed** — promoted from desire to intention when ready, with a time reference
|
|
41
|
+
- `list_goals` — goals with health rollup (`{ on_track, at_risk, stale, total }`)
|
|
42
|
+
- `update_goal` — atomic goal update; subsumes link/unlink + achiever changes
|
|
61
43
|
|
|
62
|
-
|
|
44
|
+
### Intentions — what am I committing to?
|
|
63
45
|
|
|
64
|
-
|
|
46
|
+
- `claim_next_task` — pick + claim + load context in one call (cornerstone for coding agents)
|
|
47
|
+
- `update_task` — atomic state transition (status + log + claim release + optional learning)
|
|
48
|
+
- `release_task` — explicit handoff
|
|
49
|
+
- `queue_decision` — escalate to human (writes to real decisions table — do **not** misuse `add_learning` for this)
|
|
50
|
+
- `resolve_decision` — pick up after human approval/deferral
|
|
51
|
+
- `add_learning` — record a knowledge episode for future recall
|
|
65
52
|
|
|
66
|
-
|
|
53
|
+
### Utility
|
|
67
54
|
|
|
68
|
-
|
|
69
|
-
0. PREFLIGHT → check_coherence_pending to see if anything needs alignment review
|
|
70
|
-
↳ If stale plans found, run_coherence_check on each before starting task work
|
|
71
|
-
1. ORIENT → suggest_next_tasks or get_task_context to understand what needs doing
|
|
72
|
-
2. CLAIM → quick_status to mark the task in_progress
|
|
73
|
-
3. WORK → Do the actual work (code, research, analysis, etc.)
|
|
74
|
-
4. LOG → quick_log or add_log to record what you did and found
|
|
75
|
-
↳ For important findings, also use add_learning to persist to the temporal knowledge graph
|
|
76
|
-
5. COMPLETE → quick_status to mark completed (auto-unblocks downstream tasks)
|
|
77
|
-
6. NEXT → suggest_next_tasks to find the next ready task
|
|
78
|
-
```
|
|
55
|
+
- `get_started` — dynamic reference; call this if you're new to AgentPlanner
|
|
79
56
|
|
|
80
|
-
|
|
57
|
+
## Canonical workflows
|
|
81
58
|
|
|
82
|
-
|
|
59
|
+
### Mission control loop (Cowork autopilot, scheduled tasks)
|
|
83
60
|
|
|
84
61
|
```
|
|
85
|
-
|
|
86
|
-
→ Returns
|
|
87
|
-
→ If stale items found:
|
|
88
|
-
run_coherence_check({ plan_id: "<plan_id>" })
|
|
89
|
-
→ Evaluates quality (coverage, specificity, ordering, knowledge)
|
|
90
|
-
→ Stamps the plan as reviewed
|
|
91
|
-
→ Returns quality breakdown + coherence issues
|
|
92
|
-
```
|
|
62
|
+
1. briefing(scope='mission_control')
|
|
63
|
+
→ Returns goal_health.summary, pending_decisions[], my_tasks, recent_activity, top_recommendation
|
|
93
64
|
|
|
94
|
-
|
|
65
|
+
2. If top_recommendation: act on it. Otherwise iterate at_risk goals.
|
|
95
66
|
|
|
96
|
-
|
|
67
|
+
3. For each chosen goal:
|
|
68
|
+
- goal_state(goal_id) for the bottleneck details
|
|
69
|
+
- If action is reversible (logging, status update, knowledge write):
|
|
70
|
+
update_task(...) or update_goal(...)
|
|
71
|
+
- If action needs human approval (publish, payment, strategy):
|
|
72
|
+
queue_decision({ title, context, smallest_input_needed, plan_id or node_id })
|
|
97
73
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
get_task_context({ node_id: "<task_id>", depth: 2 })
|
|
74
|
+
4. add_learning(content, scope) to record what you did and why.
|
|
102
75
|
```
|
|
103
76
|
|
|
104
|
-
|
|
105
|
-
- **1** — Task only: node details + recent logs. Use when you already know the plan well.
|
|
106
|
-
- **2** — Neighborhood: adds parent, siblings, direct dependencies (upstream/downstream). **Default and recommended.**
|
|
107
|
-
- **3** — Knowledge: adds Graphiti temporal knowledge (entities, facts). Use when the task requires domain context.
|
|
108
|
-
- **4** — Extended: adds plan overview, ancestry path, linked goals, transitive dependencies. Use for first-time orientation or cross-cutting tasks.
|
|
77
|
+
### Single-task coding session (Claude Code, ap CLI)
|
|
109
78
|
|
|
110
|
-
If your context window is limited, set `token_budget` to cap the response size:
|
|
111
79
|
```
|
|
112
|
-
|
|
80
|
+
1. claim_next_task(scope={ plan_id }) → returns task with full context
|
|
81
|
+
2. update_task(task_id, status='in_progress') when work begins
|
|
82
|
+
3. ... do the work ...
|
|
83
|
+
4. update_task(task_id, status='completed', log_message='...', add_learning='key insight')
|
|
113
84
|
```
|
|
114
85
|
|
|
115
|
-
|
|
86
|
+
The `update_task` call is atomic — status change, log entry, claim release, and knowledge episode all in one round trip.
|
|
116
87
|
|
|
117
|
-
|
|
118
|
-
suggest_next_tasks({ plan_id: "<plan_id>" })
|
|
119
|
-
```
|
|
88
|
+
### Multi-agent server (OpenClaw)
|
|
120
89
|
|
|
121
|
-
Returns tasks that are **ready** — all upstream dependencies are completed. Sorted by priority:
|
|
122
|
-
1. RPI research tasks (start of a chain)
|
|
123
|
-
2. Tasks that unblock the most downstream work
|
|
124
|
-
3. Tasks by order index
|
|
125
|
-
|
|
126
|
-
Each suggestion includes a `reason` field explaining why it's recommended.
|
|
127
|
-
|
|
128
|
-
## Tool Reference
|
|
129
|
-
|
|
130
|
-
### Quick Actions (Low Friction)
|
|
131
|
-
|
|
132
|
-
| Tool | Use When |
|
|
133
|
-
|------|----------|
|
|
134
|
-
| `quick_plan` | Creating a new plan from a title + task list (provide goal_id to auto-link) |
|
|
135
|
-
| `quick_task` | Adding a single task to an existing plan |
|
|
136
|
-
| `quick_status` | Updating a task's status (the most common operation) |
|
|
137
|
-
| `quick_log` | Logging progress on a task |
|
|
138
|
-
|
|
139
|
-
### Plans
|
|
140
|
-
|
|
141
|
-
| Tool | Purpose |
|
|
142
|
-
|------|---------|
|
|
143
|
-
| `list_plans` | See all accessible plans |
|
|
144
|
-
| `create_plan` | Create a plan with full options |
|
|
145
|
-
| `update_plan` | Change plan title, description, visibility |
|
|
146
|
-
| `delete_plan` | Delete a plan |
|
|
147
|
-
| `get_plan_structure` | Get hierarchical tree (minimal fields — fast) |
|
|
148
|
-
| `get_plan_summary` | Statistics and overview |
|
|
149
|
-
| `share_plan` | Share a plan with another user |
|
|
150
|
-
|
|
151
|
-
### Nodes (Tasks, Phases, Milestones)
|
|
152
|
-
|
|
153
|
-
| Tool | Purpose |
|
|
154
|
-
|------|---------|
|
|
155
|
-
| `create_node` | Create a task, phase, or milestone |
|
|
156
|
-
| `update_node` | Change title, description, status, task_mode, etc. |
|
|
157
|
-
| `delete_node` | Delete a node and its children |
|
|
158
|
-
| `move_node` | Reparent or reorder a node |
|
|
159
|
-
| `batch_update_nodes` | Update multiple nodes at once |
|
|
160
|
-
| `get_node_ancestry` | Path from root to node |
|
|
161
|
-
|
|
162
|
-
When creating nodes:
|
|
163
|
-
- `node_type`: `phase` (group of tasks), `task` (unit of work), `milestone` (checkpoint)
|
|
164
|
-
- `task_mode`: `free` (default), `research`, `plan`, `implement` (for RPI chains)
|
|
165
|
-
- `status`: `not_started`, `in_progress`, `completed`, `blocked`, `plan_ready`
|
|
166
|
-
|
|
167
|
-
### Dependencies
|
|
168
|
-
|
|
169
|
-
| Tool | Purpose |
|
|
170
|
-
|------|---------|
|
|
171
|
-
| `create_dependency` | Create a directed edge between two nodes |
|
|
172
|
-
| `delete_dependency` | Remove a dependency edge |
|
|
173
|
-
| `list_dependencies` | List all edges in a plan |
|
|
174
|
-
| `get_node_dependencies` | Get upstream/downstream/both for a node |
|
|
175
|
-
| `analyze_impact` | What happens if a node is delayed/blocked/removed |
|
|
176
|
-
| `get_critical_path` | Longest blocking chain through incomplete tasks |
|
|
177
|
-
|
|
178
|
-
Dependency types:
|
|
179
|
-
- `blocks` — Source must complete before target can start (hard constraint)
|
|
180
|
-
- `requires` — Target needs output from source (softer)
|
|
181
|
-
- `relates_to` — Informational link, no execution constraint
|
|
182
|
-
|
|
183
|
-
Example — "Design API" blocks "Implement API":
|
|
184
90
|
```
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
dependency_type: "blocks"
|
|
190
|
-
})
|
|
91
|
+
1. claim_next_task(scope={ plan_id }, ttl_minutes=30) → exclusive ownership
|
|
92
|
+
2. task_context(task_id, depth=4) periodically to refresh as work progresses
|
|
93
|
+
3. update_task(...) for state transitions
|
|
94
|
+
4. release_task(task_id, message='handoff to teammate') for explicit handoff
|
|
191
95
|
```
|
|
192
96
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
### Context & Analysis
|
|
196
|
-
|
|
197
|
-
| Tool | Purpose |
|
|
198
|
-
|------|---------|
|
|
199
|
-
| `get_task_context` | **Primary.** Progressive context at depth 1-4 with token budgeting |
|
|
200
|
-
| `get_plan_context` | Plan overview with phase summaries and knowledge |
|
|
201
|
-
| `suggest_next_tasks` | Find ready tasks based on dependency analysis |
|
|
202
|
-
|
|
203
|
-
### Logging
|
|
204
|
-
|
|
205
|
-
| Tool | Purpose |
|
|
206
|
-
|------|---------|
|
|
207
|
-
| `add_log` | Add a structured log entry to a node |
|
|
208
|
-
| `get_logs` | Retrieve log entries for a node |
|
|
209
|
-
|
|
210
|
-
Log types and when to use them:
|
|
211
|
-
- `progress` — Status updates, milestones reached
|
|
212
|
-
- `reasoning` — Analysis, findings, thought process (high value for downstream tasks)
|
|
213
|
-
- `decision` — Choices made and why (highest value — persists through compaction)
|
|
214
|
-
- `challenge` — Obstacles encountered, workarounds found
|
|
215
|
-
- `comment` — General notes
|
|
216
|
-
|
|
217
|
-
For research and plan tasks, use `reasoning` and `decision` log types — these are preserved when research output is compacted for downstream implement tasks.
|
|
218
|
-
|
|
219
|
-
### Goals
|
|
220
|
-
|
|
221
|
-
| Tool | Purpose |
|
|
222
|
-
|------|---------|
|
|
223
|
-
| `check_goals_health` | Dashboard of all goals with health status, bottlenecks, and gaps |
|
|
224
|
-
| `list_goals` | See all goals |
|
|
225
|
-
| `create_goal` | Create a goal |
|
|
226
|
-
| `update_goal` | Update goal details |
|
|
227
|
-
| `get_goal` | Get goal with linked plans |
|
|
228
|
-
| `link_plan_to_goal` | Connect a plan to a goal |
|
|
229
|
-
| `unlink_plan_from_goal` | Disconnect a plan from a goal |
|
|
230
|
-
| `goal_path` | Full dependency path to a goal — all tasks that contribute (direct achievers + upstream blockers) |
|
|
231
|
-
| `goal_progress` | Completion percentage calculated from the goal's dependency graph |
|
|
232
|
-
| `goal_knowledge_gaps` | Detect tasks on the goal path that lack knowledge — identifies where research is needed |
|
|
233
|
-
| `add_achiever` | Link a task to a goal via an "achieves" edge (declares this task contributes to the goal) |
|
|
234
|
-
| `remove_achiever` | Remove an achieves edge between a task and a goal |
|
|
235
|
-
|
|
236
|
-
Goal-task linking creates a dependency graph from tasks up to goals. Use `add_achiever` to declare which tasks contribute to a goal, then `goal_path` and `goal_progress` to track completion through the full dependency chain. `goal_knowledge_gaps` checks which tasks on the path lack relevant knowledge in the temporal graph — useful for identifying where research is needed before implementation.
|
|
237
|
-
|
|
238
|
-
### Cross-Plan Dependencies
|
|
239
|
-
|
|
240
|
-
| Tool | Purpose |
|
|
241
|
-
|------|---------|
|
|
242
|
-
| `create_cross_plan_dependency` | Create a dependency edge between nodes in different plans |
|
|
243
|
-
| `list_cross_plan_dependencies` | List all edges that cross plan boundaries between specified plans |
|
|
244
|
-
| `create_external_dependency` | Create an external blocker (vendor API, legal approval, etc.) that optionally blocks a task |
|
|
245
|
-
|
|
246
|
-
Cross-plan dependencies work the same as regular dependencies (`blocks`, `requires`, `relates_to`) but connect nodes across plans. External dependencies represent blockers outside the system.
|
|
247
|
-
|
|
248
|
-
### Task Claiming
|
|
249
|
-
|
|
250
|
-
| Tool | Purpose |
|
|
251
|
-
|------|---------|
|
|
252
|
-
| `claim_task` | Claim exclusive ownership of a task (prevents agent collisions) |
|
|
253
|
-
| `release_task` | Release a previously claimed task |
|
|
254
|
-
|
|
255
|
-
### Alignment & Review
|
|
256
|
-
|
|
257
|
-
Check if goals, plans, and knowledge are aligned. Run as a preflight check before starting work.
|
|
258
|
-
|
|
259
|
-
| Tool | Purpose |
|
|
260
|
-
|------|---------|
|
|
261
|
-
| `check_coherence_pending` | See what needs review — returns stale plans/goals that changed since last check |
|
|
262
|
-
| `run_coherence_check` | Evaluate a plan's quality (coverage, specificity, ordering, knowledge) and stamp as reviewed |
|
|
263
|
-
| `assess_goal_quality` | Check how well-defined a goal is (clarity, measurability, actionability, knowledge, commitment) |
|
|
264
|
-
|
|
265
|
-
### Knowledge (Temporal Knowledge Graph)
|
|
266
|
-
|
|
267
|
-
All knowledge is stored in the Graphiti temporal knowledge graph, which automatically extracts entities and relationships and enables cross-plan knowledge retrieval. The temporal graph is **cross-plan** and **persists across sessions** — anything recorded is available to all future agents and conversations within the organization.
|
|
268
|
-
|
|
269
|
-
| Tool | Purpose |
|
|
270
|
-
|------|---------|
|
|
271
|
-
| `add_learning` | Record knowledge to the temporal graph with automatic entity extraction |
|
|
272
|
-
| `recall_knowledge` | Search the temporal knowledge graph across ALL plans in the org |
|
|
273
|
-
| `find_entities` | Search for entities (technologies, people, patterns, etc.) |
|
|
274
|
-
| `check_contradictions` | Check if knowledge about a topic has changed; returns current and superseded (outdated) facts |
|
|
275
|
-
| `get_recent_episodes` | Get recent knowledge episodes from the temporal graph (work session history) |
|
|
276
|
-
|
|
277
|
-
`add_learning` params:
|
|
278
|
-
- `content` (required) — The knowledge to record
|
|
279
|
-
- `title` — Short title for the entry
|
|
280
|
-
- `entry_type` — `decision`, `learning`, `context`, or `constraint`
|
|
281
|
-
- `plan_id` — Associate with a specific plan
|
|
282
|
-
- `node_id` — Associate with a specific node
|
|
283
|
-
|
|
284
|
-
`recall_knowledge` params:
|
|
285
|
-
- `query` (required) — Natural language search query
|
|
286
|
-
- `max_results` — Number of results (default 10)
|
|
287
|
-
|
|
288
|
-
`find_entities` params:
|
|
289
|
-
- `query` (required) — Entity name or description to search for
|
|
290
|
-
- `max_results` — Number of results (default 10)
|
|
291
|
-
|
|
292
|
-
`check_contradictions` params:
|
|
293
|
-
- `query` (required) — Topic to check for contradictions
|
|
294
|
-
- `max_results` — Number of results (default 10)
|
|
295
|
-
|
|
296
|
-
Use `check_contradictions` before making decisions based on past knowledge. It returns two sets of facts: **current** (valid) and **superseded** (outdated). If superseded facts exist, review them — the situation may have changed since you last encountered this topic.
|
|
97
|
+
### Peeking before claiming (v0.9.1+)
|
|
297
98
|
|
|
298
|
-
`
|
|
299
|
-
- `max_episodes` — Maximum episodes to return (default 20)
|
|
99
|
+
Pass `dry_run: true` to `claim_next_task` to see the candidate without claiming. Useful when an agent wants to inspect the next task and decide whether to take it, without leaving a phantom claim if it bails.
|
|
300
100
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
| `list_organizations` | List your organizations |
|
|
308
|
-
| `get_organization` | Organization details |
|
|
309
|
-
| `create_organization` | Create an org |
|
|
310
|
-
| `update_organization` | Update org details |
|
|
311
|
-
|
|
312
|
-
### Orientation
|
|
313
|
-
|
|
314
|
-
| Tool | Purpose |
|
|
315
|
-
|------|---------|
|
|
316
|
-
| `get_started` | Guidance on how to use AgentPlanner — call when new or unsure how to approach a task |
|
|
317
|
-
|
|
318
|
-
`get_started` accepts an optional `topic`: `overview`, `planning`, `execution`, `knowledge`, or `collaboration`.
|
|
319
|
-
|
|
320
|
-
To understand a plan before starting, use `get_plan_context({ plan_id })` for the overview, then `get_task_context({ node_id, depth: 4 })` for deep context on a specific task.
|
|
321
|
-
|
|
322
|
-
### Other
|
|
323
|
-
|
|
324
|
-
| Tool | Purpose |
|
|
325
|
-
|------|---------|
|
|
326
|
-
| `search` | Global search across plans and nodes |
|
|
327
|
-
| `get_my_tasks` | Tasks assigned to you across all plans |
|
|
328
|
-
| `import_plan_markdown` | Create a plan from markdown |
|
|
329
|
-
| `export_plan_markdown` | Export a plan as markdown |
|
|
101
|
+
```
|
|
102
|
+
claim_next_task({ scope: { plan_id }, dry_run: true })
|
|
103
|
+
// → returns { candidate, source, claim: null, dry_run: true }
|
|
104
|
+
// Then claim for real:
|
|
105
|
+
claim_next_task({ scope: { plan_id } }) // dry_run defaults to false
|
|
106
|
+
```
|
|
330
107
|
|
|
331
|
-
|
|
108
|
+
### Proposing subtasks for human approval (v0.9.1+)
|
|
332
109
|
|
|
333
|
-
|
|
110
|
+
Agents can't create plan structure directly — that's the human's job. But agents *can* propose subtasks via `queue_decision` and have them materialize on approval. This preserves the "agents drive execution, humans steer structure" boundary while removing the manual follow-through tax.
|
|
334
111
|
|
|
335
112
|
```
|
|
336
|
-
|
|
337
|
-
plan_id:
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
113
|
+
queue_decision({
|
|
114
|
+
plan_id: '<plan>',
|
|
115
|
+
title: 'Approve adding 3 launch tasks?',
|
|
116
|
+
context: 'Found gap in launch goal — no Product Hunt subtasks exist yet',
|
|
117
|
+
smallest_input_needed: 'approve|defer|reject',
|
|
118
|
+
proposed_subtasks: [
|
|
119
|
+
{ parent_id: '<phase-id>', title: 'Draft PH listing copy', node_type: 'task' },
|
|
120
|
+
{ parent_id: '<phase-id>', title: 'Set up PH preview', node_type: 'task' },
|
|
121
|
+
{ parent_id: '<phase-id>', title: 'Schedule launch day', node_type: 'task' }
|
|
122
|
+
]
|
|
341
123
|
})
|
|
124
|
+
// On resolve_decision({ action: 'approve' }), the 3 tasks are atomically created
|
|
125
|
+
// and their IDs returned in created_subtasks[]. Defer/reject does nothing.
|
|
342
126
|
```
|
|
343
127
|
|
|
344
|
-
|
|
128
|
+
## Goal coaching
|
|
129
|
+
|
|
130
|
+
When a user expresses intent — "I want to launch a feature", "we need better testing" — coach them into a structured goal before creating it.
|
|
345
131
|
|
|
346
132
|
```
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
▼
|
|
351
|
-
Plan (task_mode=plan)
|
|
352
|
-
│ Gets compacted research automatically.
|
|
353
|
-
│ Design the solution. Mark plan_ready for human review.
|
|
354
|
-
▼ Human approves → mark completed.
|
|
355
|
-
Implement (task_mode=implement)
|
|
356
|
-
│ Gets compacted research + plan context automatically.
|
|
357
|
-
│ Build the solution.
|
|
358
|
-
▼ Mark completed when done.
|
|
359
|
-
```
|
|
133
|
+
1. Ask 2-3 sharp questions to clarify success criteria
|
|
134
|
+
2. list_goals to check if a similar goal already exists
|
|
135
|
+
3. Use update_goal({ add_linked_plans, add_achievers }) to wire it up
|
|
360
136
|
|
|
361
|
-
|
|
362
|
-
-
|
|
363
|
-
-
|
|
137
|
+
Goal types:
|
|
138
|
+
- desire — aspirational, no firm deadline
|
|
139
|
+
- intention — promoted from desire when execution begins
|
|
140
|
+
```
|
|
364
141
|
|
|
365
|
-
|
|
142
|
+
Promote desire → intention via `update_goal({ promote_to_intention: true })`.
|
|
366
143
|
|
|
367
|
-
|
|
368
|
-
|--------|---------|-------------|
|
|
369
|
-
| `not_started` | No work begun | Default. Also set automatically when all blockers complete. |
|
|
370
|
-
| `in_progress` | Actively being worked on | When you start working on a task. |
|
|
371
|
-
| `completed` | Done and verified | When the work is finished. Triggers auto-unblock of downstream tasks. |
|
|
372
|
-
| `blocked` | Cannot proceed | When waiting on a dependency, decision, or external input. Always log the reason. |
|
|
373
|
-
| `plan_ready` | Awaiting human review | When a plan/research task is done and needs human approval before the next step. |
|
|
144
|
+
## Decision queueing
|
|
374
145
|
|
|
375
|
-
|
|
146
|
+
When you need human input, **always** use `queue_decision`. Never write decisions as knowledge episodes via `add_learning(entry_type='decision')` — that pattern was a workaround and is no longer needed.
|
|
376
147
|
|
|
377
|
-
### Starting a New Session
|
|
378
148
|
```
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
149
|
+
queue_decision({
|
|
150
|
+
plan_id: "<plan>",
|
|
151
|
+
node_id: "<task>" (optional),
|
|
152
|
+
title: "Approve npm publish v0.9.0?",
|
|
153
|
+
context: "Build is green, .mcpb tested in Claude Desktop, migration written. Risk: breaking change for any direct users.",
|
|
154
|
+
options: [
|
|
155
|
+
{ label: "approve", description: "Publish now" },
|
|
156
|
+
{ label: "defer", description: "Wait for QA round" }
|
|
157
|
+
],
|
|
158
|
+
recommendation: "approve — small user base, MIGRATION_v0.9.md covers the diff",
|
|
159
|
+
smallest_input_needed: "approve|defer",
|
|
160
|
+
urgency: "normal"
|
|
161
|
+
})
|
|
384
162
|
```
|
|
385
163
|
|
|
386
|
-
|
|
387
|
-
```
|
|
388
|
-
1. Identify the task is too complex for one pass
|
|
389
|
-
2. create_rpi_chain to decompose it
|
|
390
|
-
3. Start with the Research task
|
|
391
|
-
4. Log findings as reasoning/decision entries
|
|
392
|
-
5. Let the chain guide you through plan → implement
|
|
393
|
-
```
|
|
164
|
+
The decision shows up in Cowork briefings, autopilot loops, and the AgentPlanner UI for the human. Resolve via `resolve_decision({ decision_id, action: 'approve'|'defer'|'reject' })`.
|
|
394
165
|
|
|
395
|
-
|
|
396
|
-
```
|
|
397
|
-
1. quick_status({ task_id: "...", status: "blocked" })
|
|
398
|
-
2. add_log({ node_id: "...", content: "Blocked on: <reason>", log_type: "challenge" })
|
|
399
|
-
3. suggest_next_tasks({ plan_id: "..." }) → find another task to work on
|
|
400
|
-
```
|
|
166
|
+
## Knowledge: write decisions, recall context
|
|
401
167
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
add_learning({ content: "Found that X works best because Y", title: "...", entry_type: "learning", plan_id: "..." })
|
|
407
|
-
3. This makes the knowledge discoverable across ALL plans and future sessions via recall_knowledge
|
|
408
|
-
4. Always use add_learning for findings you'd want to remember next session — the temporal graph is cross-plan and persistent
|
|
409
|
-
```
|
|
168
|
+
Use `add_learning` to record:
|
|
169
|
+
- A decision and its reasoning
|
|
170
|
+
- A discovered constraint or pattern
|
|
171
|
+
- Important context for future sessions
|
|
410
172
|
|
|
411
|
-
### Before Making an Important Decision
|
|
412
173
|
```
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
174
|
+
add_learning({
|
|
175
|
+
content: "Switched to Neo4j Community from FalkorDB because SSPL conflicts with our SaaS license model.",
|
|
176
|
+
scope: { plan_id: "<plan>" },
|
|
177
|
+
entry_type: "decision"
|
|
178
|
+
})
|
|
418
179
|
```
|
|
419
180
|
|
|
420
|
-
|
|
421
|
-
```
|
|
422
|
-
1. get_plan_structure({ plan_id: "..." }) → hierarchical tree (minimal, fast)
|
|
423
|
-
2. get_plan_summary({ plan_id: "..." }) → statistics and phase progress
|
|
424
|
-
3. get_task_context({ node_id: "...", depth: 4 }) → deep context for a specific task
|
|
425
|
-
```
|
|
181
|
+
Use `recall_knowledge` before making decisions to check cross-plan history:
|
|
426
182
|
|
|
427
|
-
### Impact Analysis Before Changes
|
|
428
183
|
```
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
184
|
+
recall_knowledge({
|
|
185
|
+
query: "knowledge graph backend choice",
|
|
186
|
+
result_kind: "all",
|
|
187
|
+
include_contradictions: true
|
|
188
|
+
})
|
|
433
189
|
```
|
|
434
190
|
|
|
435
|
-
|
|
191
|
+
`result_kind` options: `'facts'`, `'entities'`, `'episodes'`, `'all'`. Default is `'all'` — narrow it to control payload size.
|
|
436
192
|
|
|
437
|
-
|
|
193
|
+
## Migrating from v0.8.x
|
|
438
194
|
|
|
439
|
-
|
|
440
|
-
```
|
|
441
|
-
check_goals_health()
|
|
442
|
-
```
|
|
443
|
-
Identify which goals are stale, at risk, or need attention. Prioritize goals by health status: stale first, then at_risk, then on_track.
|
|
195
|
+
v0.9.0 is a breaking release. The old 63-tool surface is gone. See [MIGRATION_v0.9.md](docs/MIGRATION_v0.9.md) for the full mapping. Highlights:
|
|
444
196
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
```
|
|
197
|
+
- `check_goals_health` + `get_my_tasks` + `get_recent_episodes` + `check_coherence_pending` → `briefing`
|
|
198
|
+
- `quick_status` + `add_log` + `release_task` → `update_task`
|
|
199
|
+
- `suggest_next_tasks` + `claim_task` + `get_task_context` → `claim_next_task`
|
|
200
|
+
- `add_learning(entry_type='decision')` → `queue_decision` (real decision queue, not knowledge graph)
|
|
201
|
+
- `get_goal` + `goal_path` + `goal_progress` + `assess_goal_quality` → `goal_state`
|
|
202
|
+
- `recall_knowledge` + `find_entities` + `get_recent_episodes` + `check_contradictions` → `recall_knowledge`
|
|
452
203
|
|
|
453
|
-
|
|
454
|
-
For complex tasks, use RPI chains:
|
|
455
|
-
```
|
|
456
|
-
create_rpi_chain({plan_id, parent_id, topic}) # Research → Plan → Implement
|
|
457
|
-
```
|
|
204
|
+
CRUD-shaped admin tools (`create_node`, `update_plan`, `delete_*`) are removed in v0.9.0. They return as `ap_admin_*` namespace in v1.0.0. Use the AgentPlanner REST API directly if you need them now.
|
|
458
205
|
|
|
459
|
-
|
|
460
|
-
```
|
|
461
|
-
suggest_next_tasks({plan_id}) # What's unblocked?
|
|
462
|
-
claim_task({task_id, plan_id}) # Claim exclusive ownership
|
|
463
|
-
get_task_context({node_id, depth: 3}) # Load context
|
|
464
|
-
# ... do the work ...
|
|
465
|
-
quick_log({task_id, plan_id, message}) # Document progress
|
|
466
|
-
add_learning({content, plan_id}) # Capture knowledge
|
|
467
|
-
quick_status({task_id, plan_id, status: "completed"}) # Triggers propagation
|
|
468
|
-
```
|
|
206
|
+
## Principles
|
|
469
207
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
208
|
+
- Tools are intent-shaped, not CRUD-shaped — name what you want to accomplish, not which row to mutate
|
|
209
|
+
- Reads are bundled — minimize round trips, especially for refresh-loops
|
|
210
|
+
- Writes are atomic where possible — `update_task` does status + log + release + learning in one call
|
|
211
|
+
- `as_of` on every response — use for stale-data warnings on live artifacts
|
|
212
|
+
- Decisions are first-class — never fake them via the knowledge graph
|
|
213
|
+
- Knowledge persists across plans and sessions — write learnings, recall liberally
|
|
474
214
|
|
|
475
|
-
|
|
476
|
-
- **Always claim before working** — prevents collisions with other agents
|
|
477
|
-
- **Always link plans to goals** — enables health tracking and progress reporting
|
|
478
|
-
- **Log decisions and learnings** — future agents and humans need your reasoning
|
|
479
|
-
- **Check for contradictions** — `check_contradictions()` before acting on old knowledge
|
|
480
|
-
- **Let propagation work** — completing blockers auto-unblocks downstream tasks
|
|
481
|
-
|
|
482
|
-
## Rules
|
|
483
|
-
|
|
484
|
-
1. **Always load context before working** — never guess what a task requires.
|
|
485
|
-
2. **Log as you work** — not just at the end. Frequent logs help humans and future agents.
|
|
486
|
-
3. **Use `decision` log type for important choices** — these survive research compaction.
|
|
487
|
-
4. **Check dependencies** — don't start a task if its blockers aren't completed. Use `suggest_next_tasks`.
|
|
488
|
-
5. **Mark status transitions promptly** — `in_progress` when starting, `completed` when done, `blocked` when stuck.
|
|
489
|
-
6. **Search knowledge before deciding** — use `recall_knowledge` to check the temporal graph and `check_contradictions` to verify nothing is outdated. Prior decisions may already exist across other plans.
|
|
490
|
-
7. **Use RPI for complex work** — if you're uncertain about the approach, decompose first.
|
|
491
|
-
8. **Don't modify tasks you haven't claimed** — mark `in_progress` before making changes.
|
|
215
|
+
Call `get_started` from any AgentPlanner-aware agent for an up-to-date reference.
|
package/package.json
CHANGED