sqlew 4.0.5 → 4.1.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/CHANGELOG.md +1817 -1782
- package/README.md +409 -468
- package/assets/claude-md-snippets/plan-mode-integration.md +17 -6
- package/assets/config.example.toml +282 -284
- package/assets/sample-agents/README.md +36 -40
- package/assets/sample-agents/sqlew-architect.md +321 -322
- package/assets/sample-agents/sqlew-researcher.md +292 -293
- package/assets/sample-agents/sqlew-scrum-master.md +286 -287
- package/assets/sample-commands/README.md +56 -57
- package/assets/sample-skills/sqlew-plan-guidance/SKILL.md +33 -26
- package/dist/cli/hooks/check-completion.d.ts +19 -0
- package/dist/cli/hooks/check-completion.d.ts.map +1 -0
- package/dist/cli/hooks/check-completion.js +104 -0
- package/dist/cli/hooks/check-completion.js.map +1 -0
- package/dist/cli/hooks/init-hooks.d.ts +35 -0
- package/dist/cli/hooks/init-hooks.d.ts.map +1 -0
- package/dist/cli/hooks/init-hooks.js +425 -0
- package/dist/cli/hooks/init-hooks.js.map +1 -0
- package/dist/cli/hooks/mark-done.d.ts +25 -0
- package/dist/cli/hooks/mark-done.d.ts.map +1 -0
- package/dist/cli/hooks/mark-done.js +128 -0
- package/dist/cli/hooks/mark-done.js.map +1 -0
- package/dist/cli/hooks/plan-id-utils.d.ts +83 -0
- package/dist/cli/hooks/plan-id-utils.d.ts.map +1 -0
- package/dist/cli/hooks/plan-id-utils.js +183 -0
- package/dist/cli/hooks/plan-id-utils.js.map +1 -0
- package/dist/cli/hooks/save.d.ts +23 -0
- package/dist/cli/hooks/save.d.ts.map +1 -0
- package/dist/cli/hooks/save.js +90 -0
- package/dist/cli/hooks/save.js.map +1 -0
- package/dist/cli/hooks/stdin-parser.d.ts +139 -0
- package/dist/cli/hooks/stdin-parser.d.ts.map +1 -0
- package/dist/cli/hooks/stdin-parser.js +127 -0
- package/dist/cli/hooks/stdin-parser.js.map +1 -0
- package/dist/cli/hooks/suggest.d.ts +19 -0
- package/dist/cli/hooks/suggest.d.ts.map +1 -0
- package/dist/cli/hooks/suggest.js +157 -0
- package/dist/cli/hooks/suggest.js.map +1 -0
- package/dist/cli/hooks/track-plan.d.ts +36 -0
- package/dist/cli/hooks/track-plan.d.ts.map +1 -0
- package/dist/cli/hooks/track-plan.js +152 -0
- package/dist/cli/hooks/track-plan.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +56 -16
- package/dist/cli.js.map +1 -1
- package/dist/config/global-config.d.ts +187 -0
- package/dist/config/global-config.d.ts.map +1 -0
- package/dist/config/global-config.js +206 -0
- package/dist/config/global-config.js.map +1 -0
- package/dist/config/loader.d.ts +42 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +96 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +10 -0
- package/dist/constants.js.map +1 -1
- package/dist/database/migrations/v4/20251126000000_v4_bootstrap.js +59 -59
- package/dist/database/migrations/v4/20251126000000_v4_bootstrap.js.map +1 -1
- package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js +33 -33
- package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js.map +1 -1
- package/dist/database/migrations/v4/20251127000000_add_rejected_status.js +7 -7
- package/dist/database/migrations/v4/20251127000000_add_rejected_status.js.map +1 -1
- package/dist/database/migrations/v4/20251127000001_update_task_move_help.js +11 -11
- package/dist/database/migrations/v4/20251127000001_update_task_move_help.js.map +1 -1
- package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js +10 -10
- package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js.map +1 -1
- package/dist/database/migrations/v4/20251127000003_add_task_notes_column.js +7 -7
- package/dist/database/migrations/v4/20251127000003_add_task_notes_column.js.map +1 -1
- package/dist/database/migrations/v4/20251128000000_drop_all_views.js +8 -8
- package/dist/database/migrations/v4/20251128000000_drop_all_views.js.map +1 -1
- package/dist/database/operations/queries.d.ts.map +1 -1
- package/dist/database/operations/queries.js +11 -2
- package/dist/database/operations/queries.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/init-agents.js +0 -1
- package/dist/init-agents.js.map +1 -1
- package/dist/init-skills.d.ts +4 -3
- package/dist/init-skills.d.ts.map +1 -1
- package/dist/init-skills.js +10 -3
- package/dist/init-skills.js.map +1 -1
- package/dist/server/setup.d.ts +8 -0
- package/dist/server/setup.d.ts.map +1 -1
- package/dist/server/setup.js +141 -21
- package/dist/server/setup.js.map +1 -1
- package/dist/sync-agents.d.ts.map +1 -1
- package/dist/sync-agents.js +48 -3
- package/dist/sync-agents.js.map +1 -1
- package/dist/sync-commands.d.ts.map +1 -1
- package/dist/sync-commands.js +43 -3
- package/dist/sync-commands.js.map +1 -1
- package/dist/tools/constraints/actions/get.d.ts.map +1 -1
- package/dist/tools/constraints/actions/get.js +5 -8
- package/dist/tools/constraints/actions/get.js.map +1 -1
- package/dist/tools/constraints/help/help.d.ts.map +1 -1
- package/dist/tools/constraints/help/help.js +1 -6
- package/dist/tools/constraints/help/help.js.map +1 -1
- package/dist/tools/context/actions/get.d.ts.map +1 -1
- package/dist/tools/context/actions/get.js.map +1 -1
- package/dist/tools/context/actions/search-layer.d.ts.map +1 -1
- package/dist/tools/context/actions/search-layer.js +5 -3
- package/dist/tools/context/actions/search-layer.js.map +1 -1
- package/dist/tools/context/actions/set-from-policy.d.ts +2 -1
- package/dist/tools/context/actions/set-from-policy.d.ts.map +1 -1
- package/dist/tools/context/actions/set-from-policy.js.map +1 -1
- package/dist/tools/context/help/help.d.ts.map +1 -1
- package/dist/tools/context/help/help.js +1 -7
- package/dist/tools/context/help/help.js.map +1 -1
- package/dist/tools/context/internal/queries.d.ts.map +1 -1
- package/dist/tools/context/internal/queries.js +5 -2
- package/dist/tools/context/internal/queries.js.map +1 -1
- package/dist/tools/context/types.d.ts +1 -1
- package/dist/tools/context/types.d.ts.map +1 -1
- package/dist/tools/files/actions/get.d.ts.map +1 -1
- package/dist/tools/files/actions/get.js +4 -6
- package/dist/tools/files/actions/get.js.map +1 -1
- package/dist/tools/files/help/help.d.ts.map +1 -1
- package/dist/tools/files/help/help.js +1 -6
- package/dist/tools/files/help/help.js.map +1 -1
- package/dist/tools/suggest/help/constraint-help.d.ts.map +1 -1
- package/dist/tools/suggest/help/constraint-help.js +0 -2
- package/dist/tools/suggest/help/constraint-help.js.map +1 -1
- package/dist/tools/suggest/internal/constraint-queries.d.ts.map +1 -1
- package/dist/tools/suggest/internal/constraint-queries.js +12 -5
- package/dist/tools/suggest/internal/constraint-queries.js.map +1 -1
- package/dist/tools/suggest/internal/queries.js +2 -2
- package/dist/tools/suggest/internal/queries.js.map +1 -1
- package/dist/tools/tasks/help/help.d.ts.map +1 -1
- package/dist/tools/tasks/help/help.js +0 -6
- package/dist/tools/tasks/help/help.js.map +1 -1
- package/dist/tools/tasks/help/use-case.d.ts.map +1 -1
- package/dist/tools/tasks/help/use-case.js +0 -1
- package/dist/tools/tasks/help/use-case.js.map +1 -1
- package/dist/tools/tasks/watcher/status.d.ts.map +1 -1
- package/dist/tools/tasks/watcher/status.js +5 -1
- package/dist/tools/tasks/watcher/status.js.map +1 -1
- package/dist/types/decision/params.d.ts +7 -6
- package/dist/types/decision/params.d.ts.map +1 -1
- package/dist/types/decision/templates.d.ts +3 -2
- package/dist/types/decision/templates.d.ts.map +1 -1
- package/dist/types/view-entities.d.ts +2 -1
- package/dist/types/view-entities.d.ts.map +1 -1
- package/dist/types.d.ts +19 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/enum-converter.d.ts +72 -0
- package/dist/utils/enum-converter.d.ts.map +1 -0
- package/dist/utils/enum-converter.js +76 -0
- package/dist/utils/enum-converter.js.map +1 -0
- package/dist/utils/hook-queue.d.ts +81 -0
- package/dist/utils/hook-queue.d.ts.map +1 -0
- package/dist/utils/hook-queue.js +156 -0
- package/dist/utils/hook-queue.js.map +1 -0
- package/dist/utils/project-root.d.ts +9 -2
- package/dist/utils/project-root.d.ts.map +1 -1
- package/dist/utils/project-root.js +16 -2
- package/dist/utils/project-root.js.map +1 -1
- package/dist/utils/tag-parser.d.ts.map +1 -1
- package/dist/utils/tag-parser.js +6 -0
- package/dist/utils/tag-parser.js.map +1 -1
- package/dist/utils/universal-knex.js +3 -3
- package/dist/utils/universal-knex.js.map +1 -1
- package/dist/utils/validators.d.ts +1 -1
- package/dist/utils/validators.d.ts.map +1 -1
- package/dist/utils/validators.js +1 -1
- package/dist/utils/validators.js.map +1 -1
- package/dist/utils/vcs-adapter.d.ts +44 -0
- package/dist/utils/vcs-adapter.d.ts.map +1 -1
- package/dist/utils/vcs-adapter.js +88 -0
- package/dist/utils/vcs-adapter.js.map +1 -1
- package/dist/utils/view-queries.d.ts.map +1 -1
- package/dist/utils/view-queries.js +9 -19
- package/dist/utils/view-queries.js.map +1 -1
- package/dist/watcher/base-watcher.d.ts +69 -0
- package/dist/watcher/base-watcher.d.ts.map +1 -0
- package/dist/watcher/base-watcher.js +130 -0
- package/dist/watcher/base-watcher.js.map +1 -0
- package/dist/watcher/index.d.ts +3 -0
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js +2 -0
- package/dist/watcher/index.js.map +1 -1
- package/dist/watcher/queue-watcher.d.ts +64 -0
- package/dist/watcher/queue-watcher.d.ts.map +1 -0
- package/dist/watcher/queue-watcher.js +187 -0
- package/dist/watcher/queue-watcher.js.map +1 -0
- package/docs/ADR_CONCEPTS.md +140 -0
- package/docs/CONFIGURATION.md +922 -925
- package/docs/CROSS_DATABASE.md +153 -0
- package/docs/DATABASE_AUTH.md +70 -356
- package/docs/HOOKS_GUIDE.md +159 -0
- package/docs/SLASH_COMMANDS.md +329 -337
- package/docs/TASK_SYSTEM_DEPRECATED.md +88 -0
- package/docs/changelogs/CHANGELOG_ARCHIVE_v3.4_and_older.md +293 -296
- package/docs/cli/DATA_EXPORT_IMPORT.md +699 -700
- package/docs/cli/README.md +276 -277
- package/package.json +123 -124
- package/docs/ACCEPTANCE_CRITERIA.md +0 -625
- package/docs/AI_AGENT_GUIDE.md +0 -299
- package/docs/ARCHITECTURE.md +0 -167
- package/docs/AUTO_FILE_TRACKING.md +0 -841
- package/docs/BATCH_VALIDATION.md +0 -617
- package/docs/BEST_PRACTICES.md +0 -168
- package/docs/CONSTRAINT_INTELLIGENCE.md +0 -339
- package/docs/DECISION_CONTEXT.md +0 -697
- package/docs/DECISION_INTELLIGENCE.md +0 -605
- package/docs/GIT_AWARE_AUTO_COMPLETE.md +0 -646
- package/docs/MIGRATION_GUIDE_V3.9.0.md +0 -371
- package/docs/SHARED_CONCEPTS.md +0 -225
- package/docs/SPECIALIZED_AGENTS.md +0 -126
- package/docs/TASK_ACTIONS.md +0 -1177
- package/docs/TASK_OVERVIEW.md +0 -452
- package/docs/TASK_PRUNING.md +0 -594
- package/docs/TOOL_REFERENCE.md +0 -1077
- package/docs/TOOL_SELECTION.md +0 -83
- package/docs/WORKFLOWS.md +0 -941
package/docs/TASK_ACTIONS.md
DELETED
|
@@ -1,1177 +0,0 @@
|
|
|
1
|
-
# Task Actions Reference
|
|
2
|
-
|
|
3
|
-
**Version:** 4.0.0
|
|
4
|
-
**Last Updated:** 2025-11-27
|
|
5
|
-
|
|
6
|
-
## Table of Contents
|
|
7
|
-
|
|
8
|
-
1. [Overview](#overview)
|
|
9
|
-
2. [Action: create](#action-create)
|
|
10
|
-
3. [Action: update](#action-update)
|
|
11
|
-
4. [Action: get](#action-get)
|
|
12
|
-
5. [Action: list](#action-list)
|
|
13
|
-
6. [Action: move](#action-move)
|
|
14
|
-
7. [Action: link](#action-link)
|
|
15
|
-
8. [Action: archive](#action-archive)
|
|
16
|
-
9. [Action: create_batch](#action-create_batch)
|
|
17
|
-
10. [Action: add_dependency](#action-add_dependency) (NEW in 3.2.0)
|
|
18
|
-
11. [Action: remove_dependency](#action-remove_dependency) (NEW in 3.2.0)
|
|
19
|
-
12. [Action: get_dependencies](#action-get_dependencies) (NEW in 3.2.0)
|
|
20
|
-
13. [Action: help](#action-help)
|
|
21
|
-
14. [Best Practices](#best-practices)
|
|
22
|
-
15. [Common Errors](#common-errors)
|
|
23
|
-
16. [Related Documentation](#related-documentation)
|
|
24
|
-
|
|
25
|
-
## Overview
|
|
26
|
-
|
|
27
|
-
The `task` MCP tool provides 12 actions for managing tasks in the Kanban Task Watcher system. All actions require the `action` parameter.
|
|
28
|
-
|
|
29
|
-
**NEW in v3.2.0:** Task Dependencies - Manage blocking relationships between tasks with circular dependency detection.
|
|
30
|
-
|
|
31
|
-
**Action-Based API Pattern:**
|
|
32
|
-
```javascript
|
|
33
|
-
{
|
|
34
|
-
action: "create", // Required: specifies which action to execute
|
|
35
|
-
// ... action-specific parameters
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Action: create
|
|
40
|
-
|
|
41
|
-
Create a new task.
|
|
42
|
-
|
|
43
|
-
### Parameters
|
|
44
|
-
|
|
45
|
-
**Required:**
|
|
46
|
-
- `action`: "create"
|
|
47
|
-
- `title`: Task title (string)
|
|
48
|
-
|
|
49
|
-
**Optional:**
|
|
50
|
-
- `description`: Full task description (string)
|
|
51
|
-
- `status`: Initial status (string: "todo", "in_progress", "waiting_review", "blocked", "done", "archived", "rejected") - default: "todo"
|
|
52
|
-
- `priority`: Priority level (string: "low", "medium", "high", "critical")
|
|
53
|
-
- `assignee`: User or agent assigned (string)
|
|
54
|
-
- `tags`: Array of tags (string[])
|
|
55
|
-
- `layer`: Architecture layer (string: "presentation", "business", "data", "infrastructure", "cross-cutting", "documentation", "planning", "coordination", "review")
|
|
56
|
-
|
|
57
|
-
### Examples
|
|
58
|
-
|
|
59
|
-
**Minimal Task:**
|
|
60
|
-
```javascript
|
|
61
|
-
{
|
|
62
|
-
action: "create",
|
|
63
|
-
title: "Implement JWT authentication"
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**Complete Task:**
|
|
68
|
-
```javascript
|
|
69
|
-
{
|
|
70
|
-
action: "create",
|
|
71
|
-
title: "Implement JWT authentication",
|
|
72
|
-
description: "Add JWT-based authentication with refresh tokens",
|
|
73
|
-
status: "todo",
|
|
74
|
-
priority: "high",
|
|
75
|
-
assignee: "dev-team-1",
|
|
76
|
-
tags: ["security", "authentication"],
|
|
77
|
-
layer: "business"
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Task with Multiple Tags:**
|
|
82
|
-
```javascript
|
|
83
|
-
{
|
|
84
|
-
action: "create",
|
|
85
|
-
title: "Optimize database queries",
|
|
86
|
-
description: "Improve query performance for user listings",
|
|
87
|
-
priority: "medium",
|
|
88
|
-
tags: ["performance", "database", "optimization"],
|
|
89
|
-
layer: "data"
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Response
|
|
94
|
-
|
|
95
|
-
```javascript
|
|
96
|
-
{
|
|
97
|
-
task_id: 1,
|
|
98
|
-
message: "Task created successfully"
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Action: update
|
|
103
|
-
|
|
104
|
-
Update existing task fields.
|
|
105
|
-
|
|
106
|
-
### Parameters
|
|
107
|
-
|
|
108
|
-
**Required:**
|
|
109
|
-
- `action`: "update"
|
|
110
|
-
- `task_id`: Task ID (number)
|
|
111
|
-
|
|
112
|
-
**Optional (at least one required):**
|
|
113
|
-
- `title`: New title (string)
|
|
114
|
-
- `status`: New status (string) - bypasses validation, use `move` instead
|
|
115
|
-
- `description`: New description (string)
|
|
116
|
-
- `priority`: New priority (string)
|
|
117
|
-
- `assignee`: New assignee (string)
|
|
118
|
-
- `tags`: New tags array (string[]) - replaces existing tags
|
|
119
|
-
- `layer`: New layer (string)
|
|
120
|
-
|
|
121
|
-
### Examples
|
|
122
|
-
|
|
123
|
-
**Update Description:**
|
|
124
|
-
```javascript
|
|
125
|
-
{
|
|
126
|
-
action: "update",
|
|
127
|
-
task_id: 1,
|
|
128
|
-
description: "Updated requirements: Add OAuth2 support"
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**Update Priority:**
|
|
133
|
-
```javascript
|
|
134
|
-
{
|
|
135
|
-
action: "update",
|
|
136
|
-
task_id: 1,
|
|
137
|
-
priority: "critical"
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**Update Multiple Fields:**
|
|
142
|
-
```javascript
|
|
143
|
-
{
|
|
144
|
-
action: "update",
|
|
145
|
-
task_id: 1,
|
|
146
|
-
description: "Add OAuth2 and SAML support",
|
|
147
|
-
priority: "critical",
|
|
148
|
-
tags: ["security", "authentication", "oauth2", "saml"]
|
|
149
|
-
}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
**Reassign Task:**
|
|
153
|
-
```javascript
|
|
154
|
-
{
|
|
155
|
-
action: "update",
|
|
156
|
-
task_id: 1,
|
|
157
|
-
assignee: "lead-dev",
|
|
158
|
-
priority: "high"
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Response
|
|
163
|
-
|
|
164
|
-
```javascript
|
|
165
|
-
{
|
|
166
|
-
success: true,
|
|
167
|
-
message: "Task updated successfully"
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Important Notes
|
|
172
|
-
|
|
173
|
-
- Use `move` action for status changes (validates transitions)
|
|
174
|
-
- `update` bypasses state machine validation
|
|
175
|
-
- Updating `tags` replaces all existing tags (not append)
|
|
176
|
-
|
|
177
|
-
## Action: get
|
|
178
|
-
|
|
179
|
-
Get single task with full details.
|
|
180
|
-
|
|
181
|
-
### Parameters
|
|
182
|
-
|
|
183
|
-
**Required:**
|
|
184
|
-
- `action`: "get"
|
|
185
|
-
- `task_id`: Task ID (number)
|
|
186
|
-
|
|
187
|
-
**Optional (NEW in 3.2.0):**
|
|
188
|
-
- `include_dependencies`: Include dependency arrays (boolean) - default: false
|
|
189
|
-
|
|
190
|
-
### Examples
|
|
191
|
-
|
|
192
|
-
**Basic Get:**
|
|
193
|
-
```javascript
|
|
194
|
-
{
|
|
195
|
-
action: "get",
|
|
196
|
-
task_id: 1
|
|
197
|
-
}
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
**Get with Dependencies:**
|
|
201
|
-
```javascript
|
|
202
|
-
{
|
|
203
|
-
action: "get",
|
|
204
|
-
task_id: 1,
|
|
205
|
-
include_dependencies: true
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### Response
|
|
210
|
-
|
|
211
|
-
**Without Dependencies:**
|
|
212
|
-
```javascript
|
|
213
|
-
{
|
|
214
|
-
task_id: 1,
|
|
215
|
-
title: "Implement JWT authentication",
|
|
216
|
-
description: "Add JWT-based authentication with refresh tokens",
|
|
217
|
-
status: "in_progress",
|
|
218
|
-
priority: "high",
|
|
219
|
-
assignee: "auth-agent",
|
|
220
|
-
layer: "business",
|
|
221
|
-
tags: ["security", "authentication"],
|
|
222
|
-
created_ts: 1697545200,
|
|
223
|
-
updated_ts: 1697545800,
|
|
224
|
-
decision_links: ["auth_method", "jwt_secret"],
|
|
225
|
-
constraint_links: [5],
|
|
226
|
-
file_links: ["/src/auth/jwt.ts", "/src/auth/middleware.ts"]
|
|
227
|
-
}
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
**With Dependencies (NEW in 3.2.0):**
|
|
231
|
-
```javascript
|
|
232
|
-
{
|
|
233
|
-
task_id: 1,
|
|
234
|
-
title: "Implement JWT authentication",
|
|
235
|
-
description: "Add JWT-based authentication with refresh tokens",
|
|
236
|
-
// ... other fields ...
|
|
237
|
-
dependencies: {
|
|
238
|
-
blockers: [3, 5], // Tasks blocking this task
|
|
239
|
-
blocking: [2, 7] // Tasks this task blocks
|
|
240
|
-
},
|
|
241
|
-
decision_links: ["auth_method", "jwt_secret"],
|
|
242
|
-
constraint_links: [5],
|
|
243
|
-
file_links: ["/src/auth/jwt.ts", "/src/auth/middleware.ts"]
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### Token Efficiency
|
|
248
|
-
|
|
249
|
-
- **~332 bytes/task** (includes description and links)
|
|
250
|
-
- Use `list` for browsing, `get` only when details needed
|
|
251
|
-
|
|
252
|
-
## Action: list
|
|
253
|
-
|
|
254
|
-
List tasks with filtering (metadata only, no descriptions).
|
|
255
|
-
|
|
256
|
-
### Parameters
|
|
257
|
-
|
|
258
|
-
**Required:**
|
|
259
|
-
- `action`: "list"
|
|
260
|
-
|
|
261
|
-
**Optional:**
|
|
262
|
-
- `status`: Filter by status (string)
|
|
263
|
-
- `priority`: Filter by priority (string)
|
|
264
|
-
- `assignee`: Filter by assignee (string)
|
|
265
|
-
- `tags`: Filter by tags (string[])
|
|
266
|
-
- `layer`: Filter by layer (string)
|
|
267
|
-
- `limit`: Maximum results (number) - default: 100
|
|
268
|
-
- `include_dependency_counts`: Include dependency counts (boolean) - default: false (NEW in 3.2.0)
|
|
269
|
-
|
|
270
|
-
### Examples
|
|
271
|
-
|
|
272
|
-
**List All Tasks:**
|
|
273
|
-
```javascript
|
|
274
|
-
{
|
|
275
|
-
action: "list"
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
**Filter by Status:**
|
|
280
|
-
```javascript
|
|
281
|
-
{
|
|
282
|
-
action: "list",
|
|
283
|
-
status: "in_progress"
|
|
284
|
-
}
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
**Filter by Assignee:**
|
|
288
|
-
```javascript
|
|
289
|
-
{
|
|
290
|
-
action: "list",
|
|
291
|
-
assignee: "dev-team-1"
|
|
292
|
-
}
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
**Multiple Filters:**
|
|
296
|
-
```javascript
|
|
297
|
-
{
|
|
298
|
-
action: "list",
|
|
299
|
-
status: "in_progress",
|
|
300
|
-
assignee: "auth-agent",
|
|
301
|
-
tags: ["security"],
|
|
302
|
-
priority: "high"
|
|
303
|
-
}
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**Limit Results:**
|
|
307
|
-
```javascript
|
|
308
|
-
{
|
|
309
|
-
action: "list",
|
|
310
|
-
status: "todo",
|
|
311
|
-
limit: 20
|
|
312
|
-
}
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
**With Dependency Counts (NEW in 3.2.0):**
|
|
316
|
-
```javascript
|
|
317
|
-
{
|
|
318
|
-
action: "list",
|
|
319
|
-
status: "in_progress",
|
|
320
|
-
include_dependency_counts: true
|
|
321
|
-
}
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
### Response
|
|
325
|
-
|
|
326
|
-
**Without Dependency Counts:**
|
|
327
|
-
```javascript
|
|
328
|
-
{
|
|
329
|
-
tasks: [
|
|
330
|
-
{
|
|
331
|
-
task_id: 1,
|
|
332
|
-
title: "Implement JWT authentication",
|
|
333
|
-
status_name: "in_progress",
|
|
334
|
-
priority_name: "high",
|
|
335
|
-
assignee: "dev-team-1",
|
|
336
|
-
layer_name: "business",
|
|
337
|
-
tags: "security,authentication",
|
|
338
|
-
created_ts: 1697545200,
|
|
339
|
-
updated_ts: 1697545800
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
task_id: 2,
|
|
343
|
-
title: "Setup OAuth2 provider",
|
|
344
|
-
status_name: "in_progress",
|
|
345
|
-
priority_name: "high",
|
|
346
|
-
assignee: "dev-team-1",
|
|
347
|
-
layer_name: "business",
|
|
348
|
-
tags: "security,oauth2",
|
|
349
|
-
created_ts: 1697545300,
|
|
350
|
-
updated_ts: 1697545900
|
|
351
|
-
}
|
|
352
|
-
],
|
|
353
|
-
count: 2,
|
|
354
|
-
stale_tasks_transitioned: 0
|
|
355
|
-
}
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
**With Dependency Counts (NEW in 3.2.0):**
|
|
359
|
-
```javascript
|
|
360
|
-
{
|
|
361
|
-
tasks: [
|
|
362
|
-
{
|
|
363
|
-
task_id: 1,
|
|
364
|
-
title: "Implement JWT authentication",
|
|
365
|
-
status_name: "in_progress",
|
|
366
|
-
priority_name: "high",
|
|
367
|
-
assignee: "dev-team-1",
|
|
368
|
-
layer_name: "business",
|
|
369
|
-
tags: "security,authentication",
|
|
370
|
-
created_ts: 1697545200,
|
|
371
|
-
updated_ts: 1697545800,
|
|
372
|
-
blocked_by_count: 0, // Nothing blocks this task
|
|
373
|
-
blocking_count: 2 // This blocks 2 tasks
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
task_id: 2,
|
|
377
|
-
title: "Setup OAuth2 provider",
|
|
378
|
-
status_name: "in_progress",
|
|
379
|
-
priority_name: "high",
|
|
380
|
-
assignee: "dev-team-1",
|
|
381
|
-
layer_name: "business",
|
|
382
|
-
tags: "security,oauth2",
|
|
383
|
-
created_ts: 1697545300,
|
|
384
|
-
updated_ts: 1697545900,
|
|
385
|
-
blocked_by_count: 1, // 1 task blocks this
|
|
386
|
-
blocking_count: 0 // This doesn't block anything
|
|
387
|
-
}
|
|
388
|
-
],
|
|
389
|
-
count: 2,
|
|
390
|
-
stale_tasks_transitioned: 0
|
|
391
|
-
}
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
### Token Efficiency
|
|
395
|
-
|
|
396
|
-
- **~100 bytes/task** (metadata only)
|
|
397
|
-
- **70% reduction** vs full task with description
|
|
398
|
-
- Auto-stale detection runs before list
|
|
399
|
-
- Returns `stale_tasks_transitioned` count
|
|
400
|
-
|
|
401
|
-
## Action: move
|
|
402
|
-
|
|
403
|
-
Move task to new status with validation.
|
|
404
|
-
|
|
405
|
-
### Parameters
|
|
406
|
-
|
|
407
|
-
**Required:**
|
|
408
|
-
- `action`: "move"
|
|
409
|
-
- `task_id`: Task ID (number)
|
|
410
|
-
- `status`: Target status (string: "todo", "in_progress", "waiting_review", "blocked", "done", "archived", "rejected")
|
|
411
|
-
|
|
412
|
-
**Optional:**
|
|
413
|
-
- `rejection_reason`: Reason for rejection (string, only when status="rejected")
|
|
414
|
-
|
|
415
|
-
### Examples
|
|
416
|
-
|
|
417
|
-
**Move to Waiting Review:**
|
|
418
|
-
```javascript
|
|
419
|
-
{
|
|
420
|
-
action: "move",
|
|
421
|
-
task_id: 1,
|
|
422
|
-
status: "waiting_review"
|
|
423
|
-
}
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
**Move to Blocked:**
|
|
427
|
-
```javascript
|
|
428
|
-
{
|
|
429
|
-
action: "move",
|
|
430
|
-
task_id: 1,
|
|
431
|
-
status: "blocked"
|
|
432
|
-
}
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
**Move to Done:**
|
|
436
|
-
```javascript
|
|
437
|
-
{
|
|
438
|
-
action: "move",
|
|
439
|
-
task_id: 1,
|
|
440
|
-
status: "done"
|
|
441
|
-
}
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
**Move to Rejected (v4.1.0):**
|
|
445
|
-
```javascript
|
|
446
|
-
{
|
|
447
|
-
action: "move",
|
|
448
|
-
task_id: 1,
|
|
449
|
-
status: "rejected",
|
|
450
|
-
rejection_reason: "Requirements changed"
|
|
451
|
-
}
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
### Response (Success)
|
|
455
|
-
|
|
456
|
-
```javascript
|
|
457
|
-
{
|
|
458
|
-
success: true,
|
|
459
|
-
message: "Task moved from in_progress to waiting_review"
|
|
460
|
-
}
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
### Response (Invalid Transition)
|
|
464
|
-
|
|
465
|
-
```javascript
|
|
466
|
-
{
|
|
467
|
-
error: "Invalid status transition from archived to todo. Terminal statuses cannot transition."
|
|
468
|
-
}
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
### State Machine Validation (v4.1.0 - Relaxed Rules)
|
|
472
|
-
|
|
473
|
-
**Valid Transitions:**
|
|
474
|
-
|
|
475
|
-
| Status Type | Statuses | Can Transition To |
|
|
476
|
-
|-------------|----------|-------------------|
|
|
477
|
-
| **Non-terminal** | todo, in_progress, waiting_review, blocked, done | Any status |
|
|
478
|
-
| **Terminal** | archived, rejected | None |
|
|
479
|
-
|
|
480
|
-
- Non-terminal statuses can freely transition to any other status
|
|
481
|
-
- Terminal statuses (`archived`, `rejected`) cannot transition
|
|
482
|
-
- `rejected` accepts optional `rejection_reason` parameter
|
|
483
|
-
|
|
484
|
-
**Auto-Stale Detection:**
|
|
485
|
-
- Runs before move operation
|
|
486
|
-
- Returns `stale_tasks_transitioned` count
|
|
487
|
-
|
|
488
|
-
## Action: link
|
|
489
|
-
|
|
490
|
-
Link task to decision, constraint, or file.
|
|
491
|
-
|
|
492
|
-
### Parameters
|
|
493
|
-
|
|
494
|
-
**Required:**
|
|
495
|
-
- `action`: "link"
|
|
496
|
-
- `task_id`: Task ID (number)
|
|
497
|
-
- `link_type`: Link type (string: "decision", "constraint", "file")
|
|
498
|
-
|
|
499
|
-
**Type-Specific Required Parameters:**
|
|
500
|
-
- `link_type="decision"`: `link_key` (string) - Decision key
|
|
501
|
-
- `link_type="constraint"`: `link_id` (number) - Constraint ID
|
|
502
|
-
- `link_type="file"`: `link_path` (string) - File path
|
|
503
|
-
|
|
504
|
-
### Examples
|
|
505
|
-
|
|
506
|
-
**Link to Decision:**
|
|
507
|
-
```javascript
|
|
508
|
-
{
|
|
509
|
-
action: "link",
|
|
510
|
-
task_id: 1,
|
|
511
|
-
link_type: "decision",
|
|
512
|
-
link_key: "auth_method"
|
|
513
|
-
}
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
**Link to Constraint:**
|
|
517
|
-
```javascript
|
|
518
|
-
{
|
|
519
|
-
action: "link",
|
|
520
|
-
task_id: 1,
|
|
521
|
-
link_type: "constraint",
|
|
522
|
-
link_id: 5
|
|
523
|
-
}
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
**Link to File:**
|
|
527
|
-
```javascript
|
|
528
|
-
{
|
|
529
|
-
action: "link",
|
|
530
|
-
task_id: 1,
|
|
531
|
-
link_type: "file",
|
|
532
|
-
link_path: "/src/auth/jwt.ts"
|
|
533
|
-
}
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
**Multiple Links:**
|
|
537
|
-
```javascript
|
|
538
|
-
// Link to decision
|
|
539
|
-
{
|
|
540
|
-
action: "link",
|
|
541
|
-
task_id: 1,
|
|
542
|
-
link_type: "decision",
|
|
543
|
-
link_key: "auth_method"
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
// Link to constraint
|
|
547
|
-
{
|
|
548
|
-
action: "link",
|
|
549
|
-
task_id: 1,
|
|
550
|
-
link_type: "constraint",
|
|
551
|
-
link_id: 5
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
// Link to file
|
|
555
|
-
{
|
|
556
|
-
action: "link",
|
|
557
|
-
task_id: 1,
|
|
558
|
-
link_type: "file",
|
|
559
|
-
link_path: "/src/auth/jwt.ts"
|
|
560
|
-
}
|
|
561
|
-
```
|
|
562
|
-
|
|
563
|
-
### Response
|
|
564
|
-
|
|
565
|
-
```javascript
|
|
566
|
-
{
|
|
567
|
-
success: true,
|
|
568
|
-
message: "Task linked to decision 'auth_method'"
|
|
569
|
-
}
|
|
570
|
-
```
|
|
571
|
-
|
|
572
|
-
**Linking Strategies:** Use decision links for architectural context, constraint links for requirements tracking, and file links for code traceability.
|
|
573
|
-
|
|
574
|
-
## Action: archive
|
|
575
|
-
|
|
576
|
-
Archive completed task (soft delete).
|
|
577
|
-
|
|
578
|
-
**Note:** Tasks in `done` status are automatically archived after 48 hours (configurable via `auto_archive_done_days`). Manual archiving is useful for immediate archival needs.
|
|
579
|
-
|
|
580
|
-
### Parameters
|
|
581
|
-
|
|
582
|
-
**Required:**
|
|
583
|
-
- `action`: "archive"
|
|
584
|
-
- `task_id`: Task ID (number)
|
|
585
|
-
|
|
586
|
-
### Example
|
|
587
|
-
|
|
588
|
-
**Manual Archive:**
|
|
589
|
-
```javascript
|
|
590
|
-
{
|
|
591
|
-
action: "archive",
|
|
592
|
-
task_id: 1
|
|
593
|
-
}
|
|
594
|
-
```
|
|
595
|
-
|
|
596
|
-
**Auto-Archive Configuration:**
|
|
597
|
-
```javascript
|
|
598
|
-
// Change auto-archive threshold (via config tool)
|
|
599
|
-
{
|
|
600
|
-
action: "update",
|
|
601
|
-
auto_archive_done_days: "3" // Archive after 3 days instead of default 2 days
|
|
602
|
-
}
|
|
603
|
-
```
|
|
604
|
-
|
|
605
|
-
### Response (Success)
|
|
606
|
-
|
|
607
|
-
```javascript
|
|
608
|
-
{
|
|
609
|
-
success: true,
|
|
610
|
-
message: "Task archived successfully"
|
|
611
|
-
}
|
|
612
|
-
```
|
|
613
|
-
|
|
614
|
-
### Response (Error)
|
|
615
|
-
|
|
616
|
-
```javascript
|
|
617
|
-
{
|
|
618
|
-
error: "Cannot archive task not in done status"
|
|
619
|
-
}
|
|
620
|
-
```
|
|
621
|
-
|
|
622
|
-
### Important Notes
|
|
623
|
-
|
|
624
|
-
- Only tasks with `status="done"` can be archived
|
|
625
|
-
- Archived tasks have `status="archived"` (terminal state)
|
|
626
|
-
- Use `move` to transition to `done` first if needed
|
|
627
|
-
|
|
628
|
-
**Workflow:**
|
|
629
|
-
```javascript
|
|
630
|
-
// 1. Complete task
|
|
631
|
-
{ action: "move", task_id: 1, status: "done" }
|
|
632
|
-
|
|
633
|
-
// 2. Archive task
|
|
634
|
-
{ action: "archive", task_id: 1 }
|
|
635
|
-
```
|
|
636
|
-
|
|
637
|
-
## Action: create_batch
|
|
638
|
-
|
|
639
|
-
Create multiple tasks atomically or best-effort.
|
|
640
|
-
|
|
641
|
-
### Parameters
|
|
642
|
-
|
|
643
|
-
**Required:**
|
|
644
|
-
- `action`: "create_batch"
|
|
645
|
-
- `tasks`: Array of task objects (max 50)
|
|
646
|
-
|
|
647
|
-
**Optional:**
|
|
648
|
-
- `atomic`: Boolean (default: true) - All-or-nothing vs best-effort mode
|
|
649
|
-
|
|
650
|
-
### Examples
|
|
651
|
-
|
|
652
|
-
**Atomic Batch (All-or-Nothing):**
|
|
653
|
-
```javascript
|
|
654
|
-
{
|
|
655
|
-
action: "create_batch",
|
|
656
|
-
tasks: [
|
|
657
|
-
{
|
|
658
|
-
title: "Setup database schema",
|
|
659
|
-
status: "todo",
|
|
660
|
-
priority: "high",
|
|
661
|
-
assignee: "dev-team-1"
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
title: "Implement API endpoints",
|
|
665
|
-
status: "todo",
|
|
666
|
-
priority: "medium",
|
|
667
|
-
assignee: "dev-team-2"
|
|
668
|
-
}
|
|
669
|
-
],
|
|
670
|
-
atomic: true // All succeed or all fail
|
|
671
|
-
}
|
|
672
|
-
```
|
|
673
|
-
|
|
674
|
-
**Best-Effort Batch (Recommended for AI):**
|
|
675
|
-
```javascript
|
|
676
|
-
{
|
|
677
|
-
action: "create_batch",
|
|
678
|
-
tasks: [
|
|
679
|
-
{
|
|
680
|
-
title: "Setup database schema",
|
|
681
|
-
status: "todo",
|
|
682
|
-
priority: "high",
|
|
683
|
-
assignee: "dev-team-1",
|
|
684
|
-
tags: ["database", "setup"]
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
title: "Implement API endpoints",
|
|
688
|
-
status: "todo",
|
|
689
|
-
priority: "medium",
|
|
690
|
-
assignee: "dev-team-2",
|
|
691
|
-
tags: ["api", "development"]
|
|
692
|
-
},
|
|
693
|
-
{
|
|
694
|
-
title: "Write integration tests",
|
|
695
|
-
status: "todo",
|
|
696
|
-
priority: "low",
|
|
697
|
-
assignee: "dev-team-3",
|
|
698
|
-
tags: ["testing", "qa"]
|
|
699
|
-
}
|
|
700
|
-
],
|
|
701
|
-
atomic: false // Allows partial success
|
|
702
|
-
}
|
|
703
|
-
```
|
|
704
|
-
|
|
705
|
-
### Response (Atomic=true, Success)
|
|
706
|
-
|
|
707
|
-
```javascript
|
|
708
|
-
{
|
|
709
|
-
success: true,
|
|
710
|
-
created_count: 2,
|
|
711
|
-
task_ids: [1, 2]
|
|
712
|
-
}
|
|
713
|
-
```
|
|
714
|
-
|
|
715
|
-
### Response (Atomic=false, Partial Success)
|
|
716
|
-
|
|
717
|
-
```javascript
|
|
718
|
-
{
|
|
719
|
-
success: true,
|
|
720
|
-
created_count: 2,
|
|
721
|
-
failed_count: 1,
|
|
722
|
-
task_ids: [1, 2],
|
|
723
|
-
errors: ["Task 3: Invalid priority 'ultra-high'"]
|
|
724
|
-
}
|
|
725
|
-
```
|
|
726
|
-
|
|
727
|
-
### Important Notes
|
|
728
|
-
|
|
729
|
-
- **Max 50 tasks** per batch
|
|
730
|
-
- **Atomic mode (true):** Transaction fails if any task fails
|
|
731
|
-
- **Best-effort mode (false):** Partial success allowed (recommended for AI)
|
|
732
|
-
- Each task follows same schema as `create` action
|
|
733
|
-
|
|
734
|
-
## Action: add_dependency
|
|
735
|
-
|
|
736
|
-
Add a blocking relationship between two tasks (NEW in 3.2.0).
|
|
737
|
-
|
|
738
|
-
### Parameters
|
|
739
|
-
|
|
740
|
-
**Required:**
|
|
741
|
-
- `action`: "add_dependency"
|
|
742
|
-
- `blocker_task_id`: Task ID that blocks (number)
|
|
743
|
-
- `blocked_task_id`: Task ID that is blocked (number)
|
|
744
|
-
|
|
745
|
-
### Validations
|
|
746
|
-
|
|
747
|
-
- No self-dependencies (task cannot block itself)
|
|
748
|
-
- No circular dependencies (direct or transitive)
|
|
749
|
-
- Both tasks must exist
|
|
750
|
-
- Neither task can be archived
|
|
751
|
-
|
|
752
|
-
### Examples
|
|
753
|
-
|
|
754
|
-
**Basic Dependency:**
|
|
755
|
-
```javascript
|
|
756
|
-
{
|
|
757
|
-
action: "add_dependency",
|
|
758
|
-
blocker_task_id: 1,
|
|
759
|
-
blocked_task_id: 2
|
|
760
|
-
}
|
|
761
|
-
```
|
|
762
|
-
|
|
763
|
-
**Sequential Workflow:**
|
|
764
|
-
```javascript
|
|
765
|
-
// Task #1: Implement auth (must complete first)
|
|
766
|
-
// Task #2: Add profile page (depends on auth)
|
|
767
|
-
|
|
768
|
-
{
|
|
769
|
-
action: "add_dependency",
|
|
770
|
-
blocker_task_id: 1,
|
|
771
|
-
blocked_task_id: 2
|
|
772
|
-
}
|
|
773
|
-
```
|
|
774
|
-
|
|
775
|
-
### Response
|
|
776
|
-
|
|
777
|
-
```javascript
|
|
778
|
-
{
|
|
779
|
-
success: true,
|
|
780
|
-
message: "Dependency added: Task #1 blocks Task #2"
|
|
781
|
-
}
|
|
782
|
-
```
|
|
783
|
-
|
|
784
|
-
### Error Examples
|
|
785
|
-
|
|
786
|
-
**Self-Dependency:**
|
|
787
|
-
```javascript
|
|
788
|
-
{
|
|
789
|
-
action: "add_dependency",
|
|
790
|
-
blocker_task_id: 1,
|
|
791
|
-
blocked_task_id: 1
|
|
792
|
-
}
|
|
793
|
-
// Error: "Self-dependency not allowed"
|
|
794
|
-
```
|
|
795
|
-
|
|
796
|
-
**Circular Dependency:**
|
|
797
|
-
```javascript
|
|
798
|
-
// Existing: Task #1 blocks Task #2
|
|
799
|
-
|
|
800
|
-
{
|
|
801
|
-
action: "add_dependency",
|
|
802
|
-
blocker_task_id: 2,
|
|
803
|
-
blocked_task_id: 1
|
|
804
|
-
}
|
|
805
|
-
// Error: "Circular dependency detected: Task #2 already blocks Task #1"
|
|
806
|
-
```
|
|
807
|
-
|
|
808
|
-
**Archived Task:**
|
|
809
|
-
```javascript
|
|
810
|
-
{
|
|
811
|
-
action: "add_dependency",
|
|
812
|
-
blocker_task_id: 10, // archived
|
|
813
|
-
blocked_task_id: 2
|
|
814
|
-
}
|
|
815
|
-
// Error: "Cannot add dependency: Task #10 is archived"
|
|
816
|
-
```
|
|
817
|
-
|
|
818
|
-
### Notes
|
|
819
|
-
|
|
820
|
-
- Uses recursive CTE for transitive cycle detection
|
|
821
|
-
- Depth limit: 100 levels
|
|
822
|
-
- CASCADE deletion: Dependencies auto-delete when tasks are deleted
|
|
823
|
-
|
|
824
|
-
## Action: remove_dependency
|
|
825
|
-
|
|
826
|
-
Remove a blocking relationship between two tasks (NEW in 3.2.0).
|
|
827
|
-
|
|
828
|
-
### Parameters
|
|
829
|
-
|
|
830
|
-
**Required:**
|
|
831
|
-
- `action`: "remove_dependency"
|
|
832
|
-
- `blocker_task_id`: Task ID that blocks (number)
|
|
833
|
-
- `blocked_task_id`: Task ID that is blocked (number)
|
|
834
|
-
|
|
835
|
-
### Example
|
|
836
|
-
|
|
837
|
-
```javascript
|
|
838
|
-
{
|
|
839
|
-
action: "remove_dependency",
|
|
840
|
-
blocker_task_id: 1,
|
|
841
|
-
blocked_task_id: 2
|
|
842
|
-
}
|
|
843
|
-
```
|
|
844
|
-
|
|
845
|
-
### Response
|
|
846
|
-
|
|
847
|
-
```javascript
|
|
848
|
-
{
|
|
849
|
-
success: true,
|
|
850
|
-
message: "Dependency removed: Task #1 no longer blocks Task #2"
|
|
851
|
-
}
|
|
852
|
-
```
|
|
853
|
-
|
|
854
|
-
### Notes
|
|
855
|
-
|
|
856
|
-
- Idempotent: Succeeds silently if dependency doesn't exist
|
|
857
|
-
- Use when task completed early or requirements changed
|
|
858
|
-
- Unblocks dependent tasks
|
|
859
|
-
|
|
860
|
-
## Action: get_dependencies
|
|
861
|
-
|
|
862
|
-
Query dependencies for a task bidirectionally (NEW in 3.2.0).
|
|
863
|
-
|
|
864
|
-
### Parameters
|
|
865
|
-
|
|
866
|
-
**Required:**
|
|
867
|
-
- `action`: "get_dependencies"
|
|
868
|
-
- `task_id`: Task to query dependencies for (number)
|
|
869
|
-
|
|
870
|
-
**Optional:**
|
|
871
|
-
- `include_details`: Include full task metadata (boolean) - default: false
|
|
872
|
-
|
|
873
|
-
### Examples
|
|
874
|
-
|
|
875
|
-
**Metadata-Only (Recommended):**
|
|
876
|
-
```javascript
|
|
877
|
-
{
|
|
878
|
-
action: "get_dependencies",
|
|
879
|
-
task_id: 2
|
|
880
|
-
}
|
|
881
|
-
```
|
|
882
|
-
|
|
883
|
-
**With Full Details:**
|
|
884
|
-
```javascript
|
|
885
|
-
{
|
|
886
|
-
action: "get_dependencies",
|
|
887
|
-
task_id: 2,
|
|
888
|
-
include_details: true
|
|
889
|
-
}
|
|
890
|
-
```
|
|
891
|
-
|
|
892
|
-
### Response
|
|
893
|
-
|
|
894
|
-
**Metadata-Only:**
|
|
895
|
-
```javascript
|
|
896
|
-
{
|
|
897
|
-
task_id: 2,
|
|
898
|
-
blockers: [1, 3], // Task IDs only (~30 bytes)
|
|
899
|
-
blocking: [5, 7]
|
|
900
|
-
}
|
|
901
|
-
```
|
|
902
|
-
|
|
903
|
-
**With Details:**
|
|
904
|
-
```javascript
|
|
905
|
-
{
|
|
906
|
-
task_id: 2,
|
|
907
|
-
blockers: [
|
|
908
|
-
{
|
|
909
|
-
task_id: 1,
|
|
910
|
-
title: "Implement JWT authentication",
|
|
911
|
-
status: "in_progress",
|
|
912
|
-
priority: "high"
|
|
913
|
-
},
|
|
914
|
-
{
|
|
915
|
-
task_id: 3,
|
|
916
|
-
title: "Design user schema",
|
|
917
|
-
status: "done",
|
|
918
|
-
priority: "medium"
|
|
919
|
-
}
|
|
920
|
-
],
|
|
921
|
-
blocking: [
|
|
922
|
-
{
|
|
923
|
-
task_id: 5,
|
|
924
|
-
title: "Add profile page",
|
|
925
|
-
status: "todo",
|
|
926
|
-
priority: "medium"
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
task_id: 7,
|
|
930
|
-
title: "Add settings page",
|
|
931
|
-
status: "todo",
|
|
932
|
-
priority: "low"
|
|
933
|
-
}
|
|
934
|
-
]
|
|
935
|
-
}
|
|
936
|
-
```
|
|
937
|
-
|
|
938
|
-
### Token Efficiency
|
|
939
|
-
|
|
940
|
-
- **Metadata-only:** ~30 bytes (IDs only)
|
|
941
|
-
- **With details:** ~250 bytes per task
|
|
942
|
-
- **Savings:** ~88% token reduction with metadata approach
|
|
943
|
-
|
|
944
|
-
### Use Cases
|
|
945
|
-
|
|
946
|
-
- Find what's blocking a task (`blockers`)
|
|
947
|
-
- Find what's waiting for a task (`blocking`)
|
|
948
|
-
- Identify bottlenecks (high `blocking` count)
|
|
949
|
-
- Plan work order
|
|
950
|
-
|
|
951
|
-
## Action: help
|
|
952
|
-
|
|
953
|
-
Get comprehensive on-demand documentation.
|
|
954
|
-
|
|
955
|
-
### Parameters
|
|
956
|
-
|
|
957
|
-
**Required:**
|
|
958
|
-
- `action`: "help"
|
|
959
|
-
|
|
960
|
-
### Example
|
|
961
|
-
|
|
962
|
-
```javascript
|
|
963
|
-
{
|
|
964
|
-
action: "help"
|
|
965
|
-
}
|
|
966
|
-
```
|
|
967
|
-
|
|
968
|
-
### Response
|
|
969
|
-
|
|
970
|
-
Returns complete tool documentation including:
|
|
971
|
-
- Parameter matrices for all actions
|
|
972
|
-
- Examples for each action
|
|
973
|
-
- Status transition rules
|
|
974
|
-
- Token efficiency tips
|
|
975
|
-
- Common errors and solutions
|
|
976
|
-
|
|
977
|
-
## Best Practices
|
|
978
|
-
|
|
979
|
-
### For AI Agents
|
|
980
|
-
|
|
981
|
-
**1. Always Use `action` Parameter**
|
|
982
|
-
```javascript
|
|
983
|
-
// ❌ WRONG
|
|
984
|
-
{ task_id: 1 }
|
|
985
|
-
|
|
986
|
-
// ✅ CORRECT
|
|
987
|
-
{ action: "get", task_id: 1 }
|
|
988
|
-
```
|
|
989
|
-
|
|
990
|
-
**2. Use `move` for Status Changes (Not `update`)**
|
|
991
|
-
```javascript
|
|
992
|
-
// ❌ WRONG (bypasses validation)
|
|
993
|
-
{ action: "update", task_id: 1, status: "archived" }
|
|
994
|
-
|
|
995
|
-
// ✅ CORRECT (validates transition)
|
|
996
|
-
{ action: "move", task_id: 1, status: "waiting_review" }
|
|
997
|
-
```
|
|
998
|
-
|
|
999
|
-
**3. Use `list` Before `get`**
|
|
1000
|
-
```javascript
|
|
1001
|
-
// ❌ WRONG (loads all descriptions)
|
|
1002
|
-
tasks.forEach(t => get({ action: "get", task_id: t.id }))
|
|
1003
|
-
|
|
1004
|
-
// ✅ CORRECT (metadata first, details on demand)
|
|
1005
|
-
const tasks = list({ action: "list", status: "in_progress" });
|
|
1006
|
-
const details = get({ action: "get", task_id: tasks.tasks[0].task_id });
|
|
1007
|
-
```
|
|
1008
|
-
|
|
1009
|
-
**4. Prefer Batch Operations**
|
|
1010
|
-
```javascript
|
|
1011
|
-
// ❌ INEFFICIENT (multiple calls)
|
|
1012
|
-
create({ action: "create", title: "Task 1" });
|
|
1013
|
-
create({ action: "create", title: "Task 2" });
|
|
1014
|
-
create({ action: "create", title: "Task 3" });
|
|
1015
|
-
|
|
1016
|
-
// ✅ EFFICIENT (one call)
|
|
1017
|
-
create_batch({
|
|
1018
|
-
action: "create_batch",
|
|
1019
|
-
tasks: [
|
|
1020
|
-
{ title: "Task 1" },
|
|
1021
|
-
{ title: "Task 2" },
|
|
1022
|
-
{ title: "Task 3" }
|
|
1023
|
-
],
|
|
1024
|
-
atomic: false
|
|
1025
|
-
});
|
|
1026
|
-
```
|
|
1027
|
-
|
|
1028
|
-
**5. Link Tasks to Context**
|
|
1029
|
-
```javascript
|
|
1030
|
-
// Create task
|
|
1031
|
-
const task = create({ action: "create", title: "Implement auth" });
|
|
1032
|
-
|
|
1033
|
-
// Link to decision
|
|
1034
|
-
link({
|
|
1035
|
-
action: "link",
|
|
1036
|
-
task_id: task.task_id,
|
|
1037
|
-
link_type: "decision",
|
|
1038
|
-
link_key: "auth_method"
|
|
1039
|
-
});
|
|
1040
|
-
|
|
1041
|
-
// Link to file
|
|
1042
|
-
link({
|
|
1043
|
-
action: "link",
|
|
1044
|
-
task_id: task.task_id,
|
|
1045
|
-
link_type: "file",
|
|
1046
|
-
link_path: "/src/auth/jwt.ts"
|
|
1047
|
-
});
|
|
1048
|
-
```
|
|
1049
|
-
|
|
1050
|
-
### For Workflow Coordination
|
|
1051
|
-
|
|
1052
|
-
**1. Use Assignee for Coordination**
|
|
1053
|
-
```javascript
|
|
1054
|
-
// Create task for specific team/person
|
|
1055
|
-
{
|
|
1056
|
-
action: "create",
|
|
1057
|
-
title: "Implement auth middleware",
|
|
1058
|
-
assignee: "dev-team-1",
|
|
1059
|
-
tags: ["handoff"]
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
// List tasks for specific assignee
|
|
1063
|
-
{
|
|
1064
|
-
action: "list",
|
|
1065
|
-
assignee: "dev-team-1",
|
|
1066
|
-
status: "todo"
|
|
1067
|
-
}
|
|
1068
|
-
```
|
|
1069
|
-
|
|
1070
|
-
**2. Use Priority for Orchestration**
|
|
1071
|
-
```javascript
|
|
1072
|
-
// Critical blocker
|
|
1073
|
-
{ action: "create", title: "Fix DB connection", priority: "critical" }
|
|
1074
|
-
|
|
1075
|
-
// High priority
|
|
1076
|
-
{ action: "create", title: "Implement API", priority: "high" }
|
|
1077
|
-
|
|
1078
|
-
// Background work
|
|
1079
|
-
{ action: "create", title: "Update docs", priority: "low" }
|
|
1080
|
-
```
|
|
1081
|
-
|
|
1082
|
-
**3. Track Dependencies with Links**
|
|
1083
|
-
```javascript
|
|
1084
|
-
// Task depends on constraint
|
|
1085
|
-
{
|
|
1086
|
-
action: "link",
|
|
1087
|
-
task_id: 5,
|
|
1088
|
-
link_type: "constraint",
|
|
1089
|
-
link_id: 3 // "DB schema must be finalized"
|
|
1090
|
-
}
|
|
1091
|
-
```
|
|
1092
|
-
|
|
1093
|
-
## Common Errors
|
|
1094
|
-
|
|
1095
|
-
### Error: "Invalid status transition" (Terminal Status)
|
|
1096
|
-
|
|
1097
|
-
**Problem:**
|
|
1098
|
-
```javascript
|
|
1099
|
-
// Trying to move FROM a terminal status (archived/rejected)
|
|
1100
|
-
{ action: "move", task_id: 1, status: "todo" } // Task is already archived
|
|
1101
|
-
```
|
|
1102
|
-
|
|
1103
|
-
**Error:**
|
|
1104
|
-
```javascript
|
|
1105
|
-
{ error: "Invalid status transition from archived to todo. Terminal statuses cannot transition." }
|
|
1106
|
-
```
|
|
1107
|
-
|
|
1108
|
-
**Note:** In v4.1.0+, non-terminal statuses (todo, in_progress, waiting_review, blocked, done) can freely transition to any status including terminal ones.
|
|
1109
|
-
|
|
1110
|
-
### Error: "Task not found"
|
|
1111
|
-
|
|
1112
|
-
**Problem:**
|
|
1113
|
-
```javascript
|
|
1114
|
-
// Invalid task_id
|
|
1115
|
-
{ action: "get", task_id: 9999 }
|
|
1116
|
-
```
|
|
1117
|
-
|
|
1118
|
-
**Solution:**
|
|
1119
|
-
```javascript
|
|
1120
|
-
// List tasks first to get valid IDs
|
|
1121
|
-
{ action: "list" }
|
|
1122
|
-
```
|
|
1123
|
-
|
|
1124
|
-
### Error: "Invalid link type"
|
|
1125
|
-
|
|
1126
|
-
**Problem:**
|
|
1127
|
-
```javascript
|
|
1128
|
-
// Typo in link_type
|
|
1129
|
-
{ action: "link", task_id: 1, link_type: "decisions" }
|
|
1130
|
-
```
|
|
1131
|
-
|
|
1132
|
-
**Solution:**
|
|
1133
|
-
```javascript
|
|
1134
|
-
// Use exact link_type
|
|
1135
|
-
{ action: "link", task_id: 1, link_type: "decision", link_key: "..." }
|
|
1136
|
-
```
|
|
1137
|
-
|
|
1138
|
-
### Error: "Cannot archive task not in done status"
|
|
1139
|
-
|
|
1140
|
-
**Problem:**
|
|
1141
|
-
```javascript
|
|
1142
|
-
// Trying to archive incomplete task
|
|
1143
|
-
{ action: "archive", task_id: 1 } // Task is in_progress
|
|
1144
|
-
```
|
|
1145
|
-
|
|
1146
|
-
**Solution:**
|
|
1147
|
-
```javascript
|
|
1148
|
-
// Complete task first
|
|
1149
|
-
{ action: "move", task_id: 1, status: "done" }
|
|
1150
|
-
{ action: "archive", task_id: 1 }
|
|
1151
|
-
```
|
|
1152
|
-
|
|
1153
|
-
### Error: "Unknown action"
|
|
1154
|
-
|
|
1155
|
-
**Problem:**
|
|
1156
|
-
```javascript
|
|
1157
|
-
// Missing action parameter
|
|
1158
|
-
{ task_id: 1 }
|
|
1159
|
-
```
|
|
1160
|
-
|
|
1161
|
-
**Solution:**
|
|
1162
|
-
```javascript
|
|
1163
|
-
// Always include action
|
|
1164
|
-
{ action: "get", task_id: 1 }
|
|
1165
|
-
```
|
|
1166
|
-
|
|
1167
|
-
## Related Documentation
|
|
1168
|
-
|
|
1169
|
-
- **[TASK_OVERVIEW.md](TASK_OVERVIEW.md)** - Task system overview and core concepts
|
|
1170
|
-
- **[TASK_PRUNING.md](TASK_PRUNING.md)** - Auto-pruning feature for watched files
|
|
1171
|
-
- **[AI_AGENT_GUIDE.md](AI_AGENT_GUIDE.md)** - Comprehensive AI agent guide
|
|
1172
|
-
|
|
1173
|
-
---
|
|
1174
|
-
|
|
1175
|
-
**Version:** 4.0.0
|
|
1176
|
-
**Last Updated:** 2025-11-27
|
|
1177
|
-
**Author:** sin5ddd
|