trak_flow 0.1.3
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.
- checksums.yaml +7 -0
- data/.envrc +3 -0
- data/CHANGELOG.md +69 -0
- data/COMMITS.md +196 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +281 -0
- data/README.md +479 -0
- data/Rakefile +16 -0
- data/bin/tf +6 -0
- data/bin/tf_mcp +81 -0
- data/docs/.keep +0 -0
- data/docs/api/database.md +434 -0
- data/docs/api/ruby-library.md +349 -0
- data/docs/api/task-model.md +341 -0
- data/docs/assets/stylesheets/extra.css +53 -0
- data/docs/assets/trak_flow.jpg +0 -0
- data/docs/cli/admin-commands.md +369 -0
- data/docs/cli/dependency-commands.md +321 -0
- data/docs/cli/label-commands.md +222 -0
- data/docs/cli/overview.md +163 -0
- data/docs/cli/plan-commands.md +344 -0
- data/docs/cli/task-commands.md +333 -0
- data/docs/core-concepts/dependencies.md +232 -0
- data/docs/core-concepts/labels.md +217 -0
- data/docs/core-concepts/overview.md +178 -0
- data/docs/core-concepts/plans-workflows.md +264 -0
- data/docs/core-concepts/tasks.md +205 -0
- data/docs/getting-started/configuration.md +120 -0
- data/docs/getting-started/installation.md +79 -0
- data/docs/getting-started/quick-start.md +245 -0
- data/docs/index.md +169 -0
- data/docs/mcp/integration.md +302 -0
- data/docs/mcp/overview.md +206 -0
- data/docs/mcp/resources.md +284 -0
- data/docs/mcp/tools.md +457 -0
- data/examples/basic_usage.rb +365 -0
- data/examples/cli_demo.sh +314 -0
- data/examples/mcp/Gemfile +9 -0
- data/examples/mcp/Gemfile.lock +226 -0
- data/examples/mcp/http_demo.rb +232 -0
- data/examples/mcp/stdio_demo.rb +146 -0
- data/lib/trak_flow/cli/admin_commands.rb +136 -0
- data/lib/trak_flow/cli/config_commands.rb +260 -0
- data/lib/trak_flow/cli/dep_commands.rb +71 -0
- data/lib/trak_flow/cli/label_commands.rb +76 -0
- data/lib/trak_flow/cli/main_commands.rb +386 -0
- data/lib/trak_flow/cli/plan_commands.rb +185 -0
- data/lib/trak_flow/cli/workflow_commands.rb +133 -0
- data/lib/trak_flow/cli.rb +110 -0
- data/lib/trak_flow/config/defaults.yml +114 -0
- data/lib/trak_flow/config/section.rb +74 -0
- data/lib/trak_flow/config.rb +276 -0
- data/lib/trak_flow/graph/dependency_graph.rb +288 -0
- data/lib/trak_flow/id_generator.rb +52 -0
- data/lib/trak_flow/mcp/resources/base_resource.rb +25 -0
- data/lib/trak_flow/mcp/resources/dependency_graph.rb +31 -0
- data/lib/trak_flow/mcp/resources/label_list.rb +21 -0
- data/lib/trak_flow/mcp/resources/plan_by_id.rb +27 -0
- data/lib/trak_flow/mcp/resources/plan_list.rb +21 -0
- data/lib/trak_flow/mcp/resources/task_by_id.rb +31 -0
- data/lib/trak_flow/mcp/resources/task_list.rb +21 -0
- data/lib/trak_flow/mcp/resources/task_next.rb +30 -0
- data/lib/trak_flow/mcp/resources/workflow_by_id.rb +27 -0
- data/lib/trak_flow/mcp/resources/workflow_list.rb +21 -0
- data/lib/trak_flow/mcp/server.rb +140 -0
- data/lib/trak_flow/mcp/tools/base_tool.rb +29 -0
- data/lib/trak_flow/mcp/tools/comment_add.rb +33 -0
- data/lib/trak_flow/mcp/tools/dep_add.rb +34 -0
- data/lib/trak_flow/mcp/tools/dep_remove.rb +25 -0
- data/lib/trak_flow/mcp/tools/label_add.rb +28 -0
- data/lib/trak_flow/mcp/tools/label_remove.rb +25 -0
- data/lib/trak_flow/mcp/tools/plan_add_step.rb +35 -0
- data/lib/trak_flow/mcp/tools/plan_create.rb +33 -0
- data/lib/trak_flow/mcp/tools/plan_run.rb +58 -0
- data/lib/trak_flow/mcp/tools/plan_start.rb +58 -0
- data/lib/trak_flow/mcp/tools/task_block.rb +27 -0
- data/lib/trak_flow/mcp/tools/task_close.rb +26 -0
- data/lib/trak_flow/mcp/tools/task_create.rb +51 -0
- data/lib/trak_flow/mcp/tools/task_defer.rb +27 -0
- data/lib/trak_flow/mcp/tools/task_start.rb +25 -0
- data/lib/trak_flow/mcp/tools/task_update.rb +36 -0
- data/lib/trak_flow/mcp/tools/workflow_discard.rb +28 -0
- data/lib/trak_flow/mcp/tools/workflow_summarize.rb +34 -0
- data/lib/trak_flow/mcp.rb +38 -0
- data/lib/trak_flow/models/comment.rb +71 -0
- data/lib/trak_flow/models/dependency.rb +96 -0
- data/lib/trak_flow/models/label.rb +90 -0
- data/lib/trak_flow/models/task.rb +188 -0
- data/lib/trak_flow/storage/database.rb +638 -0
- data/lib/trak_flow/storage/jsonl.rb +259 -0
- data/lib/trak_flow/time_parser.rb +15 -0
- data/lib/trak_flow/version.rb +5 -0
- data/lib/trak_flow.rb +100 -0
- data/mkdocs.yml +143 -0
- metadata +392 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# MCP Resources Reference
|
|
2
|
+
|
|
3
|
+
Resources provide read-only access to TrakFlow data. AI agents can use resources to understand the current state of tasks without modifying anything.
|
|
4
|
+
|
|
5
|
+
## Available Resources
|
|
6
|
+
|
|
7
|
+
### Task List
|
|
8
|
+
|
|
9
|
+
**URI:** `trak_flow://tasks`
|
|
10
|
+
**Name:** Task List
|
|
11
|
+
**Description:** All tasks in the project
|
|
12
|
+
|
|
13
|
+
#### Content
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"tasks": [
|
|
18
|
+
{
|
|
19
|
+
"id": "tf-abc123",
|
|
20
|
+
"title": "Implement authentication",
|
|
21
|
+
"status": "in_progress",
|
|
22
|
+
"priority": 1,
|
|
23
|
+
"type": "feature",
|
|
24
|
+
"assignee": "claude",
|
|
25
|
+
"created_at": "2024-01-15T10:00:00Z"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "tf-def456",
|
|
29
|
+
"title": "Fix login bug",
|
|
30
|
+
"status": "open",
|
|
31
|
+
"priority": 0,
|
|
32
|
+
"type": "bug"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"summary": {
|
|
36
|
+
"total": 42,
|
|
37
|
+
"by_status": {
|
|
38
|
+
"open": 15,
|
|
39
|
+
"in_progress": 5,
|
|
40
|
+
"blocked": 3,
|
|
41
|
+
"closed": 19
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Ready Tasks
|
|
48
|
+
|
|
49
|
+
**URI:** `trak_flow://ready`
|
|
50
|
+
**Name:** Ready Tasks
|
|
51
|
+
**Description:** Tasks with no open blockers, ready to work on
|
|
52
|
+
|
|
53
|
+
#### Content
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"tasks": [
|
|
58
|
+
{
|
|
59
|
+
"id": "tf-abc123",
|
|
60
|
+
"title": "Implement feature X",
|
|
61
|
+
"priority": 1,
|
|
62
|
+
"type": "feature"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "tf-def456",
|
|
66
|
+
"title": "Fix critical bug",
|
|
67
|
+
"priority": 0,
|
|
68
|
+
"type": "bug"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"count": 2
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Dependencies
|
|
76
|
+
|
|
77
|
+
**URI:** `trak_flow://dependencies`
|
|
78
|
+
**Name:** Dependencies
|
|
79
|
+
**Description:** Dependency graph between tasks
|
|
80
|
+
|
|
81
|
+
#### Content
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"dependencies": [
|
|
86
|
+
{
|
|
87
|
+
"source_id": "tf-design1",
|
|
88
|
+
"target_id": "tf-implement1",
|
|
89
|
+
"type": "blocks"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"source_id": "tf-implement1",
|
|
93
|
+
"target_id": "tf-test1",
|
|
94
|
+
"type": "blocks"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"summary": {
|
|
98
|
+
"total": 34,
|
|
99
|
+
"by_type": {
|
|
100
|
+
"blocks": 28,
|
|
101
|
+
"related": 4,
|
|
102
|
+
"parent-child": 2
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Plans
|
|
109
|
+
|
|
110
|
+
**URI:** `trak_flow://plans`
|
|
111
|
+
**Name:** Plans
|
|
112
|
+
**Description:** Plan blueprints and their Workflows
|
|
113
|
+
|
|
114
|
+
#### Content
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"plans": [
|
|
119
|
+
{
|
|
120
|
+
"id": "tf-plan1",
|
|
121
|
+
"title": "Deploy Process",
|
|
122
|
+
"steps": [
|
|
123
|
+
{"title": "Run tests"},
|
|
124
|
+
{"title": "Build artifacts"},
|
|
125
|
+
{"title": "Deploy to staging"},
|
|
126
|
+
{"title": "Deploy to production"}
|
|
127
|
+
],
|
|
128
|
+
"workflow_count": 3
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"active_workflows": [
|
|
132
|
+
{
|
|
133
|
+
"id": "tf-wf1",
|
|
134
|
+
"source_plan_id": "tf-plan1",
|
|
135
|
+
"title": "Deploy v1.2.0",
|
|
136
|
+
"progress": {
|
|
137
|
+
"completed": 2,
|
|
138
|
+
"total": 4
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Labels
|
|
146
|
+
|
|
147
|
+
**URI:** `trak_flow://labels`
|
|
148
|
+
**Name:** Labels
|
|
149
|
+
**Description:** All labels used in the project
|
|
150
|
+
|
|
151
|
+
#### Content
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"labels": [
|
|
156
|
+
{"name": "frontend", "task_count": 12},
|
|
157
|
+
{"name": "backend", "task_count": 8},
|
|
158
|
+
{"name": "urgent", "task_count": 3},
|
|
159
|
+
{"name": "v2.0", "task_count": 15}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Project Summary
|
|
165
|
+
|
|
166
|
+
**URI:** `trak_flow://summary`
|
|
167
|
+
**Name:** Project Summary
|
|
168
|
+
**Description:** Overview of project status
|
|
169
|
+
|
|
170
|
+
#### Content
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"project": {
|
|
175
|
+
"total_tasks": 47,
|
|
176
|
+
"open_tasks": 12,
|
|
177
|
+
"in_progress": 5,
|
|
178
|
+
"blocked": 3,
|
|
179
|
+
"closed": 27
|
|
180
|
+
},
|
|
181
|
+
"priorities": {
|
|
182
|
+
"critical": 2,
|
|
183
|
+
"high": 8,
|
|
184
|
+
"medium": 25,
|
|
185
|
+
"low": 10,
|
|
186
|
+
"backlog": 2
|
|
187
|
+
},
|
|
188
|
+
"types": {
|
|
189
|
+
"task": 30,
|
|
190
|
+
"bug": 8,
|
|
191
|
+
"feature": 5,
|
|
192
|
+
"epic": 3,
|
|
193
|
+
"chore": 1
|
|
194
|
+
},
|
|
195
|
+
"recent_activity": [
|
|
196
|
+
{
|
|
197
|
+
"task_id": "tf-abc123",
|
|
198
|
+
"action": "closed",
|
|
199
|
+
"timestamp": "2024-01-16T14:30:00Z"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"task_id": "tf-def456",
|
|
203
|
+
"action": "started",
|
|
204
|
+
"timestamp": "2024-01-16T14:00:00Z"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Accessing Resources
|
|
211
|
+
|
|
212
|
+
### Using MCP Client
|
|
213
|
+
|
|
214
|
+
```ruby
|
|
215
|
+
# Get a resource by name
|
|
216
|
+
task_list = client.resource("Task List")
|
|
217
|
+
|
|
218
|
+
# Access the content
|
|
219
|
+
content = task_list.content
|
|
220
|
+
puts content["tasks"].length
|
|
221
|
+
|
|
222
|
+
# Or get by URI
|
|
223
|
+
ready = client.resource_by_uri("trak_flow://ready")
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Resource Properties
|
|
227
|
+
|
|
228
|
+
Each resource has these properties:
|
|
229
|
+
|
|
230
|
+
| Property | Description |
|
|
231
|
+
|----------|-------------|
|
|
232
|
+
| `uri` | Unique resource identifier |
|
|
233
|
+
| `name` | Human-readable name |
|
|
234
|
+
| `description` | What the resource contains |
|
|
235
|
+
| `mimeType` | Content type (application/json) |
|
|
236
|
+
|
|
237
|
+
## Resource Updates
|
|
238
|
+
|
|
239
|
+
Resources are read-only snapshots. To get updated data:
|
|
240
|
+
|
|
241
|
+
1. Request the resource again
|
|
242
|
+
2. Subscribe to updates via SSE (HTTP transport)
|
|
243
|
+
|
|
244
|
+
### SSE Updates (HTTP Transport)
|
|
245
|
+
|
|
246
|
+
When using HTTP/SSE transport, you can subscribe to resource updates:
|
|
247
|
+
|
|
248
|
+
```ruby
|
|
249
|
+
client.on_resource_update("trak_flow://tasks") do |content|
|
|
250
|
+
puts "Tasks updated: #{content["tasks"].length} tasks"
|
|
251
|
+
end
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Using Resources with LLMs
|
|
255
|
+
|
|
256
|
+
Resources are designed to provide context to AI agents. Example prompt:
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
Based on the current task list, what should I work on next?
|
|
260
|
+
|
|
261
|
+
Task List:
|
|
262
|
+
{resource: trak_flow://tasks}
|
|
263
|
+
|
|
264
|
+
Ready Tasks:
|
|
265
|
+
{resource: trak_flow://ready}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
The AI can analyze the data and recommend next steps.
|
|
269
|
+
|
|
270
|
+
## Resource Best Practices
|
|
271
|
+
|
|
272
|
+
### For AI Agents
|
|
273
|
+
|
|
274
|
+
1. **Start with summary** - Get the big picture first
|
|
275
|
+
2. **Check ready tasks** - Know what's actionable
|
|
276
|
+
3. **Review dependencies** - Understand blockers
|
|
277
|
+
4. **Cache wisely** - Resources are point-in-time snapshots
|
|
278
|
+
|
|
279
|
+
### For Integration
|
|
280
|
+
|
|
281
|
+
1. **Poll sparingly** - Resources don't change constantly
|
|
282
|
+
2. **Use SSE when available** - For real-time updates
|
|
283
|
+
3. **Handle errors gracefully** - Resources may be empty
|
|
284
|
+
4. **Respect rate limits** - Don't overload the server
|
data/docs/mcp/tools.md
ADDED
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
# MCP Tools Reference
|
|
2
|
+
|
|
3
|
+
This page documents all tools exposed by the TrakFlow MCP server.
|
|
4
|
+
|
|
5
|
+
## Task Management Tools
|
|
6
|
+
|
|
7
|
+
### task_create
|
|
8
|
+
|
|
9
|
+
Create a new task.
|
|
10
|
+
|
|
11
|
+
#### Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Required | Description |
|
|
14
|
+
|-----------|------|----------|-------------|
|
|
15
|
+
| `title` | string | Yes | Task title |
|
|
16
|
+
| `description` | string | No | Detailed description |
|
|
17
|
+
| `type` | string | No | Task type (task, bug, feature, epic, chore) |
|
|
18
|
+
| `priority` | integer | No | Priority 0-4 (default: 2) |
|
|
19
|
+
| `assignee` | string | No | Assigned user/agent |
|
|
20
|
+
| `parent_id` | string | No | Parent task ID |
|
|
21
|
+
| `plan` | boolean | No | Create as Plan blueprint |
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"success": true,
|
|
28
|
+
"task": {
|
|
29
|
+
"id": "tf-abc123",
|
|
30
|
+
"title": "New task",
|
|
31
|
+
"status": "open",
|
|
32
|
+
"priority": 2,
|
|
33
|
+
"type": "task",
|
|
34
|
+
"created_at": "2024-01-15T10:00:00Z"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### Example
|
|
40
|
+
|
|
41
|
+
```ruby
|
|
42
|
+
tool = client.tool("task_create")
|
|
43
|
+
result = tool.execute(
|
|
44
|
+
title: "Implement user authentication",
|
|
45
|
+
type: "feature",
|
|
46
|
+
priority: 1,
|
|
47
|
+
description: "Add login, logout, and session management"
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### task_list
|
|
52
|
+
|
|
53
|
+
List tasks with optional filters.
|
|
54
|
+
|
|
55
|
+
#### Parameters
|
|
56
|
+
|
|
57
|
+
| Parameter | Type | Required | Description |
|
|
58
|
+
|-----------|------|----------|-------------|
|
|
59
|
+
| `status` | string | No | Filter by status |
|
|
60
|
+
| `type` | string | No | Filter by type |
|
|
61
|
+
| `priority` | integer | No | Filter by priority |
|
|
62
|
+
| `assignee` | string | No | Filter by assignee |
|
|
63
|
+
| `label` | string | No | Filter by label |
|
|
64
|
+
| `parent_id` | string | No | Filter by parent |
|
|
65
|
+
| `limit` | integer | No | Max results |
|
|
66
|
+
| `offset` | integer | No | Skip results |
|
|
67
|
+
|
|
68
|
+
#### Returns
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"tasks": [
|
|
73
|
+
{"id": "tf-abc123", "title": "Task 1", "status": "open", "priority": 2},
|
|
74
|
+
{"id": "tf-def456", "title": "Task 2", "status": "in_progress", "priority": 1}
|
|
75
|
+
],
|
|
76
|
+
"count": 2,
|
|
77
|
+
"total": 42
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Example
|
|
82
|
+
|
|
83
|
+
```ruby
|
|
84
|
+
tool = client.tool("task_list")
|
|
85
|
+
result = tool.execute(status: "open", priority: 1)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### task_show
|
|
89
|
+
|
|
90
|
+
Get detailed information about a task.
|
|
91
|
+
|
|
92
|
+
#### Parameters
|
|
93
|
+
|
|
94
|
+
| Parameter | Type | Required | Description |
|
|
95
|
+
|-----------|------|----------|-------------|
|
|
96
|
+
| `id` | string | Yes | Task ID |
|
|
97
|
+
| `include_deps` | boolean | No | Include dependencies |
|
|
98
|
+
| `include_labels` | boolean | No | Include labels |
|
|
99
|
+
|
|
100
|
+
#### Returns
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"task": {
|
|
105
|
+
"id": "tf-abc123",
|
|
106
|
+
"title": "Implement feature",
|
|
107
|
+
"description": "Detailed description",
|
|
108
|
+
"status": "in_progress",
|
|
109
|
+
"priority": 1,
|
|
110
|
+
"type": "feature",
|
|
111
|
+
"assignee": "claude",
|
|
112
|
+
"created_at": "2024-01-15T10:00:00Z",
|
|
113
|
+
"updated_at": "2024-01-16T14:30:00Z",
|
|
114
|
+
"notes": "..."
|
|
115
|
+
},
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"blocked_by": ["tf-design1"],
|
|
118
|
+
"blocks": ["tf-test1", "tf-docs1"]
|
|
119
|
+
},
|
|
120
|
+
"labels": ["backend", "security"]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### task_update
|
|
125
|
+
|
|
126
|
+
Update task properties.
|
|
127
|
+
|
|
128
|
+
#### Parameters
|
|
129
|
+
|
|
130
|
+
| Parameter | Type | Required | Description |
|
|
131
|
+
|-----------|------|----------|-------------|
|
|
132
|
+
| `id` | string | Yes | Task ID |
|
|
133
|
+
| `title` | string | No | New title |
|
|
134
|
+
| `description` | string | No | New description |
|
|
135
|
+
| `priority` | integer | No | New priority |
|
|
136
|
+
| `type` | string | No | New type |
|
|
137
|
+
| `assignee` | string | No | New assignee |
|
|
138
|
+
| `notes` | string | No | Append to notes |
|
|
139
|
+
|
|
140
|
+
#### Returns
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"success": true,
|
|
145
|
+
"task": {
|
|
146
|
+
"id": "tf-abc123",
|
|
147
|
+
"title": "Updated title",
|
|
148
|
+
"updated_at": "2024-01-16T15:00:00Z"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### task_start
|
|
154
|
+
|
|
155
|
+
Mark a task as in progress.
|
|
156
|
+
|
|
157
|
+
#### Parameters
|
|
158
|
+
|
|
159
|
+
| Parameter | Type | Required | Description |
|
|
160
|
+
|-----------|------|----------|-------------|
|
|
161
|
+
| `id` | string | Yes | Task ID |
|
|
162
|
+
|
|
163
|
+
#### Returns
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"success": true,
|
|
168
|
+
"task": {
|
|
169
|
+
"id": "tf-abc123",
|
|
170
|
+
"status": "in_progress"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### task_close
|
|
176
|
+
|
|
177
|
+
Complete a task.
|
|
178
|
+
|
|
179
|
+
#### Parameters
|
|
180
|
+
|
|
181
|
+
| Parameter | Type | Required | Description |
|
|
182
|
+
|-----------|------|----------|-------------|
|
|
183
|
+
| `id` | string | Yes | Task ID |
|
|
184
|
+
| `summary` | string | No | Completion summary |
|
|
185
|
+
|
|
186
|
+
#### Returns
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"success": true,
|
|
191
|
+
"task": {
|
|
192
|
+
"id": "tf-abc123",
|
|
193
|
+
"status": "closed",
|
|
194
|
+
"closed_at": "2024-01-16T16:00:00Z"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### task_block
|
|
200
|
+
|
|
201
|
+
Mark a task as blocked.
|
|
202
|
+
|
|
203
|
+
#### Parameters
|
|
204
|
+
|
|
205
|
+
| Parameter | Type | Required | Description |
|
|
206
|
+
|-----------|------|----------|-------------|
|
|
207
|
+
| `id` | string | Yes | Task ID |
|
|
208
|
+
| `reason` | string | No | Blocking reason |
|
|
209
|
+
|
|
210
|
+
#### Returns
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"success": true,
|
|
215
|
+
"task": {
|
|
216
|
+
"id": "tf-abc123",
|
|
217
|
+
"status": "blocked"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### task_reopen
|
|
223
|
+
|
|
224
|
+
Reopen a closed or deferred task.
|
|
225
|
+
|
|
226
|
+
#### Parameters
|
|
227
|
+
|
|
228
|
+
| Parameter | Type | Required | Description |
|
|
229
|
+
|-----------|------|----------|-------------|
|
|
230
|
+
| `id` | string | Yes | Task ID |
|
|
231
|
+
|
|
232
|
+
#### Returns
|
|
233
|
+
|
|
234
|
+
```json
|
|
235
|
+
{
|
|
236
|
+
"success": true,
|
|
237
|
+
"task": {
|
|
238
|
+
"id": "tf-abc123",
|
|
239
|
+
"status": "open"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Plan & Workflow Tools
|
|
245
|
+
|
|
246
|
+
### plan_create
|
|
247
|
+
|
|
248
|
+
Create a Plan blueprint.
|
|
249
|
+
|
|
250
|
+
#### Parameters
|
|
251
|
+
|
|
252
|
+
| Parameter | Type | Required | Description |
|
|
253
|
+
|-----------|------|----------|-------------|
|
|
254
|
+
| `title` | string | Yes | Plan title |
|
|
255
|
+
| `description` | string | No | Plan description |
|
|
256
|
+
|
|
257
|
+
#### Returns
|
|
258
|
+
|
|
259
|
+
```json
|
|
260
|
+
{
|
|
261
|
+
"success": true,
|
|
262
|
+
"plan": {
|
|
263
|
+
"id": "tf-plan123",
|
|
264
|
+
"title": "Deploy Process",
|
|
265
|
+
"plan": true
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### plan_add_step
|
|
271
|
+
|
|
272
|
+
Add a step to a Plan.
|
|
273
|
+
|
|
274
|
+
#### Parameters
|
|
275
|
+
|
|
276
|
+
| Parameter | Type | Required | Description |
|
|
277
|
+
|-----------|------|----------|-------------|
|
|
278
|
+
| `plan_id` | string | Yes | Plan ID |
|
|
279
|
+
| `title` | string | Yes | Step title |
|
|
280
|
+
| `description` | string | No | Step description |
|
|
281
|
+
|
|
282
|
+
### plan_start
|
|
283
|
+
|
|
284
|
+
Create a persistent Workflow from a Plan.
|
|
285
|
+
|
|
286
|
+
#### Parameters
|
|
287
|
+
|
|
288
|
+
| Parameter | Type | Required | Description |
|
|
289
|
+
|-----------|------|----------|-------------|
|
|
290
|
+
| `plan_id` | string | Yes | Plan ID |
|
|
291
|
+
| `title` | string | No | Custom Workflow title |
|
|
292
|
+
|
|
293
|
+
#### Returns
|
|
294
|
+
|
|
295
|
+
```json
|
|
296
|
+
{
|
|
297
|
+
"success": true,
|
|
298
|
+
"workflow": {
|
|
299
|
+
"id": "tf-wf123",
|
|
300
|
+
"source_plan_id": "tf-plan123",
|
|
301
|
+
"ephemeral": false,
|
|
302
|
+
"tasks": [
|
|
303
|
+
{"id": "tf-task1", "title": "Step 1"},
|
|
304
|
+
{"id": "tf-task2", "title": "Step 2"}
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### plan_execute
|
|
311
|
+
|
|
312
|
+
Create an ephemeral Workflow from a Plan.
|
|
313
|
+
|
|
314
|
+
#### Parameters
|
|
315
|
+
|
|
316
|
+
| Parameter | Type | Required | Description |
|
|
317
|
+
|-----------|------|----------|-------------|
|
|
318
|
+
| `plan_id` | string | Yes | Plan ID |
|
|
319
|
+
| `title` | string | No | Custom Workflow title |
|
|
320
|
+
|
|
321
|
+
## Dependency Tools
|
|
322
|
+
|
|
323
|
+
### dep_add
|
|
324
|
+
|
|
325
|
+
Add a dependency between tasks.
|
|
326
|
+
|
|
327
|
+
#### Parameters
|
|
328
|
+
|
|
329
|
+
| Parameter | Type | Required | Description |
|
|
330
|
+
|-----------|------|----------|-------------|
|
|
331
|
+
| `source_id` | string | Yes | Source task ID |
|
|
332
|
+
| `target_id` | string | Yes | Target task ID |
|
|
333
|
+
| `type` | string | No | Dependency type (blocks, related) |
|
|
334
|
+
|
|
335
|
+
#### Returns
|
|
336
|
+
|
|
337
|
+
```json
|
|
338
|
+
{
|
|
339
|
+
"success": true,
|
|
340
|
+
"dependency": {
|
|
341
|
+
"source_id": "tf-abc123",
|
|
342
|
+
"target_id": "tf-def456",
|
|
343
|
+
"type": "blocks"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### dep_remove
|
|
349
|
+
|
|
350
|
+
Remove a dependency.
|
|
351
|
+
|
|
352
|
+
#### Parameters
|
|
353
|
+
|
|
354
|
+
| Parameter | Type | Required | Description |
|
|
355
|
+
|-----------|------|----------|-------------|
|
|
356
|
+
| `source_id` | string | Yes | Source task ID |
|
|
357
|
+
| `target_id` | string | Yes | Target task ID |
|
|
358
|
+
|
|
359
|
+
### ready_tasks
|
|
360
|
+
|
|
361
|
+
Find tasks with no open blockers.
|
|
362
|
+
|
|
363
|
+
#### Parameters
|
|
364
|
+
|
|
365
|
+
| Parameter | Type | Required | Description |
|
|
366
|
+
|-----------|------|----------|-------------|
|
|
367
|
+
| `type` | string | No | Filter by type |
|
|
368
|
+
| `priority` | integer | No | Filter by priority |
|
|
369
|
+
| `limit` | integer | No | Max results |
|
|
370
|
+
|
|
371
|
+
#### Returns
|
|
372
|
+
|
|
373
|
+
```json
|
|
374
|
+
{
|
|
375
|
+
"tasks": [
|
|
376
|
+
{"id": "tf-abc123", "title": "Ready task 1"},
|
|
377
|
+
{"id": "tf-def456", "title": "Ready task 2"}
|
|
378
|
+
],
|
|
379
|
+
"count": 2
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
## Label Tools
|
|
384
|
+
|
|
385
|
+
### label_add
|
|
386
|
+
|
|
387
|
+
Add a label to a task.
|
|
388
|
+
|
|
389
|
+
#### Parameters
|
|
390
|
+
|
|
391
|
+
| Parameter | Type | Required | Description |
|
|
392
|
+
|-----------|------|----------|-------------|
|
|
393
|
+
| `task_id` | string | Yes | Task ID |
|
|
394
|
+
| `label` | string | Yes | Label name |
|
|
395
|
+
|
|
396
|
+
#### Returns
|
|
397
|
+
|
|
398
|
+
```json
|
|
399
|
+
{
|
|
400
|
+
"success": true,
|
|
401
|
+
"task_id": "tf-abc123",
|
|
402
|
+
"label": "frontend"
|
|
403
|
+
}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### label_remove
|
|
407
|
+
|
|
408
|
+
Remove a label from a task.
|
|
409
|
+
|
|
410
|
+
#### Parameters
|
|
411
|
+
|
|
412
|
+
| Parameter | Type | Required | Description |
|
|
413
|
+
|-----------|------|----------|-------------|
|
|
414
|
+
| `task_id` | string | Yes | Task ID |
|
|
415
|
+
| `label` | string | Yes | Label name |
|
|
416
|
+
|
|
417
|
+
### label_list
|
|
418
|
+
|
|
419
|
+
List labels on a task.
|
|
420
|
+
|
|
421
|
+
#### Parameters
|
|
422
|
+
|
|
423
|
+
| Parameter | Type | Required | Description |
|
|
424
|
+
|-----------|------|----------|-------------|
|
|
425
|
+
| `task_id` | string | Yes | Task ID |
|
|
426
|
+
|
|
427
|
+
#### Returns
|
|
428
|
+
|
|
429
|
+
```json
|
|
430
|
+
{
|
|
431
|
+
"task_id": "tf-abc123",
|
|
432
|
+
"labels": ["frontend", "urgent", "v2.0"]
|
|
433
|
+
}
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
## Error Handling
|
|
437
|
+
|
|
438
|
+
All tools return errors in a consistent format:
|
|
439
|
+
|
|
440
|
+
```json
|
|
441
|
+
{
|
|
442
|
+
"success": false,
|
|
443
|
+
"error": {
|
|
444
|
+
"code": "not_found",
|
|
445
|
+
"message": "Task not found: tf-invalid"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Error Codes
|
|
451
|
+
|
|
452
|
+
| Code | Description |
|
|
453
|
+
|------|-------------|
|
|
454
|
+
| `not_found` | Resource not found |
|
|
455
|
+
| `validation_error` | Invalid parameters |
|
|
456
|
+
| `conflict` | Conflicting operation |
|
|
457
|
+
| `internal_error` | Server error |
|