agent-planner-mcp 0.5.0 → 0.6.0
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 +257 -0
- package/README.md +128 -286
- package/SKILL.md +434 -0
- package/package.json +17 -6
- package/src/api-client.js +298 -66
- package/src/index.js +3 -2
- package/src/server-http.js +73 -14
- package/src/session-manager.js +22 -0
- package/src/setup.js +1 -1
- package/src/tools.js +636 -440
- package/claude-code/AUTONOMOUS_EXECUTION_GUIDE.md +0 -335
- package/claude-code/commands/README.md +0 -112
- package/claude-code/commands/create-plan.md +0 -174
- package/claude-code/commands/execute-plan.md +0 -202
- package/claude-code/commands/plan-status.md +0 -145
- package/claude-code/settings.template.json +0 -12
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
# Execute Plan - Autonomous Task Orchestrator
|
|
2
|
-
|
|
3
|
-
You are an autonomous plan execution orchestrator. Your mission is to execute tasks from a plan stored in the MCP planning system, working through them methodically until completion.
|
|
4
|
-
|
|
5
|
-
## Step 1: Identify the Plan
|
|
6
|
-
|
|
7
|
-
**If user provided a plan ID**: Use it directly
|
|
8
|
-
**If no plan ID provided**:
|
|
9
|
-
- Use `mcp__planning-system__list_plans` with filter `status: "active"` to show available plans
|
|
10
|
-
- Ask user which plan to execute
|
|
11
|
-
|
|
12
|
-
## Step 2: Load Plan Structure
|
|
13
|
-
|
|
14
|
-
Use `mcp__planning-system__get_plan_structure` with the plan_id to get the full hierarchy.
|
|
15
|
-
|
|
16
|
-
Analyze the structure:
|
|
17
|
-
- Identify all nodes with `node_type: "task"`
|
|
18
|
-
- Note their current status: `not_started`, `in_progress`, `completed`, `blocked`
|
|
19
|
-
- Check parent relationships (phases → tasks)
|
|
20
|
-
- Review `acceptance_criteria` and `agent_instructions` for each task
|
|
21
|
-
|
|
22
|
-
## Step 3: Execute Tasks Sequentially
|
|
23
|
-
|
|
24
|
-
For each task with status `not_started` or `in_progress`:
|
|
25
|
-
|
|
26
|
-
### 3.1 Prepare Task Context
|
|
27
|
-
```
|
|
28
|
-
Use mcp__planning-system__get_node_context with:
|
|
29
|
-
- plan_id
|
|
30
|
-
- node_id (of the task)
|
|
31
|
-
|
|
32
|
-
This gives you:
|
|
33
|
-
- Full task details
|
|
34
|
-
- Parent nodes (phase context)
|
|
35
|
-
- Existing logs
|
|
36
|
-
- Artifacts
|
|
37
|
-
- Child nodes if any
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### 3.2 Update Status to In Progress
|
|
41
|
-
```
|
|
42
|
-
Use mcp__planning-system__update_node:
|
|
43
|
-
- plan_id
|
|
44
|
-
- node_id
|
|
45
|
-
- status: "in_progress"
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### 3.3 Execute Task Using Task Tool Agent
|
|
49
|
-
Launch a Task tool with:
|
|
50
|
-
- `subagent_type: "general-purpose"`
|
|
51
|
-
- `description: "<5 word summary of task>"`
|
|
52
|
-
- `prompt: "...detailed prompt below..."`
|
|
53
|
-
|
|
54
|
-
**Prompt Template**:
|
|
55
|
-
```
|
|
56
|
-
You are executing a task from a development plan. Complete it fully and autonomously.
|
|
57
|
-
|
|
58
|
-
## Task Details
|
|
59
|
-
|
|
60
|
-
**Title**: {task.title}
|
|
61
|
-
|
|
62
|
-
**Description**: {task.description}
|
|
63
|
-
|
|
64
|
-
**Status**: {task.status}
|
|
65
|
-
|
|
66
|
-
**Acceptance Criteria**:
|
|
67
|
-
{task.acceptance_criteria}
|
|
68
|
-
|
|
69
|
-
**Agent Instructions**:
|
|
70
|
-
{task.agent_instructions}
|
|
71
|
-
|
|
72
|
-
## Context from Plan
|
|
73
|
-
|
|
74
|
-
**Plan**: {plan.title}
|
|
75
|
-
**Phase**: {parent_node.title if exists}
|
|
76
|
-
|
|
77
|
-
**Previous Logs**:
|
|
78
|
-
{logs from get_node_context}
|
|
79
|
-
|
|
80
|
-
**Related Artifacts**:
|
|
81
|
-
{artifacts from get_node_context}
|
|
82
|
-
|
|
83
|
-
## Project Context
|
|
84
|
-
|
|
85
|
-
This is the Talking Agents planning system. See CLAUDE.md for architecture:
|
|
86
|
-
- Multi-repo structure (agent-planner backend, agent-planner-ui frontend, agent-planner-mcp)
|
|
87
|
-
- Backend: Node.js + Express + Supabase + PostgreSQL
|
|
88
|
-
- Frontend: React + TypeScript + Tailwind CSS
|
|
89
|
-
- Testing: Jest + Supertest for backend, React Testing Library for frontend
|
|
90
|
-
|
|
91
|
-
## Your Mission
|
|
92
|
-
|
|
93
|
-
1. **Read relevant code** to understand current implementation
|
|
94
|
-
2. **Implement the task** following project conventions
|
|
95
|
-
3. **Test your implementation** (run tests if applicable)
|
|
96
|
-
4. **Verify acceptance criteria** are met
|
|
97
|
-
5. **Report back** with:
|
|
98
|
-
- Summary of what you did
|
|
99
|
-
- Files created/modified
|
|
100
|
-
- Test results
|
|
101
|
-
- Any issues or blockers encountered
|
|
102
|
-
- Confirmation that acceptance criteria are met (or what's missing)
|
|
103
|
-
|
|
104
|
-
## Important Notes
|
|
105
|
-
|
|
106
|
-
- Follow existing patterns in the codebase
|
|
107
|
-
- Run tests after making changes
|
|
108
|
-
- Don't skip error handling or validation
|
|
109
|
-
- Update documentation if needed
|
|
110
|
-
- If blocked, explain why clearly
|
|
111
|
-
|
|
112
|
-
Execute this task completely and thoroughly. Report back when done.
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### 3.4 Process Agent Response
|
|
116
|
-
|
|
117
|
-
After the Task agent completes:
|
|
118
|
-
|
|
119
|
-
**If successful**:
|
|
120
|
-
1. Update node status to "completed":
|
|
121
|
-
```
|
|
122
|
-
mcp__planning-system__update_node with status: "completed"
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
2. Add success log:
|
|
126
|
-
```
|
|
127
|
-
mcp__planning-system__add_log with:
|
|
128
|
-
- plan_id
|
|
129
|
-
- node_id
|
|
130
|
-
- log_type: "progress"
|
|
131
|
-
- content: "<summary of what was done>"
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
3. Show user a brief summary
|
|
135
|
-
|
|
136
|
-
**If blocked/failed**:
|
|
137
|
-
1. Update node status to "blocked":
|
|
138
|
-
```
|
|
139
|
-
mcp__planning-system__update_node with status: "blocked"
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
2. Add challenge log:
|
|
143
|
-
```
|
|
144
|
-
mcp__planning-system__add_log with:
|
|
145
|
-
- plan_id
|
|
146
|
-
- node_id
|
|
147
|
-
- log_type: "challenge"
|
|
148
|
-
- content: "<description of blocker>"
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
3. Ask user for guidance:
|
|
152
|
-
- What went wrong
|
|
153
|
-
- How to proceed
|
|
154
|
-
- Should we skip this task or try again?
|
|
155
|
-
|
|
156
|
-
## Step 4: Continue or Finish
|
|
157
|
-
|
|
158
|
-
After each task:
|
|
159
|
-
- Check if there are more tasks with status `not_started`
|
|
160
|
-
- If yes: Repeat Step 3 for next task
|
|
161
|
-
- If no: Proceed to Step 5
|
|
162
|
-
|
|
163
|
-
## Step 5: Final Summary
|
|
164
|
-
|
|
165
|
-
Use `mcp__planning-system__get_plan_summary` to get statistics and show user:
|
|
166
|
-
- Total tasks completed
|
|
167
|
-
- Any tasks still blocked or pending
|
|
168
|
-
- Overall plan status
|
|
169
|
-
- Suggest next actions (e.g., "Plan complete! Ready to deploy?" or "3 tasks remaining, continue?")
|
|
170
|
-
|
|
171
|
-
## Error Handling
|
|
172
|
-
|
|
173
|
-
- **If a task agent fails**: Mark task as blocked, log the issue, ask user for help
|
|
174
|
-
- **If MCP tools fail**: Report error to user immediately
|
|
175
|
-
- **If you're unsure about a task**: Ask user for clarification before executing
|
|
176
|
-
|
|
177
|
-
## Execution Guidelines
|
|
178
|
-
|
|
179
|
-
1. **Work methodically**: One task at a time, no skipping
|
|
180
|
-
2. **Respect dependencies**: If a task depends on another being completed first, follow the order
|
|
181
|
-
3. **Be thorough**: Don't mark tasks complete unless acceptance criteria are truly met
|
|
182
|
-
4. **Communicate clearly**: Keep user informed after each task
|
|
183
|
-
5. **Stay autonomous**: Try to solve problems yourself before asking for help
|
|
184
|
-
6. **Use project knowledge**: Refer to CLAUDE.md for patterns and commands
|
|
185
|
-
|
|
186
|
-
## Special Cases
|
|
187
|
-
|
|
188
|
-
**Backend tasks**:
|
|
189
|
-
- Run `npm run db:init` after creating migrations
|
|
190
|
-
- Run `npm test` or specific test suites
|
|
191
|
-
- Update API docs with `npm run docs:all`
|
|
192
|
-
|
|
193
|
-
**Frontend tasks**:
|
|
194
|
-
- Check TypeScript compilation
|
|
195
|
-
- Run frontend tests
|
|
196
|
-
- Verify component renders correctly
|
|
197
|
-
|
|
198
|
-
**Testing tasks**:
|
|
199
|
-
- Run specific test suite to verify
|
|
200
|
-
- Check coverage if needed
|
|
201
|
-
|
|
202
|
-
Now begin execution!
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# Plan Status - Monitor Plan Progress
|
|
2
|
-
|
|
3
|
-
You are a plan status reporter. Show the user the current state of a plan from the MCP planning system.
|
|
4
|
-
|
|
5
|
-
## Step 1: Identify the Plan
|
|
6
|
-
|
|
7
|
-
**If user provided a plan ID**: Use it directly
|
|
8
|
-
**If no plan ID provided**:
|
|
9
|
-
- Use `mcp__planning-system__list_plans` to show all plans
|
|
10
|
-
- Ask user which plan they want to check
|
|
11
|
-
|
|
12
|
-
## Step 2: Get Plan Summary
|
|
13
|
-
|
|
14
|
-
Use `mcp__planning-system__get_plan_summary` with the plan_id.
|
|
15
|
-
|
|
16
|
-
This returns comprehensive statistics and metadata about the plan.
|
|
17
|
-
|
|
18
|
-
## Step 3: Get Detailed Structure
|
|
19
|
-
|
|
20
|
-
Use `mcp__planning-system__get_plan_structure` with:
|
|
21
|
-
- `plan_id`
|
|
22
|
-
- `include_details: true`
|
|
23
|
-
|
|
24
|
-
This gives you the full hierarchy with all node details.
|
|
25
|
-
|
|
26
|
-
## Step 4: Present Status Report
|
|
27
|
-
|
|
28
|
-
Format the information in a clear, scannable way:
|
|
29
|
-
|
|
30
|
-
```markdown
|
|
31
|
-
# Plan Status Report
|
|
32
|
-
|
|
33
|
-
## 📋 Plan: {plan.title}
|
|
34
|
-
|
|
35
|
-
**Status**: {plan.status} (draft/active/completed/archived)
|
|
36
|
-
**Created**: {plan.created_at}
|
|
37
|
-
**Last Updated**: {plan.updated_at}
|
|
38
|
-
|
|
39
|
-
**Description**: {plan.description}
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## 📊 Progress Summary
|
|
44
|
-
|
|
45
|
-
**Total Nodes**: {summary.total_nodes}
|
|
46
|
-
- Phases: {count phases}
|
|
47
|
-
- Tasks: {count tasks}
|
|
48
|
-
- Milestones: {count milestones}
|
|
49
|
-
|
|
50
|
-
**Task Status**:
|
|
51
|
-
- ✅ Completed: {count completed} ({percentage}%)
|
|
52
|
-
- 🔄 In Progress: {count in_progress}
|
|
53
|
-
- 📋 Not Started: {count not_started}
|
|
54
|
-
- 🚫 Blocked: {count blocked}
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## 📝 Detailed Breakdown
|
|
59
|
-
|
|
60
|
-
### Phase: {phase.title}
|
|
61
|
-
|
|
62
|
-
**Status**: {phase.status}
|
|
63
|
-
|
|
64
|
-
Tasks:
|
|
65
|
-
1. ✅ {task.title} - Completed
|
|
66
|
-
2. 🔄 {task.title} - In Progress
|
|
67
|
-
3. 📋 {task.title} - Not Started
|
|
68
|
-
4. 🚫 {task.title} - Blocked
|
|
69
|
-
|
|
70
|
-
{Repeat for each phase}
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 🚨 Blockers
|
|
75
|
-
|
|
76
|
-
{List any tasks with status "blocked" and their recent logs}
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## 🎯 Next Actions
|
|
81
|
-
|
|
82
|
-
{Suggest what should happen next based on status:}
|
|
83
|
-
|
|
84
|
-
- If all tasks completed: "Plan is complete! Ready to review and close."
|
|
85
|
-
- If tasks in progress: "Tasks currently being worked on. Continue monitoring."
|
|
86
|
-
- If tasks not started: "Run /execute-plan {plan_id} to begin execution."
|
|
87
|
-
- If tasks blocked: "Address blockers before continuing."
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Step 5: Show Recent Activity
|
|
91
|
-
|
|
92
|
-
Use `mcp__planning-system__search` to find recent logs:
|
|
93
|
-
- Query: Plan-specific search
|
|
94
|
-
- Type filter: "log"
|
|
95
|
-
- Limit: 10
|
|
96
|
-
|
|
97
|
-
Show the most recent activity:
|
|
98
|
-
```markdown
|
|
99
|
-
## 📝 Recent Activity
|
|
100
|
-
|
|
101
|
-
1. [{timestamp}] {log.log_type}: {log.content} (Node: {node.title})
|
|
102
|
-
2. [{timestamp}] {log.log_type}: {log.content} (Node: {node.title})
|
|
103
|
-
...
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Step 6: Offer Actions
|
|
107
|
-
|
|
108
|
-
Based on the status, suggest relevant actions:
|
|
109
|
-
|
|
110
|
-
```markdown
|
|
111
|
-
## 🎬 Available Actions
|
|
112
|
-
|
|
113
|
-
- `/execute-plan {plan_id}` - Continue autonomous execution
|
|
114
|
-
- `/plan-status {plan_id}` - Refresh this status report
|
|
115
|
-
- View specific task details (provide node_id)
|
|
116
|
-
- Update plan status or task statuses manually
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Special Reporting Modes
|
|
120
|
-
|
|
121
|
-
### Quick Status (one-liner)
|
|
122
|
-
If user asks for quick status, just show:
|
|
123
|
-
```
|
|
124
|
-
Plan "{title}": {completed}/{total} tasks done ({percentage}%), {in_progress} in progress, {blocked} blocked
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Focus on Blockers
|
|
128
|
-
If user asks about blockers specifically:
|
|
129
|
-
1. Filter to only blocked tasks
|
|
130
|
-
2. Get logs for each blocked task
|
|
131
|
-
3. Show detailed breakdown of what's blocking each one
|
|
132
|
-
|
|
133
|
-
### Timeline View
|
|
134
|
-
If user asks for timeline:
|
|
135
|
-
1. Get all logs ordered by timestamp
|
|
136
|
-
2. Show chronological activity
|
|
137
|
-
3. Highlight status changes
|
|
138
|
-
|
|
139
|
-
## Error Handling
|
|
140
|
-
|
|
141
|
-
- If plan_id not found: List available plans
|
|
142
|
-
- If MCP tools fail: Report error clearly
|
|
143
|
-
- If plan has no tasks yet: Suggest using `/create-plan`
|
|
144
|
-
|
|
145
|
-
Now generate the status report!
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"mcp__planning-system__create_node",
|
|
5
|
-
"mcp__planning-system__create_plan",
|
|
6
|
-
"mcp__planning-system__add_log",
|
|
7
|
-
"mcp__planning-system__get_plan_summary",
|
|
8
|
-
"mcp__planning-system__batch_update_nodes",
|
|
9
|
-
"mcp__planning-system__update_node"
|
|
10
|
-
]
|
|
11
|
-
}
|
|
12
|
-
}
|