@vibescope/mcp-server 0.5.0 → 0.5.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 +84 -84
- package/README.md +194 -194
- package/dist/api-client/tasks.d.ts +1 -0
- package/dist/cli-init.js +21 -21
- package/dist/cli.js +26 -26
- package/dist/handlers/tasks.js +7 -1
- package/dist/handlers/tool-docs.js +1216 -1216
- package/dist/index.js +73 -73
- package/dist/templates/agent-guidelines.d.ts +1 -1
- package/dist/templates/agent-guidelines.js +205 -205
- package/dist/templates/help-content.js +1621 -1621
- package/dist/tools/bodies-of-work.js +6 -6
- package/dist/tools/cloud-agents.js +22 -22
- package/dist/tools/milestones.js +2 -2
- package/dist/tools/requests.js +1 -1
- package/dist/tools/session.js +11 -11
- package/dist/tools/sprints.js +9 -9
- package/dist/tools/tasks.js +43 -35
- package/dist/tools/worktrees.js +14 -14
- package/dist/utils.js +11 -11
- package/docs/TOOLS.md +2687 -2685
- package/package.json +53 -53
- package/scripts/generate-docs.ts +212 -212
- package/scripts/version-bump.ts +203 -203
- package/src/api-client/blockers.ts +86 -86
- package/src/api-client/bodies-of-work.ts +194 -194
- package/src/api-client/chat.ts +50 -50
- package/src/api-client/connectors.ts +152 -152
- package/src/api-client/cost.ts +185 -185
- package/src/api-client/decisions.ts +87 -87
- package/src/api-client/deployment.ts +313 -313
- package/src/api-client/discovery.ts +81 -81
- package/src/api-client/fallback.ts +52 -52
- package/src/api-client/file-checkouts.ts +115 -115
- package/src/api-client/findings.ts +100 -100
- package/src/api-client/git-issues.ts +88 -88
- package/src/api-client/ideas.ts +112 -112
- package/src/api-client/index.ts +592 -592
- package/src/api-client/milestones.ts +83 -83
- package/src/api-client/organizations.ts +185 -185
- package/src/api-client/progress.ts +94 -94
- package/src/api-client/project.ts +181 -181
- package/src/api-client/requests.ts +54 -54
- package/src/api-client/session.ts +220 -220
- package/src/api-client/sprints.ts +227 -227
- package/src/api-client/subtasks.ts +57 -57
- package/src/api-client/tasks.ts +451 -450
- package/src/api-client/types.ts +32 -32
- package/src/api-client/validation.ts +60 -60
- package/src/api-client/worktrees.ts +53 -53
- package/src/api-client.test.ts +847 -847
- package/src/api-client.ts +2728 -2728
- package/src/cli-init.ts +558 -558
- package/src/cli.test.ts +284 -284
- package/src/cli.ts +204 -204
- package/src/handlers/__test-setup__.ts +240 -240
- package/src/handlers/__test-utils__.ts +89 -89
- package/src/handlers/blockers.test.ts +468 -468
- package/src/handlers/blockers.ts +172 -172
- package/src/handlers/bodies-of-work.test.ts +704 -704
- package/src/handlers/bodies-of-work.ts +526 -526
- package/src/handlers/chat.test.ts +185 -185
- package/src/handlers/chat.ts +101 -101
- package/src/handlers/cloud-agents.test.ts +438 -438
- package/src/handlers/cloud-agents.ts +156 -156
- package/src/handlers/connectors.test.ts +834 -834
- package/src/handlers/connectors.ts +229 -229
- package/src/handlers/cost.test.ts +462 -462
- package/src/handlers/cost.ts +285 -285
- package/src/handlers/decisions.test.ts +382 -382
- package/src/handlers/decisions.ts +153 -153
- package/src/handlers/deployment.test.ts +551 -551
- package/src/handlers/deployment.ts +570 -570
- package/src/handlers/discovery.test.ts +206 -206
- package/src/handlers/discovery.ts +433 -433
- package/src/handlers/fallback.test.ts +537 -537
- package/src/handlers/fallback.ts +194 -194
- package/src/handlers/file-checkouts.test.ts +750 -750
- package/src/handlers/file-checkouts.ts +185 -185
- package/src/handlers/findings.test.ts +633 -633
- package/src/handlers/findings.ts +239 -239
- package/src/handlers/git-issues.test.ts +631 -631
- package/src/handlers/git-issues.ts +136 -136
- package/src/handlers/ideas.test.ts +644 -644
- package/src/handlers/ideas.ts +207 -207
- package/src/handlers/index.ts +93 -93
- package/src/handlers/milestones.test.ts +475 -475
- package/src/handlers/milestones.ts +180 -180
- package/src/handlers/organizations.test.ts +826 -826
- package/src/handlers/organizations.ts +315 -315
- package/src/handlers/progress.test.ts +269 -269
- package/src/handlers/progress.ts +77 -77
- package/src/handlers/project.test.ts +546 -546
- package/src/handlers/project.ts +245 -245
- package/src/handlers/requests.test.ts +303 -303
- package/src/handlers/requests.ts +99 -99
- package/src/handlers/roles.test.ts +305 -305
- package/src/handlers/roles.ts +219 -219
- package/src/handlers/session.test.ts +998 -998
- package/src/handlers/session.ts +1105 -1105
- package/src/handlers/sprints.test.ts +732 -732
- package/src/handlers/sprints.ts +537 -537
- package/src/handlers/tasks.test.ts +931 -931
- package/src/handlers/tasks.ts +1144 -1137
- package/src/handlers/tool-categories.test.ts +66 -66
- package/src/handlers/tool-docs.test.ts +511 -511
- package/src/handlers/tool-docs.ts +1595 -1595
- package/src/handlers/types.test.ts +259 -259
- package/src/handlers/types.ts +176 -176
- package/src/handlers/validation.test.ts +582 -582
- package/src/handlers/validation.ts +164 -164
- package/src/handlers/version.ts +63 -63
- package/src/index.test.ts +674 -674
- package/src/index.ts +884 -884
- package/src/setup.test.ts +243 -243
- package/src/setup.ts +410 -410
- package/src/templates/agent-guidelines.ts +233 -233
- package/src/templates/help-content.ts +1751 -1751
- package/src/token-tracking.test.ts +463 -463
- package/src/token-tracking.ts +167 -167
- package/src/tools/blockers.ts +122 -122
- package/src/tools/bodies-of-work.ts +283 -283
- package/src/tools/chat.ts +72 -72
- package/src/tools/cloud-agents.ts +101 -101
- package/src/tools/connectors.ts +191 -191
- package/src/tools/cost.ts +111 -111
- package/src/tools/decisions.ts +111 -111
- package/src/tools/deployment.ts +455 -455
- package/src/tools/discovery.ts +76 -76
- package/src/tools/fallback.ts +111 -111
- package/src/tools/features.ts +154 -154
- package/src/tools/file-checkouts.ts +145 -145
- package/src/tools/findings.ts +101 -101
- package/src/tools/git-issues.ts +130 -130
- package/src/tools/ideas.ts +162 -162
- package/src/tools/index.ts +145 -145
- package/src/tools/milestones.ts +118 -118
- package/src/tools/organizations.ts +224 -224
- package/src/tools/persona-templates.ts +25 -25
- package/src/tools/progress.ts +73 -73
- package/src/tools/project.ts +210 -210
- package/src/tools/requests.ts +68 -68
- package/src/tools/roles.ts +112 -112
- package/src/tools/session.ts +181 -181
- package/src/tools/sprints.ts +298 -298
- package/src/tools/tasks.ts +583 -575
- package/src/tools/tools.test.ts +222 -222
- package/src/tools/types.ts +9 -9
- package/src/tools/validation.ts +75 -75
- package/src/tools/version.ts +34 -34
- package/src/tools/worktrees.ts +66 -66
- package/src/tools.test.ts +416 -416
- package/src/utils.test.ts +1014 -1014
- package/src/utils.ts +586 -586
- package/src/validators.test.ts +223 -223
- package/src/validators.ts +249 -249
- package/src/version.ts +162 -162
- package/tsconfig.json +16 -16
- package/vitest.config.ts +14 -14
- package/dist/tools.d.ts +0 -2
- package/dist/tools.js +0 -3602
|
@@ -7,1707 +7,1707 @@
|
|
|
7
7
|
export const HELP_TOPICS = {
|
|
8
8
|
getting_started: {
|
|
9
9
|
title: 'Getting Started',
|
|
10
|
-
content: `# Getting Started with Vibescope
|
|
11
|
-
|
|
12
|
-
## Quick Start
|
|
13
|
-
|
|
14
|
-
\`\`\`
|
|
15
|
-
start_work_session(git_url: "https://github.com/YOUR/REPO", model: "opus", agent_type: "claude")
|
|
16
|
-
\`\`\`
|
|
17
|
-
|
|
18
|
-
**Parameters:**
|
|
19
|
-
- \`git_url\`: Your repository URL (required if no project_id)
|
|
20
|
-
- \`model\`: Your model type - opus, sonnet, or haiku (for cost tracking)
|
|
21
|
-
- \`agent_type\`: Your agent type - claude, gemini, cursor, windsurf, or other
|
|
22
|
-
|
|
23
|
-
This returns:
|
|
24
|
-
- \`session_id\`: Your session identifier
|
|
25
|
-
- \`persona\`: Your assigned agent persona (e.g., "Nova", "Edge")
|
|
26
|
-
- \`project\`: Project details and settings
|
|
27
|
-
- \`next_task\`: The highest priority task to work on
|
|
28
|
-
|
|
29
|
-
## Core Workflow
|
|
30
|
-
|
|
31
|
-
1. **Start session** → \`start_work_session(git_url, model, agent_type)\`
|
|
32
|
-
2. **Mark task in progress** → \`update_task(task_id, status: "in_progress")\`
|
|
33
|
-
3. **Update progress** → \`update_task(task_id, progress_percentage: 50, progress_note: "...")\`
|
|
34
|
-
4. **Complete task** → \`complete_task(task_id, summary: "...")\`
|
|
35
|
-
5. **Continue** → Start the next_task returned, or call \`get_next_task(project_id)\`
|
|
36
|
-
|
|
37
|
-
## Key Rules
|
|
38
|
-
|
|
39
|
-
1. **Always call complete_task()** after finishing work - don't wait for PR review
|
|
40
|
-
2. **Never ask permission** to continue - just start the next task
|
|
41
|
-
3. **Use git worktrees** for branching workflows to avoid conflicts
|
|
42
|
-
4. **Update progress** regularly (every 15-20% completion)
|
|
43
|
-
|
|
44
|
-
## Need More Help?
|
|
45
|
-
|
|
46
|
-
Use \`get_help(topic)\` with these topics:
|
|
47
|
-
- \`tasks\` - Task management workflow
|
|
48
|
-
- \`validation\` - Cross-agent task validation
|
|
49
|
-
- \`git\` - Git workflow and worktrees
|
|
50
|
-
- \`deployment\` - Deployment coordination
|
|
51
|
-
- \`session\` - Session management
|
|
52
|
-
- \`fallback\` - Background activities
|
|
53
|
-
- \`blockers\` - Handling blockers
|
|
10
|
+
content: `# Getting Started with Vibescope
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
\`\`\`
|
|
15
|
+
start_work_session(git_url: "https://github.com/YOUR/REPO", model: "opus", agent_type: "claude")
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
**Parameters:**
|
|
19
|
+
- \`git_url\`: Your repository URL (required if no project_id)
|
|
20
|
+
- \`model\`: Your model type - opus, sonnet, or haiku (for cost tracking)
|
|
21
|
+
- \`agent_type\`: Your agent type - claude, gemini, cursor, windsurf, or other
|
|
22
|
+
|
|
23
|
+
This returns:
|
|
24
|
+
- \`session_id\`: Your session identifier
|
|
25
|
+
- \`persona\`: Your assigned agent persona (e.g., "Nova", "Edge")
|
|
26
|
+
- \`project\`: Project details and settings
|
|
27
|
+
- \`next_task\`: The highest priority task to work on
|
|
28
|
+
|
|
29
|
+
## Core Workflow
|
|
30
|
+
|
|
31
|
+
1. **Start session** → \`start_work_session(git_url, model, agent_type)\`
|
|
32
|
+
2. **Mark task in progress** → \`update_task(task_id, status: "in_progress")\`
|
|
33
|
+
3. **Update progress** → \`update_task(task_id, progress_percentage: 50, progress_note: "...")\`
|
|
34
|
+
4. **Complete task** → \`complete_task(task_id, summary: "...")\`
|
|
35
|
+
5. **Continue** → Start the next_task returned, or call \`get_next_task(project_id)\`
|
|
36
|
+
|
|
37
|
+
## Key Rules
|
|
38
|
+
|
|
39
|
+
1. **Always call complete_task()** after finishing work - don't wait for PR review
|
|
40
|
+
2. **Never ask permission** to continue - just start the next task
|
|
41
|
+
3. **Use git worktrees** for branching workflows to avoid conflicts
|
|
42
|
+
4. **Update progress** regularly (every 15-20% completion)
|
|
43
|
+
|
|
44
|
+
## Need More Help?
|
|
45
|
+
|
|
46
|
+
Use \`get_help(topic)\` with these topics:
|
|
47
|
+
- \`tasks\` - Task management workflow
|
|
48
|
+
- \`validation\` - Cross-agent task validation
|
|
49
|
+
- \`git\` - Git workflow and worktrees
|
|
50
|
+
- \`deployment\` - Deployment coordination
|
|
51
|
+
- \`session\` - Session management
|
|
52
|
+
- \`fallback\` - Background activities
|
|
53
|
+
- \`blockers\` - Handling blockers
|
|
54
54
|
- \`milestones\` - Breaking down complex tasks`,
|
|
55
55
|
},
|
|
56
56
|
session: {
|
|
57
57
|
title: 'Session Management',
|
|
58
|
-
content: `# Session Management
|
|
59
|
-
|
|
60
|
-
## Starting a Session
|
|
61
|
-
|
|
62
|
-
\`\`\`
|
|
63
|
-
start_work_session(
|
|
64
|
-
git_url: "https://github.com/YOUR/REPO",
|
|
65
|
-
model: "opus", // opus, sonnet, or haiku
|
|
66
|
-
agent_type: "claude", // claude, gemini, cursor, windsurf, other
|
|
67
|
-
role: "developer" // developer, validator, deployer, reviewer, maintainer
|
|
68
|
-
)
|
|
69
|
-
\`\`\`
|
|
70
|
-
|
|
71
|
-
**Response includes:**
|
|
72
|
-
- \`session_id\`: Unique session identifier
|
|
73
|
-
- \`persona\`: Your assigned agent name (e.g., "Nova", "Edge", "Arc")
|
|
74
|
-
- \`project\`: Project configuration
|
|
75
|
-
- \`next_task\`: Highest priority task to start
|
|
76
|
-
- \`pending_requests\`: User questions to answer first
|
|
77
|
-
- \`awaiting_validation\`: Tasks needing review (for validators)
|
|
78
|
-
- \`stale_worktrees\`: Worktrees to clean up
|
|
79
|
-
|
|
80
|
-
## Maintaining Your Session
|
|
81
|
-
|
|
82
|
-
### Heartbeat
|
|
83
|
-
Send heartbeats every 30-60 seconds to stay active:
|
|
84
|
-
\`\`\`
|
|
85
|
-
heartbeat(current_worktree_path: "../project-persona-task")
|
|
86
|
-
\`\`\`
|
|
87
|
-
|
|
88
|
-
This:
|
|
89
|
-
- Keeps your session marked as "active" on the dashboard
|
|
90
|
-
- Reports your current working directory
|
|
91
|
-
- Syncs token usage to the backend
|
|
92
|
-
|
|
93
|
-
### Token Tracking
|
|
94
|
-
Check your token usage:
|
|
95
|
-
\`\`\`
|
|
96
|
-
get_token_usage()
|
|
97
|
-
\`\`\`
|
|
98
|
-
|
|
99
|
-
Report actual API usage for accurate cost tracking:
|
|
100
|
-
\`\`\`
|
|
101
|
-
report_token_usage(input_tokens: 1500, output_tokens: 500, model: "opus")
|
|
102
|
-
\`\`\`
|
|
103
|
-
|
|
104
|
-
## Ending a Session
|
|
105
|
-
|
|
106
|
-
\`\`\`
|
|
107
|
-
end_work_session()
|
|
108
|
-
\`\`\`
|
|
109
|
-
|
|
110
|
-
This:
|
|
111
|
-
- Releases any claimed tasks
|
|
112
|
-
- Syncs final token usage
|
|
113
|
-
- Returns a session summary
|
|
114
|
-
|
|
115
|
-
## Context Management
|
|
116
|
-
|
|
117
|
-
When your context grows large (50+ tool calls or 100k+ tokens):
|
|
118
|
-
1. Run \`/clear\` to reset conversation
|
|
119
|
-
2. Immediately call \`start_work_session()\` to reload
|
|
120
|
-
3. Continue with the \`next_task\` from the response
|
|
121
|
-
|
|
122
|
-
**Do NOT ask the user** - just clear and continue. The dashboard tracks all progress.
|
|
123
|
-
|
|
124
|
-
## Session Roles
|
|
125
|
-
|
|
126
|
-
| Role | Description |
|
|
127
|
-
|------|-------------|
|
|
128
|
-
| \`developer\` | General development work (default) |
|
|
129
|
-
| \`validator\` | Reviews and validates completed tasks |
|
|
130
|
-
| \`deployer\` | Handles deployments |
|
|
131
|
-
| \`reviewer\` | Code review focus |
|
|
132
|
-
| \`maintainer\` | Housekeeping and maintenance |
|
|
133
|
-
|
|
134
|
-
Change role mid-session:
|
|
135
|
-
\`\`\`
|
|
136
|
-
set_session_role(role: "validator")
|
|
58
|
+
content: `# Session Management
|
|
59
|
+
|
|
60
|
+
## Starting a Session
|
|
61
|
+
|
|
62
|
+
\`\`\`
|
|
63
|
+
start_work_session(
|
|
64
|
+
git_url: "https://github.com/YOUR/REPO",
|
|
65
|
+
model: "opus", // opus, sonnet, or haiku
|
|
66
|
+
agent_type: "claude", // claude, gemini, cursor, windsurf, other
|
|
67
|
+
role: "developer" // developer, validator, deployer, reviewer, maintainer
|
|
68
|
+
)
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
**Response includes:**
|
|
72
|
+
- \`session_id\`: Unique session identifier
|
|
73
|
+
- \`persona\`: Your assigned agent name (e.g., "Nova", "Edge", "Arc")
|
|
74
|
+
- \`project\`: Project configuration
|
|
75
|
+
- \`next_task\`: Highest priority task to start
|
|
76
|
+
- \`pending_requests\`: User questions to answer first
|
|
77
|
+
- \`awaiting_validation\`: Tasks needing review (for validators)
|
|
78
|
+
- \`stale_worktrees\`: Worktrees to clean up
|
|
79
|
+
|
|
80
|
+
## Maintaining Your Session
|
|
81
|
+
|
|
82
|
+
### Heartbeat
|
|
83
|
+
Send heartbeats every 30-60 seconds to stay active:
|
|
84
|
+
\`\`\`
|
|
85
|
+
heartbeat(current_worktree_path: "../project-persona-task")
|
|
86
|
+
\`\`\`
|
|
87
|
+
|
|
88
|
+
This:
|
|
89
|
+
- Keeps your session marked as "active" on the dashboard
|
|
90
|
+
- Reports your current working directory
|
|
91
|
+
- Syncs token usage to the backend
|
|
92
|
+
|
|
93
|
+
### Token Tracking
|
|
94
|
+
Check your token usage:
|
|
95
|
+
\`\`\`
|
|
96
|
+
get_token_usage()
|
|
97
|
+
\`\`\`
|
|
98
|
+
|
|
99
|
+
Report actual API usage for accurate cost tracking:
|
|
100
|
+
\`\`\`
|
|
101
|
+
report_token_usage(input_tokens: 1500, output_tokens: 500, model: "opus")
|
|
102
|
+
\`\`\`
|
|
103
|
+
|
|
104
|
+
## Ending a Session
|
|
105
|
+
|
|
106
|
+
\`\`\`
|
|
107
|
+
end_work_session()
|
|
108
|
+
\`\`\`
|
|
109
|
+
|
|
110
|
+
This:
|
|
111
|
+
- Releases any claimed tasks
|
|
112
|
+
- Syncs final token usage
|
|
113
|
+
- Returns a session summary
|
|
114
|
+
|
|
115
|
+
## Context Management
|
|
116
|
+
|
|
117
|
+
When your context grows large (50+ tool calls or 100k+ tokens):
|
|
118
|
+
1. Run \`/clear\` to reset conversation
|
|
119
|
+
2. Immediately call \`start_work_session()\` to reload
|
|
120
|
+
3. Continue with the \`next_task\` from the response
|
|
121
|
+
|
|
122
|
+
**Do NOT ask the user** - just clear and continue. The dashboard tracks all progress.
|
|
123
|
+
|
|
124
|
+
## Session Roles
|
|
125
|
+
|
|
126
|
+
| Role | Description |
|
|
127
|
+
|------|-------------|
|
|
128
|
+
| \`developer\` | General development work (default) |
|
|
129
|
+
| \`validator\` | Reviews and validates completed tasks |
|
|
130
|
+
| \`deployer\` | Handles deployments |
|
|
131
|
+
| \`reviewer\` | Code review focus |
|
|
132
|
+
| \`maintainer\` | Housekeeping and maintenance |
|
|
133
|
+
|
|
134
|
+
Change role mid-session:
|
|
135
|
+
\`\`\`
|
|
136
|
+
set_session_role(role: "validator")
|
|
137
137
|
\`\`\``,
|
|
138
138
|
},
|
|
139
139
|
tasks: {
|
|
140
140
|
title: 'Task Management',
|
|
141
|
-
content: `# Task Management
|
|
142
|
-
|
|
143
|
-
## Getting Tasks
|
|
144
|
-
|
|
145
|
-
### Get Next Task
|
|
146
|
-
\`\`\`
|
|
147
|
-
get_next_task(project_id)
|
|
148
|
-
\`\`\`
|
|
149
|
-
Returns the highest priority pending task.
|
|
150
|
-
|
|
151
|
-
### Search Tasks
|
|
152
|
-
\`\`\`
|
|
153
|
-
search_tasks(project_id, query: "login bug", status: ["pending", "in_progress"])
|
|
154
|
-
\`\`\`
|
|
155
|
-
|
|
156
|
-
### Get by Priority
|
|
157
|
-
\`\`\`
|
|
158
|
-
get_tasks_by_priority(project_id, priority: 1) // P1 tasks only
|
|
159
|
-
get_tasks_by_priority(project_id, priority: 1, priority_max: 2) // P1 and P2
|
|
160
|
-
\`\`\`
|
|
161
|
-
|
|
162
|
-
## Working on Tasks
|
|
163
|
-
|
|
164
|
-
### 1. Start the Task
|
|
165
|
-
\`\`\`
|
|
166
|
-
update_task(task_id, status: "in_progress")
|
|
167
|
-
\`\`\`
|
|
168
|
-
|
|
169
|
-
**For branching workflows (github-flow, git-flow):**
|
|
170
|
-
Create a worktree first, then include it:
|
|
171
|
-
\`\`\`
|
|
172
|
-
update_task(
|
|
173
|
-
task_id,
|
|
174
|
-
status: "in_progress",
|
|
175
|
-
git_branch: "feature/abc123-add-login",
|
|
176
|
-
worktree_path: "../project-persona-add-login"
|
|
177
|
-
)
|
|
178
|
-
\`\`\`
|
|
179
|
-
|
|
180
|
-
### 2. Update Progress
|
|
181
|
-
Update regularly (every 15-20% completion):
|
|
182
|
-
\`\`\`
|
|
183
|
-
update_task(
|
|
184
|
-
task_id,
|
|
185
|
-
progress_percentage: 50,
|
|
186
|
-
progress_note: "Implemented core logic, working on tests"
|
|
187
|
-
)
|
|
188
|
-
\`\`\`
|
|
189
|
-
|
|
190
|
-
### 3. Complete the Task
|
|
191
|
-
**CRITICAL: Always call complete_task() after finishing!**
|
|
192
|
-
\`\`\`
|
|
193
|
-
complete_task(task_id, summary: "Added login flow with OAuth support")
|
|
194
|
-
\`\`\`
|
|
195
|
-
|
|
196
|
-
**When to call complete_task:**
|
|
197
|
-
- After creating and pushing a PR
|
|
198
|
-
- After merging (trunk-based workflow)
|
|
199
|
-
- After finishing any unit of work
|
|
200
|
-
|
|
201
|
-
**Do NOT wait for:**
|
|
202
|
-
- PR review/merge (validation handles that)
|
|
203
|
-
- User confirmation
|
|
204
|
-
- Perfect summary
|
|
205
|
-
|
|
206
|
-
### Fix Already Exists (No Code Changes Needed)
|
|
207
|
-
|
|
208
|
-
When investigating a task and finding the fix already exists in code but hasn't been deployed:
|
|
209
|
-
|
|
210
|
-
1. **Document the finding:**
|
|
211
|
-
\`\`\`
|
|
212
|
-
add_finding(
|
|
213
|
-
project_id,
|
|
214
|
-
title: "Fix exists but awaits deployment",
|
|
215
|
-
category: "other",
|
|
216
|
-
severity: "info",
|
|
217
|
-
description: "The fix for [issue] was implemented in PR #{pr_number} but hasn't been deployed yet.",
|
|
218
|
-
related_task_id: task_id
|
|
219
|
-
)
|
|
220
|
-
\`\`\`
|
|
221
|
-
|
|
222
|
-
2. **Complete the task** (investigation is done):
|
|
223
|
-
\`\`\`
|
|
224
|
-
complete_task(task_id, summary: "Fix already exists in codebase (PR #{pr_number}). Needs deployment to production.")
|
|
225
|
-
\`\`\`
|
|
226
|
-
|
|
227
|
-
3. **Request deployment** if not already pending:
|
|
228
|
-
\`\`\`
|
|
229
|
-
check_deployment_status(project_id) // Check if deployment pending
|
|
230
|
-
request_deployment(project_id, notes: "Includes fix for [issue]")
|
|
231
|
-
\`\`\`
|
|
232
|
-
|
|
233
|
-
This prevents tasks from being blocked waiting for deployment when the actual work is done.
|
|
234
|
-
|
|
235
|
-
## Task Priorities
|
|
236
|
-
|
|
237
|
-
| Priority | Meaning |
|
|
238
|
-
|----------|---------|
|
|
239
|
-
| 1 | Critical - do first |
|
|
240
|
-
| 2 | High priority |
|
|
241
|
-
| 3 | Normal (default) |
|
|
242
|
-
| 4 | Low priority |
|
|
243
|
-
| 5 | Backlog |
|
|
244
|
-
|
|
245
|
-
## Breaking Down Tasks
|
|
246
|
-
|
|
247
|
-
For complex tasks, use milestones:
|
|
248
|
-
\`\`\`
|
|
249
|
-
add_milestone(task_id, title: "Set up database schema")
|
|
250
|
-
add_milestone(task_id, title: "Implement API endpoints")
|
|
251
|
-
add_milestone(task_id, title: "Add unit tests")
|
|
252
|
-
|
|
253
|
-
complete_milestone(milestone_id)
|
|
254
|
-
\`\`\`
|
|
255
|
-
|
|
256
|
-
Or subtasks for parallel work:
|
|
257
|
-
\`\`\`
|
|
258
|
-
add_subtask(parent_task_id, title: "Implement frontend form")
|
|
259
|
-
add_subtask(parent_task_id, title: "Implement backend validation")
|
|
260
|
-
\`\`\`
|
|
261
|
-
|
|
262
|
-
## Task References
|
|
263
|
-
|
|
264
|
-
Link PRs, issues, or docs to tasks:
|
|
265
|
-
\`\`\`
|
|
266
|
-
add_task_reference(task_id, url: "https://github.com/org/repo/pull/123", label: "PR")
|
|
267
|
-
\`\`\`
|
|
268
|
-
|
|
269
|
-
**Important:** For github-flow/git-flow projects, add PR reference before completing - validators need it.
|
|
270
|
-
|
|
271
|
-
## Deployment-Only Resolutions
|
|
272
|
-
|
|
273
|
-
When investigating a task and finding the fix already exists in code (just needs deployment):
|
|
274
|
-
|
|
275
|
-
**1. Document the finding:**
|
|
276
|
-
\`\`\`
|
|
277
|
-
add_finding(
|
|
278
|
-
project_id,
|
|
279
|
-
title: "Fix exists - needs deployment",
|
|
280
|
-
category: "other",
|
|
281
|
-
severity: "info",
|
|
282
|
-
description: "Investigation found the fix for [issue] already exists in [commit/PR]. Deployment will resolve this."
|
|
283
|
-
)
|
|
284
|
-
\`\`\`
|
|
285
|
-
|
|
286
|
-
**2. Mark the task complete:**
|
|
287
|
-
\`\`\`
|
|
288
|
-
complete_task(task_id, summary: "Investigation complete: fix exists in [branch/commit], pending deployment")
|
|
289
|
-
\`\`\`
|
|
290
|
-
|
|
291
|
-
**3. Request deployment if needed:**
|
|
292
|
-
\`\`\`
|
|
293
|
-
# Check if deployment is already pending
|
|
294
|
-
check_deployment_status(project_id)
|
|
295
|
-
|
|
296
|
-
# If not, request one
|
|
297
|
-
request_deployment(project_id, notes: "Includes fix for [task description]")
|
|
298
|
-
\`\`\`
|
|
299
|
-
|
|
300
|
-
**Why this pattern?**
|
|
301
|
-
- Tasks shouldn't block waiting for deployment
|
|
302
|
-
- Investigation work is complete (resolution identified)
|
|
303
|
-
- The finding creates a record of what needs deploying
|
|
141
|
+
content: `# Task Management
|
|
142
|
+
|
|
143
|
+
## Getting Tasks
|
|
144
|
+
|
|
145
|
+
### Get Next Task
|
|
146
|
+
\`\`\`
|
|
147
|
+
get_next_task(project_id)
|
|
148
|
+
\`\`\`
|
|
149
|
+
Returns the highest priority pending task.
|
|
150
|
+
|
|
151
|
+
### Search Tasks
|
|
152
|
+
\`\`\`
|
|
153
|
+
search_tasks(project_id, query: "login bug", status: ["pending", "in_progress"])
|
|
154
|
+
\`\`\`
|
|
155
|
+
|
|
156
|
+
### Get by Priority
|
|
157
|
+
\`\`\`
|
|
158
|
+
get_tasks_by_priority(project_id, priority: 1) // P1 tasks only
|
|
159
|
+
get_tasks_by_priority(project_id, priority: 1, priority_max: 2) // P1 and P2
|
|
160
|
+
\`\`\`
|
|
161
|
+
|
|
162
|
+
## Working on Tasks
|
|
163
|
+
|
|
164
|
+
### 1. Start the Task
|
|
165
|
+
\`\`\`
|
|
166
|
+
update_task(task_id, status: "in_progress")
|
|
167
|
+
\`\`\`
|
|
168
|
+
|
|
169
|
+
**For branching workflows (github-flow, git-flow):**
|
|
170
|
+
Create a worktree first, then include it:
|
|
171
|
+
\`\`\`
|
|
172
|
+
update_task(
|
|
173
|
+
task_id,
|
|
174
|
+
status: "in_progress",
|
|
175
|
+
git_branch: "feature/abc123-add-login",
|
|
176
|
+
worktree_path: "../project-persona-add-login"
|
|
177
|
+
)
|
|
178
|
+
\`\`\`
|
|
179
|
+
|
|
180
|
+
### 2. Update Progress
|
|
181
|
+
Update regularly (every 15-20% completion):
|
|
182
|
+
\`\`\`
|
|
183
|
+
update_task(
|
|
184
|
+
task_id,
|
|
185
|
+
progress_percentage: 50,
|
|
186
|
+
progress_note: "Implemented core logic, working on tests"
|
|
187
|
+
)
|
|
188
|
+
\`\`\`
|
|
189
|
+
|
|
190
|
+
### 3. Complete the Task
|
|
191
|
+
**CRITICAL: Always call complete_task() after finishing!**
|
|
192
|
+
\`\`\`
|
|
193
|
+
complete_task(task_id, summary: "Added login flow with OAuth support")
|
|
194
|
+
\`\`\`
|
|
195
|
+
|
|
196
|
+
**When to call complete_task:**
|
|
197
|
+
- After creating and pushing a PR
|
|
198
|
+
- After merging (trunk-based workflow)
|
|
199
|
+
- After finishing any unit of work
|
|
200
|
+
|
|
201
|
+
**Do NOT wait for:**
|
|
202
|
+
- PR review/merge (validation handles that)
|
|
203
|
+
- User confirmation
|
|
204
|
+
- Perfect summary
|
|
205
|
+
|
|
206
|
+
### Fix Already Exists (No Code Changes Needed)
|
|
207
|
+
|
|
208
|
+
When investigating a task and finding the fix already exists in code but hasn't been deployed:
|
|
209
|
+
|
|
210
|
+
1. **Document the finding:**
|
|
211
|
+
\`\`\`
|
|
212
|
+
add_finding(
|
|
213
|
+
project_id,
|
|
214
|
+
title: "Fix exists but awaits deployment",
|
|
215
|
+
category: "other",
|
|
216
|
+
severity: "info",
|
|
217
|
+
description: "The fix for [issue] was implemented in PR #{pr_number} but hasn't been deployed yet.",
|
|
218
|
+
related_task_id: task_id
|
|
219
|
+
)
|
|
220
|
+
\`\`\`
|
|
221
|
+
|
|
222
|
+
2. **Complete the task** (investigation is done):
|
|
223
|
+
\`\`\`
|
|
224
|
+
complete_task(task_id, summary: "Fix already exists in codebase (PR #{pr_number}). Needs deployment to production.")
|
|
225
|
+
\`\`\`
|
|
226
|
+
|
|
227
|
+
3. **Request deployment** if not already pending:
|
|
228
|
+
\`\`\`
|
|
229
|
+
check_deployment_status(project_id) // Check if deployment pending
|
|
230
|
+
request_deployment(project_id, notes: "Includes fix for [issue]")
|
|
231
|
+
\`\`\`
|
|
232
|
+
|
|
233
|
+
This prevents tasks from being blocked waiting for deployment when the actual work is done.
|
|
234
|
+
|
|
235
|
+
## Task Priorities
|
|
236
|
+
|
|
237
|
+
| Priority | Meaning |
|
|
238
|
+
|----------|---------|
|
|
239
|
+
| 1 | Critical - do first |
|
|
240
|
+
| 2 | High priority |
|
|
241
|
+
| 3 | Normal (default) |
|
|
242
|
+
| 4 | Low priority |
|
|
243
|
+
| 5 | Backlog |
|
|
244
|
+
|
|
245
|
+
## Breaking Down Tasks
|
|
246
|
+
|
|
247
|
+
For complex tasks, use milestones:
|
|
248
|
+
\`\`\`
|
|
249
|
+
add_milestone(task_id, title: "Set up database schema")
|
|
250
|
+
add_milestone(task_id, title: "Implement API endpoints")
|
|
251
|
+
add_milestone(task_id, title: "Add unit tests")
|
|
252
|
+
|
|
253
|
+
complete_milestone(milestone_id)
|
|
254
|
+
\`\`\`
|
|
255
|
+
|
|
256
|
+
Or subtasks for parallel work:
|
|
257
|
+
\`\`\`
|
|
258
|
+
add_subtask(parent_task_id, title: "Implement frontend form")
|
|
259
|
+
add_subtask(parent_task_id, title: "Implement backend validation")
|
|
260
|
+
\`\`\`
|
|
261
|
+
|
|
262
|
+
## Task References
|
|
263
|
+
|
|
264
|
+
Link PRs, issues, or docs to tasks:
|
|
265
|
+
\`\`\`
|
|
266
|
+
add_task_reference(task_id, url: "https://github.com/org/repo/pull/123", label: "PR")
|
|
267
|
+
\`\`\`
|
|
268
|
+
|
|
269
|
+
**Important:** For github-flow/git-flow projects, add PR reference before completing - validators need it.
|
|
270
|
+
|
|
271
|
+
## Deployment-Only Resolutions
|
|
272
|
+
|
|
273
|
+
When investigating a task and finding the fix already exists in code (just needs deployment):
|
|
274
|
+
|
|
275
|
+
**1. Document the finding:**
|
|
276
|
+
\`\`\`
|
|
277
|
+
add_finding(
|
|
278
|
+
project_id,
|
|
279
|
+
title: "Fix exists - needs deployment",
|
|
280
|
+
category: "other",
|
|
281
|
+
severity: "info",
|
|
282
|
+
description: "Investigation found the fix for [issue] already exists in [commit/PR]. Deployment will resolve this."
|
|
283
|
+
)
|
|
284
|
+
\`\`\`
|
|
285
|
+
|
|
286
|
+
**2. Mark the task complete:**
|
|
287
|
+
\`\`\`
|
|
288
|
+
complete_task(task_id, summary: "Investigation complete: fix exists in [branch/commit], pending deployment")
|
|
289
|
+
\`\`\`
|
|
290
|
+
|
|
291
|
+
**3. Request deployment if needed:**
|
|
292
|
+
\`\`\`
|
|
293
|
+
# Check if deployment is already pending
|
|
294
|
+
check_deployment_status(project_id)
|
|
295
|
+
|
|
296
|
+
# If not, request one
|
|
297
|
+
request_deployment(project_id, notes: "Includes fix for [task description]")
|
|
298
|
+
\`\`\`
|
|
299
|
+
|
|
300
|
+
**Why this pattern?**
|
|
301
|
+
- Tasks shouldn't block waiting for deployment
|
|
302
|
+
- Investigation work is complete (resolution identified)
|
|
303
|
+
- The finding creates a record of what needs deploying
|
|
304
304
|
- Deployment can bundle multiple fixes together`,
|
|
305
305
|
},
|
|
306
306
|
validation: {
|
|
307
307
|
title: 'Task Validation',
|
|
308
|
-
content: `# Task Validation
|
|
309
|
-
|
|
310
|
-
Validation ensures completed work meets quality standards before merging.
|
|
311
|
-
|
|
312
|
-
## For Developers
|
|
313
|
-
|
|
314
|
-
After completing a task:
|
|
315
|
-
1. Create your PR
|
|
316
|
-
2. Add PR reference: \`add_task_reference(task_id, url: "PR_URL")\`
|
|
317
|
-
3. Call \`complete_task(task_id, summary: "...")\`
|
|
318
|
-
4. A validator will review and merge
|
|
319
|
-
|
|
320
|
-
## For Validators
|
|
321
|
-
|
|
322
|
-
### 1. Get Tasks to Validate
|
|
323
|
-
\`\`\`
|
|
324
|
-
get_tasks_awaiting_validation(project_id)
|
|
325
|
-
\`\`\`
|
|
326
|
-
Returns tasks sorted by PR number (oldest first). **Always review in this order (FIFO).**
|
|
327
|
-
|
|
328
|
-
### 2. Claim a Task
|
|
329
|
-
\`\`\`
|
|
330
|
-
claim_validation(task_id)
|
|
331
|
-
\`\`\`
|
|
332
|
-
|
|
333
|
-
Returns:
|
|
334
|
-
- \`worktree_setup\`: Commands to checkout the branch
|
|
335
|
-
- \`conflict_check\`: Steps to verify PR can merge
|
|
336
|
-
- \`merge_status\`: Current PR state
|
|
337
|
-
|
|
338
|
-
### 3. Set Up Your Worktree
|
|
339
|
-
\`\`\`bash
|
|
340
|
-
# Fetch and create worktree from existing branch
|
|
341
|
-
git fetch origin feature/abc123-task
|
|
342
|
-
git worktree add ../project-validator-review feature/abc123-task
|
|
343
|
-
cd ../project-validator-review
|
|
344
|
-
\`\`\`
|
|
345
|
-
|
|
346
|
-
### 4. Run Tests Locally
|
|
347
|
-
\`\`\`bash
|
|
348
|
-
pnpm install
|
|
349
|
-
pnpm test
|
|
350
|
-
pnpm build
|
|
351
|
-
\`\`\`
|
|
352
|
-
|
|
353
|
-
### 5. Check PR State
|
|
354
|
-
\`\`\`bash
|
|
355
|
-
gh pr view <PR_NUMBER> --json state,mergedAt --jq '.state'
|
|
356
|
-
\`\`\`
|
|
357
|
-
|
|
358
|
-
If PR is CLOSED (not merged), cancel instead of validating:
|
|
359
|
-
\`\`\`
|
|
360
|
-
cancel_task(task_id, cancelled_reason: "pr_closed")
|
|
361
|
-
\`\`\`
|
|
362
|
-
|
|
363
|
-
### 6. Approve or Reject
|
|
364
|
-
|
|
365
|
-
**If APPROVED:**
|
|
366
|
-
\`\`\`
|
|
367
|
-
validate_task(task_id, approved: true, validation_notes: "Tests pass, code looks good")
|
|
368
|
-
\`\`\`
|
|
369
|
-
Then merge the PR and clean up:
|
|
370
|
-
\`\`\`bash
|
|
371
|
-
gh pr merge <PR_NUMBER> --squash
|
|
372
|
-
cd ../project && git worktree remove ../project-validator-review
|
|
373
|
-
\`\`\`
|
|
374
|
-
|
|
375
|
-
**If REJECTED:**
|
|
376
|
-
\`\`\`
|
|
377
|
-
validate_task(
|
|
378
|
-
task_id,
|
|
379
|
-
approved: false,
|
|
380
|
-
validation_notes: "Tests failing in auth module",
|
|
381
|
-
create_fix_task: true // Creates a fix task on the same branch
|
|
382
|
-
)
|
|
383
|
-
\`\`\`
|
|
384
|
-
Then clean up your worktree - the fix agent will create their own.
|
|
385
|
-
|
|
386
|
-
## Handling Merge Conflicts
|
|
387
|
-
|
|
388
|
-
If \`claim_validation\` shows merge conflicts:
|
|
389
|
-
1. Follow the \`rebase_instructions.steps\`
|
|
390
|
-
2. Resolve conflicts in your editor
|
|
391
|
-
3. Force push with \`--force-with-lease\`
|
|
392
|
-
4. Call \`claim_validation\` again to verify
|
|
393
|
-
|
|
394
|
-
Record git issues:
|
|
395
|
-
\`\`\`
|
|
396
|
-
add_git_issue(
|
|
397
|
-
project_id,
|
|
398
|
-
issue_type: "merge_conflict",
|
|
399
|
-
branch: "feature-branch",
|
|
400
|
-
target_branch: "develop",
|
|
401
|
-
task_id: task_id
|
|
402
|
-
)
|
|
308
|
+
content: `# Task Validation
|
|
309
|
+
|
|
310
|
+
Validation ensures completed work meets quality standards before merging.
|
|
311
|
+
|
|
312
|
+
## For Developers
|
|
313
|
+
|
|
314
|
+
After completing a task:
|
|
315
|
+
1. Create your PR
|
|
316
|
+
2. Add PR reference: \`add_task_reference(task_id, url: "PR_URL")\`
|
|
317
|
+
3. Call \`complete_task(task_id, summary: "...")\`
|
|
318
|
+
4. A validator will review and merge
|
|
319
|
+
|
|
320
|
+
## For Validators
|
|
321
|
+
|
|
322
|
+
### 1. Get Tasks to Validate
|
|
323
|
+
\`\`\`
|
|
324
|
+
get_tasks_awaiting_validation(project_id)
|
|
325
|
+
\`\`\`
|
|
326
|
+
Returns tasks sorted by PR number (oldest first). **Always review in this order (FIFO).**
|
|
327
|
+
|
|
328
|
+
### 2. Claim a Task
|
|
329
|
+
\`\`\`
|
|
330
|
+
claim_validation(task_id)
|
|
331
|
+
\`\`\`
|
|
332
|
+
|
|
333
|
+
Returns:
|
|
334
|
+
- \`worktree_setup\`: Commands to checkout the branch
|
|
335
|
+
- \`conflict_check\`: Steps to verify PR can merge
|
|
336
|
+
- \`merge_status\`: Current PR state
|
|
337
|
+
|
|
338
|
+
### 3. Set Up Your Worktree
|
|
339
|
+
\`\`\`bash
|
|
340
|
+
# Fetch and create worktree from existing branch
|
|
341
|
+
git fetch origin feature/abc123-task
|
|
342
|
+
git worktree add ../project-validator-review feature/abc123-task
|
|
343
|
+
cd ../project-validator-review
|
|
344
|
+
\`\`\`
|
|
345
|
+
|
|
346
|
+
### 4. Run Tests Locally
|
|
347
|
+
\`\`\`bash
|
|
348
|
+
pnpm install
|
|
349
|
+
pnpm test
|
|
350
|
+
pnpm build
|
|
351
|
+
\`\`\`
|
|
352
|
+
|
|
353
|
+
### 5. Check PR State
|
|
354
|
+
\`\`\`bash
|
|
355
|
+
gh pr view <PR_NUMBER> --json state,mergedAt --jq '.state'
|
|
356
|
+
\`\`\`
|
|
357
|
+
|
|
358
|
+
If PR is CLOSED (not merged), cancel instead of validating:
|
|
359
|
+
\`\`\`
|
|
360
|
+
cancel_task(task_id, cancelled_reason: "pr_closed")
|
|
361
|
+
\`\`\`
|
|
362
|
+
|
|
363
|
+
### 6. Approve or Reject
|
|
364
|
+
|
|
365
|
+
**If APPROVED:**
|
|
366
|
+
\`\`\`
|
|
367
|
+
validate_task(task_id, approved: true, validation_notes: "Tests pass, code looks good")
|
|
368
|
+
\`\`\`
|
|
369
|
+
Then merge the PR and clean up:
|
|
370
|
+
\`\`\`bash
|
|
371
|
+
gh pr merge <PR_NUMBER> --squash
|
|
372
|
+
cd ../project && git worktree remove ../project-validator-review
|
|
373
|
+
\`\`\`
|
|
374
|
+
|
|
375
|
+
**If REJECTED:**
|
|
376
|
+
\`\`\`
|
|
377
|
+
validate_task(
|
|
378
|
+
task_id,
|
|
379
|
+
approved: false,
|
|
380
|
+
validation_notes: "Tests failing in auth module",
|
|
381
|
+
create_fix_task: true // Creates a fix task on the same branch
|
|
382
|
+
)
|
|
383
|
+
\`\`\`
|
|
384
|
+
Then clean up your worktree - the fix agent will create their own.
|
|
385
|
+
|
|
386
|
+
## Handling Merge Conflicts
|
|
387
|
+
|
|
388
|
+
If \`claim_validation\` shows merge conflicts:
|
|
389
|
+
1. Follow the \`rebase_instructions.steps\`
|
|
390
|
+
2. Resolve conflicts in your editor
|
|
391
|
+
3. Force push with \`--force-with-lease\`
|
|
392
|
+
4. Call \`claim_validation\` again to verify
|
|
393
|
+
|
|
394
|
+
Record git issues:
|
|
395
|
+
\`\`\`
|
|
396
|
+
add_git_issue(
|
|
397
|
+
project_id,
|
|
398
|
+
issue_type: "merge_conflict",
|
|
399
|
+
branch: "feature-branch",
|
|
400
|
+
target_branch: "develop",
|
|
401
|
+
task_id: task_id
|
|
402
|
+
)
|
|
403
403
|
\`\`\``,
|
|
404
404
|
},
|
|
405
405
|
git: {
|
|
406
406
|
title: 'Git Workflow',
|
|
407
|
-
content: `# Git Workflow
|
|
408
|
-
|
|
409
|
-
## Supported Workflows
|
|
410
|
-
|
|
411
|
-
| Workflow | Description |
|
|
412
|
-
|----------|-------------|
|
|
413
|
-
| \`none\` | No branching, direct commits |
|
|
414
|
-
| \`trunk-based\` | Commit directly to main |
|
|
415
|
-
| \`github-flow\` | Feature branches + PRs to main |
|
|
416
|
-
| \`git-flow\` | Feature branches off develop, PRs to develop |
|
|
417
|
-
|
|
418
|
-
Check your project's workflow:
|
|
419
|
-
\`\`\`
|
|
420
|
-
get_git_workflow(project_id)
|
|
421
|
-
\`\`\`
|
|
422
|
-
|
|
423
|
-
## Git Worktrees (CRITICAL)
|
|
424
|
-
|
|
425
|
-
**For github-flow and git-flow projects, you MUST use worktrees.**
|
|
426
|
-
|
|
427
|
-
### Rebase Before PR (MANDATORY)
|
|
428
|
-
|
|
429
|
-
**Always rebase your branch before creating a PR.** This prevents overwrites of other agents' work.
|
|
430
|
-
|
|
431
|
-
\`\`\`bash
|
|
432
|
-
# Before creating PR, rebase onto latest base branch
|
|
433
|
-
git fetch origin
|
|
434
|
-
git rebase origin/develop # or origin/main for github-flow
|
|
435
|
-
# Resolve any conflicts
|
|
436
|
-
git push --force-with-lease
|
|
437
|
-
\`\`\`
|
|
438
|
-
|
|
439
|
-
**Why?** Without rebasing, your branch may contain old versions of files that other agents modified. When merged, your old version overwrites their changes.
|
|
440
|
-
|
|
441
|
-
### Why Worktrees?
|
|
442
|
-
Multiple agents sharing one repo will conflict:
|
|
443
|
-
- Switching branches affects all agents
|
|
444
|
-
- Uncommitted changes collide
|
|
445
|
-
- Direct commits create merge conflicts
|
|
446
|
-
|
|
447
|
-
Worktrees give each task an isolated working directory.
|
|
448
|
-
|
|
449
|
-
### Worktree Workflow
|
|
450
|
-
|
|
451
|
-
**1. Create worktree BEFORE making any edits:**
|
|
452
|
-
\`\`\`bash
|
|
453
|
-
# Naming: ../PROJECT-PERSONA-short-description
|
|
454
|
-
git worktree add ../Vibescope-Nova-add-login -b feature/abc123-add-login develop
|
|
455
|
-
cd ../Vibescope-Nova-add-login
|
|
456
|
-
\`\`\`
|
|
457
|
-
|
|
458
|
-
**2. Report your location:**
|
|
459
|
-
\`\`\`
|
|
460
|
-
heartbeat(current_worktree_path: "../Vibescope-Nova-add-login")
|
|
461
|
-
\`\`\`
|
|
462
|
-
|
|
463
|
-
**3. Update the task:**
|
|
464
|
-
\`\`\`
|
|
465
|
-
update_task(
|
|
466
|
-
task_id,
|
|
467
|
-
status: "in_progress",
|
|
468
|
-
git_branch: "feature/abc123-add-login",
|
|
469
|
-
worktree_path: "../Vibescope-Nova-add-login"
|
|
470
|
-
)
|
|
471
|
-
\`\`\`
|
|
472
|
-
|
|
473
|
-
**4. Do your work, commit, push, create PR**
|
|
474
|
-
|
|
475
|
-
**5. Clean up IMMEDIATELY after opening PR:**
|
|
476
|
-
\`\`\`bash
|
|
477
|
-
cd ../Vibescope # Return to main repo
|
|
478
|
-
git worktree remove ../Vibescope-Nova-add-login
|
|
479
|
-
\`\`\`
|
|
480
|
-
Then clear the path:
|
|
481
|
-
\`\`\`
|
|
482
|
-
clear_worktree_path(task_id)
|
|
483
|
-
\`\`\`
|
|
484
|
-
|
|
485
|
-
### NO EXCEPTIONS
|
|
486
|
-
|
|
487
|
-
Even for:
|
|
488
|
-
- "Quick fixes" → Use a worktree
|
|
489
|
-
- "Urgent hotfixes" → Use a worktree
|
|
490
|
-
- "One line changes" → Use a worktree
|
|
491
|
-
|
|
492
|
-
### Wrong vs Right Order
|
|
493
|
-
|
|
494
|
-
**WRONG:**
|
|
495
|
-
1. Edit files in main repo
|
|
496
|
-
2. git stash
|
|
497
|
-
3. Create worktree
|
|
498
|
-
4. git stash pop
|
|
499
|
-
|
|
500
|
-
**RIGHT:**
|
|
501
|
-
1. Create worktree FIRST
|
|
502
|
-
2. cd into worktree
|
|
503
|
-
3. THEN edit files
|
|
504
|
-
|
|
505
|
-
### Useful Commands
|
|
506
|
-
|
|
507
|
-
| Command | Description |
|
|
508
|
-
|---------|-------------|
|
|
509
|
-
| \`git worktree list\` | List all worktrees |
|
|
510
|
-
| \`git worktree add <path> -b <branch> <base>\` | Create worktree |
|
|
511
|
-
| \`git worktree remove <path>\` | Remove worktree |
|
|
512
|
-
| \`get_stale_worktrees(project_id)\` | Find orphaned worktrees |
|
|
513
|
-
|
|
514
|
-
### Cleaning Stale Worktrees
|
|
515
|
-
|
|
516
|
-
On session start, if \`stale_worktrees\` is returned:
|
|
517
|
-
\`\`\`bash
|
|
518
|
-
git worktree remove <path>
|
|
519
|
-
\`\`\`
|
|
520
|
-
Then:
|
|
521
|
-
\`\`\`
|
|
522
|
-
clear_worktree_path(task_id)
|
|
407
|
+
content: `# Git Workflow
|
|
408
|
+
|
|
409
|
+
## Supported Workflows
|
|
410
|
+
|
|
411
|
+
| Workflow | Description |
|
|
412
|
+
|----------|-------------|
|
|
413
|
+
| \`none\` | No branching, direct commits |
|
|
414
|
+
| \`trunk-based\` | Commit directly to main |
|
|
415
|
+
| \`github-flow\` | Feature branches + PRs to main |
|
|
416
|
+
| \`git-flow\` | Feature branches off develop, PRs to develop |
|
|
417
|
+
|
|
418
|
+
Check your project's workflow:
|
|
419
|
+
\`\`\`
|
|
420
|
+
get_git_workflow(project_id)
|
|
421
|
+
\`\`\`
|
|
422
|
+
|
|
423
|
+
## Git Worktrees (CRITICAL)
|
|
424
|
+
|
|
425
|
+
**For github-flow and git-flow projects, you MUST use worktrees.**
|
|
426
|
+
|
|
427
|
+
### Rebase Before PR (MANDATORY)
|
|
428
|
+
|
|
429
|
+
**Always rebase your branch before creating a PR.** This prevents overwrites of other agents' work.
|
|
430
|
+
|
|
431
|
+
\`\`\`bash
|
|
432
|
+
# Before creating PR, rebase onto latest base branch
|
|
433
|
+
git fetch origin
|
|
434
|
+
git rebase origin/develop # or origin/main for github-flow
|
|
435
|
+
# Resolve any conflicts
|
|
436
|
+
git push --force-with-lease
|
|
437
|
+
\`\`\`
|
|
438
|
+
|
|
439
|
+
**Why?** Without rebasing, your branch may contain old versions of files that other agents modified. When merged, your old version overwrites their changes.
|
|
440
|
+
|
|
441
|
+
### Why Worktrees?
|
|
442
|
+
Multiple agents sharing one repo will conflict:
|
|
443
|
+
- Switching branches affects all agents
|
|
444
|
+
- Uncommitted changes collide
|
|
445
|
+
- Direct commits create merge conflicts
|
|
446
|
+
|
|
447
|
+
Worktrees give each task an isolated working directory.
|
|
448
|
+
|
|
449
|
+
### Worktree Workflow
|
|
450
|
+
|
|
451
|
+
**1. Create worktree BEFORE making any edits:**
|
|
452
|
+
\`\`\`bash
|
|
453
|
+
# Naming: ../PROJECT-PERSONA-short-description
|
|
454
|
+
git worktree add ../Vibescope-Nova-add-login -b feature/abc123-add-login develop
|
|
455
|
+
cd ../Vibescope-Nova-add-login
|
|
456
|
+
\`\`\`
|
|
457
|
+
|
|
458
|
+
**2. Report your location:**
|
|
459
|
+
\`\`\`
|
|
460
|
+
heartbeat(current_worktree_path: "../Vibescope-Nova-add-login")
|
|
461
|
+
\`\`\`
|
|
462
|
+
|
|
463
|
+
**3. Update the task:**
|
|
464
|
+
\`\`\`
|
|
465
|
+
update_task(
|
|
466
|
+
task_id,
|
|
467
|
+
status: "in_progress",
|
|
468
|
+
git_branch: "feature/abc123-add-login",
|
|
469
|
+
worktree_path: "../Vibescope-Nova-add-login"
|
|
470
|
+
)
|
|
471
|
+
\`\`\`
|
|
472
|
+
|
|
473
|
+
**4. Do your work, commit, push, create PR**
|
|
474
|
+
|
|
475
|
+
**5. Clean up IMMEDIATELY after opening PR:**
|
|
476
|
+
\`\`\`bash
|
|
477
|
+
cd ../Vibescope # Return to main repo
|
|
478
|
+
git worktree remove ../Vibescope-Nova-add-login
|
|
479
|
+
\`\`\`
|
|
480
|
+
Then clear the path:
|
|
481
|
+
\`\`\`
|
|
482
|
+
clear_worktree_path(task_id)
|
|
483
|
+
\`\`\`
|
|
484
|
+
|
|
485
|
+
### NO EXCEPTIONS
|
|
486
|
+
|
|
487
|
+
Even for:
|
|
488
|
+
- "Quick fixes" → Use a worktree
|
|
489
|
+
- "Urgent hotfixes" → Use a worktree
|
|
490
|
+
- "One line changes" → Use a worktree
|
|
491
|
+
|
|
492
|
+
### Wrong vs Right Order
|
|
493
|
+
|
|
494
|
+
**WRONG:**
|
|
495
|
+
1. Edit files in main repo
|
|
496
|
+
2. git stash
|
|
497
|
+
3. Create worktree
|
|
498
|
+
4. git stash pop
|
|
499
|
+
|
|
500
|
+
**RIGHT:**
|
|
501
|
+
1. Create worktree FIRST
|
|
502
|
+
2. cd into worktree
|
|
503
|
+
3. THEN edit files
|
|
504
|
+
|
|
505
|
+
### Useful Commands
|
|
506
|
+
|
|
507
|
+
| Command | Description |
|
|
508
|
+
|---------|-------------|
|
|
509
|
+
| \`git worktree list\` | List all worktrees |
|
|
510
|
+
| \`git worktree add <path> -b <branch> <base>\` | Create worktree |
|
|
511
|
+
| \`git worktree remove <path>\` | Remove worktree |
|
|
512
|
+
| \`get_stale_worktrees(project_id)\` | Find orphaned worktrees |
|
|
513
|
+
|
|
514
|
+
### Cleaning Stale Worktrees
|
|
515
|
+
|
|
516
|
+
On session start, if \`stale_worktrees\` is returned:
|
|
517
|
+
\`\`\`bash
|
|
518
|
+
git worktree remove <path>
|
|
519
|
+
\`\`\`
|
|
520
|
+
Then:
|
|
521
|
+
\`\`\`
|
|
522
|
+
clear_worktree_path(task_id)
|
|
523
523
|
\`\`\``,
|
|
524
524
|
},
|
|
525
525
|
deployment: {
|
|
526
526
|
title: 'Deployment Coordination',
|
|
527
|
-
content: `# Deployment Coordination
|
|
528
|
-
|
|
529
|
-
## Deployment Flow
|
|
530
|
-
|
|
531
|
-
1. **Request** → \`request_deployment(project_id)\`
|
|
532
|
-
2. **Validate** → Build and test the deployment
|
|
533
|
-
3. **Deploy** → Execute deployment
|
|
534
|
-
4. **Complete** → Mark success/failure
|
|
535
|
-
|
|
536
|
-
## Requesting Deployment
|
|
537
|
-
|
|
538
|
-
\`\`\`
|
|
539
|
-
request_deployment(
|
|
540
|
-
project_id,
|
|
541
|
-
environment: "production", // development, staging, production
|
|
542
|
-
version_bump: "patch", // patch, minor, major
|
|
543
|
-
git_ref: "main", // Branch or commit
|
|
544
|
-
notes: "Bug fixes for auth" // Optional
|
|
545
|
-
)
|
|
546
|
-
\`\`\`
|
|
547
|
-
|
|
548
|
-
## Pre-Deployment Requirements
|
|
549
|
-
|
|
550
|
-
Add requirements that must be completed before deploying:
|
|
551
|
-
\`\`\`
|
|
552
|
-
add_deployment_requirement(
|
|
553
|
-
project_id,
|
|
554
|
-
type: "migration",
|
|
555
|
-
title: "Run migration: add_user_roles",
|
|
556
|
-
description: "Run: pnpm db:migrate",
|
|
557
|
-
stage: "preparation" // preparation, deployment, verification
|
|
558
|
-
)
|
|
559
|
-
\`\`\`
|
|
560
|
-
|
|
561
|
-
Types: \`migration\`, \`env_var\`, \`config\`, \`manual\`, \`breaking_change\`, \`agent_task\`
|
|
562
|
-
|
|
563
|
-
Check requirements:
|
|
564
|
-
\`\`\`
|
|
565
|
-
get_deployment_requirements(project_id)
|
|
566
|
-
\`\`\`
|
|
567
|
-
|
|
568
|
-
Complete them:
|
|
569
|
-
\`\`\`
|
|
570
|
-
complete_deployment_requirement(requirement_id)
|
|
571
|
-
\`\`\`
|
|
572
|
-
|
|
573
|
-
## Validating Deployment
|
|
574
|
-
|
|
575
|
-
Claim for validation:
|
|
576
|
-
\`\`\`
|
|
577
|
-
claim_deployment_validation(project_id)
|
|
578
|
-
\`\`\`
|
|
579
|
-
|
|
580
|
-
Run build and tests, then report:
|
|
581
|
-
\`\`\`
|
|
582
|
-
report_validation(
|
|
583
|
-
project_id,
|
|
584
|
-
build_passed: true,
|
|
585
|
-
tests_passed: true
|
|
586
|
-
)
|
|
587
|
-
\`\`\`
|
|
588
|
-
|
|
589
|
-
If validation fails, an investigation task is auto-created.
|
|
590
|
-
|
|
591
|
-
## Executing Deployment
|
|
592
|
-
|
|
593
|
-
Check status:
|
|
594
|
-
\`\`\`
|
|
595
|
-
check_deployment_status(project_id)
|
|
596
|
-
\`\`\`
|
|
597
|
-
|
|
598
|
-
When status is "ready":
|
|
599
|
-
\`\`\`
|
|
600
|
-
start_deployment(project_id)
|
|
601
|
-
\`\`\`
|
|
602
|
-
|
|
603
|
-
After deployment completes:
|
|
604
|
-
\`\`\`
|
|
605
|
-
complete_deployment(
|
|
606
|
-
project_id,
|
|
607
|
-
success: true,
|
|
608
|
-
summary: "Deployed v1.2.3 with auth fixes"
|
|
609
|
-
)
|
|
610
|
-
\`\`\`
|
|
611
|
-
|
|
612
|
-
Or if it failed:
|
|
613
|
-
\`\`\`
|
|
614
|
-
complete_deployment(
|
|
615
|
-
project_id,
|
|
616
|
-
success: false,
|
|
617
|
-
summary: "Rollback due to database connection errors"
|
|
618
|
-
)
|
|
619
|
-
\`\`\`
|
|
620
|
-
|
|
621
|
-
## Scheduled Deployments
|
|
622
|
-
|
|
623
|
-
Schedule future deployments:
|
|
624
|
-
\`\`\`
|
|
625
|
-
schedule_deployment(
|
|
626
|
-
project_id,
|
|
627
|
-
scheduled_at: "2025-01-20T10:00:00Z",
|
|
628
|
-
schedule_type: "once", // once, hourly, daily, weekly, monthly
|
|
629
|
-
auto_trigger: true // Auto-deploy when due
|
|
630
|
-
)
|
|
631
|
-
\`\`\`
|
|
632
|
-
|
|
633
|
-
Check due deployments:
|
|
634
|
-
\`\`\`
|
|
635
|
-
check_due_deployments(project_id)
|
|
636
|
-
\`\`\`
|
|
637
|
-
|
|
638
|
-
## Canceling
|
|
639
|
-
|
|
640
|
-
\`\`\`
|
|
641
|
-
cancel_deployment(project_id, reason: "Blocker found in staging")
|
|
527
|
+
content: `# Deployment Coordination
|
|
528
|
+
|
|
529
|
+
## Deployment Flow
|
|
530
|
+
|
|
531
|
+
1. **Request** → \`request_deployment(project_id)\`
|
|
532
|
+
2. **Validate** → Build and test the deployment
|
|
533
|
+
3. **Deploy** → Execute deployment
|
|
534
|
+
4. **Complete** → Mark success/failure
|
|
535
|
+
|
|
536
|
+
## Requesting Deployment
|
|
537
|
+
|
|
538
|
+
\`\`\`
|
|
539
|
+
request_deployment(
|
|
540
|
+
project_id,
|
|
541
|
+
environment: "production", // development, staging, production
|
|
542
|
+
version_bump: "patch", // patch, minor, major
|
|
543
|
+
git_ref: "main", // Branch or commit
|
|
544
|
+
notes: "Bug fixes for auth" // Optional
|
|
545
|
+
)
|
|
546
|
+
\`\`\`
|
|
547
|
+
|
|
548
|
+
## Pre-Deployment Requirements
|
|
549
|
+
|
|
550
|
+
Add requirements that must be completed before deploying:
|
|
551
|
+
\`\`\`
|
|
552
|
+
add_deployment_requirement(
|
|
553
|
+
project_id,
|
|
554
|
+
type: "migration",
|
|
555
|
+
title: "Run migration: add_user_roles",
|
|
556
|
+
description: "Run: pnpm db:migrate",
|
|
557
|
+
stage: "preparation" // preparation, deployment, verification
|
|
558
|
+
)
|
|
559
|
+
\`\`\`
|
|
560
|
+
|
|
561
|
+
Types: \`migration\`, \`env_var\`, \`config\`, \`manual\`, \`breaking_change\`, \`agent_task\`
|
|
562
|
+
|
|
563
|
+
Check requirements:
|
|
564
|
+
\`\`\`
|
|
565
|
+
get_deployment_requirements(project_id)
|
|
566
|
+
\`\`\`
|
|
567
|
+
|
|
568
|
+
Complete them:
|
|
569
|
+
\`\`\`
|
|
570
|
+
complete_deployment_requirement(requirement_id)
|
|
571
|
+
\`\`\`
|
|
572
|
+
|
|
573
|
+
## Validating Deployment
|
|
574
|
+
|
|
575
|
+
Claim for validation:
|
|
576
|
+
\`\`\`
|
|
577
|
+
claim_deployment_validation(project_id)
|
|
578
|
+
\`\`\`
|
|
579
|
+
|
|
580
|
+
Run build and tests, then report:
|
|
581
|
+
\`\`\`
|
|
582
|
+
report_validation(
|
|
583
|
+
project_id,
|
|
584
|
+
build_passed: true,
|
|
585
|
+
tests_passed: true
|
|
586
|
+
)
|
|
587
|
+
\`\`\`
|
|
588
|
+
|
|
589
|
+
If validation fails, an investigation task is auto-created.
|
|
590
|
+
|
|
591
|
+
## Executing Deployment
|
|
592
|
+
|
|
593
|
+
Check status:
|
|
594
|
+
\`\`\`
|
|
595
|
+
check_deployment_status(project_id)
|
|
596
|
+
\`\`\`
|
|
597
|
+
|
|
598
|
+
When status is "ready":
|
|
599
|
+
\`\`\`
|
|
600
|
+
start_deployment(project_id)
|
|
601
|
+
\`\`\`
|
|
602
|
+
|
|
603
|
+
After deployment completes:
|
|
604
|
+
\`\`\`
|
|
605
|
+
complete_deployment(
|
|
606
|
+
project_id,
|
|
607
|
+
success: true,
|
|
608
|
+
summary: "Deployed v1.2.3 with auth fixes"
|
|
609
|
+
)
|
|
610
|
+
\`\`\`
|
|
611
|
+
|
|
612
|
+
Or if it failed:
|
|
613
|
+
\`\`\`
|
|
614
|
+
complete_deployment(
|
|
615
|
+
project_id,
|
|
616
|
+
success: false,
|
|
617
|
+
summary: "Rollback due to database connection errors"
|
|
618
|
+
)
|
|
619
|
+
\`\`\`
|
|
620
|
+
|
|
621
|
+
## Scheduled Deployments
|
|
622
|
+
|
|
623
|
+
Schedule future deployments:
|
|
624
|
+
\`\`\`
|
|
625
|
+
schedule_deployment(
|
|
626
|
+
project_id,
|
|
627
|
+
scheduled_at: "2025-01-20T10:00:00Z",
|
|
628
|
+
schedule_type: "once", // once, hourly, daily, weekly, monthly
|
|
629
|
+
auto_trigger: true // Auto-deploy when due
|
|
630
|
+
)
|
|
631
|
+
\`\`\`
|
|
632
|
+
|
|
633
|
+
Check due deployments:
|
|
634
|
+
\`\`\`
|
|
635
|
+
check_due_deployments(project_id)
|
|
636
|
+
\`\`\`
|
|
637
|
+
|
|
638
|
+
## Canceling
|
|
639
|
+
|
|
640
|
+
\`\`\`
|
|
641
|
+
cancel_deployment(project_id, reason: "Blocker found in staging")
|
|
642
642
|
\`\`\``,
|
|
643
643
|
},
|
|
644
644
|
blockers: {
|
|
645
645
|
title: 'Handling Blockers',
|
|
646
|
-
content: `# Handling Blockers
|
|
647
|
-
|
|
648
|
-
## Recording a Blocker
|
|
649
|
-
|
|
650
|
-
When you can't proceed:
|
|
651
|
-
\`\`\`
|
|
652
|
-
add_blocker(
|
|
653
|
-
project_id,
|
|
654
|
-
description: "API endpoint returning 500 errors - need backend team to investigate"
|
|
655
|
-
)
|
|
656
|
-
\`\`\`
|
|
657
|
-
|
|
658
|
-
## Viewing Blockers
|
|
659
|
-
|
|
660
|
-
\`\`\`
|
|
661
|
-
get_blockers(project_id) // Open blockers
|
|
662
|
-
get_blockers(project_id, status: "resolved") // Resolved blockers
|
|
663
|
-
get_blockers_stats(project_id) // Just counts
|
|
664
|
-
\`\`\`
|
|
665
|
-
|
|
666
|
-
## Resolving Blockers
|
|
667
|
-
|
|
668
|
-
\`\`\`
|
|
669
|
-
resolve_blocker(
|
|
670
|
-
blocker_id,
|
|
671
|
-
resolution_note: "Backend team fixed the API - endpoint now returns correct data"
|
|
672
|
-
)
|
|
673
|
-
\`\`\`
|
|
674
|
-
|
|
675
|
-
## What Counts as a Blocker?
|
|
676
|
-
|
|
677
|
-
**IS a blocker:**
|
|
678
|
-
- External dependency not available
|
|
679
|
-
- Need access/credentials you don't have
|
|
680
|
-
- Critical bug in a dependency
|
|
681
|
-
- Waiting for human decision
|
|
682
|
-
- Environment issue preventing testing
|
|
683
|
-
|
|
684
|
-
**NOT a blocker:**
|
|
685
|
-
- Need to learn something → research and continue
|
|
686
|
-
- Code is complex → break it down with milestones
|
|
687
|
-
- Tests failing → fix them
|
|
688
|
-
- Merge conflicts → resolve them
|
|
689
|
-
|
|
690
|
-
## Blocker Best Practices
|
|
691
|
-
|
|
692
|
-
1. **Be specific** - Describe exactly what's blocked and why
|
|
693
|
-
2. **Include context** - What were you trying to do?
|
|
694
|
-
3. **Suggest solutions** - If you know what might help
|
|
695
|
-
4. **Check existing blockers** - Don't duplicate
|
|
646
|
+
content: `# Handling Blockers
|
|
647
|
+
|
|
648
|
+
## Recording a Blocker
|
|
649
|
+
|
|
650
|
+
When you can't proceed:
|
|
651
|
+
\`\`\`
|
|
652
|
+
add_blocker(
|
|
653
|
+
project_id,
|
|
654
|
+
description: "API endpoint returning 500 errors - need backend team to investigate"
|
|
655
|
+
)
|
|
656
|
+
\`\`\`
|
|
657
|
+
|
|
658
|
+
## Viewing Blockers
|
|
659
|
+
|
|
660
|
+
\`\`\`
|
|
661
|
+
get_blockers(project_id) // Open blockers
|
|
662
|
+
get_blockers(project_id, status: "resolved") // Resolved blockers
|
|
663
|
+
get_blockers_stats(project_id) // Just counts
|
|
664
|
+
\`\`\`
|
|
665
|
+
|
|
666
|
+
## Resolving Blockers
|
|
667
|
+
|
|
668
|
+
\`\`\`
|
|
669
|
+
resolve_blocker(
|
|
670
|
+
blocker_id,
|
|
671
|
+
resolution_note: "Backend team fixed the API - endpoint now returns correct data"
|
|
672
|
+
)
|
|
673
|
+
\`\`\`
|
|
674
|
+
|
|
675
|
+
## What Counts as a Blocker?
|
|
676
|
+
|
|
677
|
+
**IS a blocker:**
|
|
678
|
+
- External dependency not available
|
|
679
|
+
- Need access/credentials you don't have
|
|
680
|
+
- Critical bug in a dependency
|
|
681
|
+
- Waiting for human decision
|
|
682
|
+
- Environment issue preventing testing
|
|
683
|
+
|
|
684
|
+
**NOT a blocker:**
|
|
685
|
+
- Need to learn something → research and continue
|
|
686
|
+
- Code is complex → break it down with milestones
|
|
687
|
+
- Tests failing → fix them
|
|
688
|
+
- Merge conflicts → resolve them
|
|
689
|
+
|
|
690
|
+
## Blocker Best Practices
|
|
691
|
+
|
|
692
|
+
1. **Be specific** - Describe exactly what's blocked and why
|
|
693
|
+
2. **Include context** - What were you trying to do?
|
|
694
|
+
3. **Suggest solutions** - If you know what might help
|
|
695
|
+
4. **Check existing blockers** - Don't duplicate
|
|
696
696
|
5. **Resolve promptly** - When the issue is fixed, resolve the blocker`,
|
|
697
697
|
},
|
|
698
698
|
milestones: {
|
|
699
699
|
title: 'Task Milestones',
|
|
700
|
-
content: `# Task Milestones
|
|
701
|
-
|
|
702
|
-
Milestones break down large tasks into trackable steps.
|
|
703
|
-
|
|
704
|
-
## Adding Milestones
|
|
705
|
-
|
|
706
|
-
\`\`\`
|
|
707
|
-
add_milestone(task_id, title: "Design database schema")
|
|
708
|
-
add_milestone(task_id, title: "Implement API endpoints")
|
|
709
|
-
add_milestone(task_id, title: "Write unit tests")
|
|
710
|
-
add_milestone(task_id, title: "Add integration tests")
|
|
711
|
-
\`\`\`
|
|
712
|
-
|
|
713
|
-
With order and description:
|
|
714
|
-
\`\`\`
|
|
715
|
-
add_milestone(
|
|
716
|
-
task_id,
|
|
717
|
-
title: "Set up authentication",
|
|
718
|
-
description: "Configure OAuth providers and session management",
|
|
719
|
-
order_index: 0
|
|
720
|
-
)
|
|
721
|
-
\`\`\`
|
|
722
|
-
|
|
723
|
-
## Viewing Milestones
|
|
724
|
-
|
|
725
|
-
\`\`\`
|
|
726
|
-
get_milestones(task_id)
|
|
727
|
-
\`\`\`
|
|
728
|
-
|
|
729
|
-
Or include when getting task:
|
|
730
|
-
\`\`\`
|
|
731
|
-
get_task(task_id, include_milestones: true)
|
|
732
|
-
\`\`\`
|
|
733
|
-
|
|
734
|
-
## Updating Progress
|
|
735
|
-
|
|
736
|
-
Mark milestone in progress:
|
|
737
|
-
\`\`\`
|
|
738
|
-
update_milestone(milestone_id, status: "in_progress")
|
|
739
|
-
\`\`\`
|
|
740
|
-
|
|
741
|
-
Complete a milestone:
|
|
742
|
-
\`\`\`
|
|
743
|
-
complete_milestone(milestone_id)
|
|
744
|
-
\`\`\`
|
|
745
|
-
|
|
746
|
-
## When to Use Milestones
|
|
747
|
-
|
|
748
|
-
**Good candidates:**
|
|
749
|
-
- Tasks estimated > 2 hours
|
|
750
|
-
- Multi-step implementations
|
|
751
|
-
- Features spanning multiple files/modules
|
|
752
|
-
- Tasks with clear phases
|
|
753
|
-
|
|
754
|
-
**Example breakdown:**
|
|
755
|
-
|
|
756
|
-
Task: "Implement user authentication"
|
|
757
|
-
1. Set up OAuth provider configuration
|
|
758
|
-
2. Create login/logout API endpoints
|
|
759
|
-
3. Implement session management
|
|
760
|
-
4. Add protected route middleware
|
|
761
|
-
5. Create login UI components
|
|
762
|
-
6. Write tests
|
|
763
|
-
|
|
764
|
-
## Milestones vs Subtasks
|
|
765
|
-
|
|
766
|
-
| Milestones | Subtasks |
|
|
767
|
-
|------------|----------|
|
|
768
|
-
| Sequential steps | Parallel work items |
|
|
769
|
-
| Same agent | Can be claimed by different agents |
|
|
770
|
-
| Progress tracking | Delegation |
|
|
771
|
-
| One at a time | Multiple in progress |
|
|
772
|
-
|
|
773
|
-
Use **milestones** for ordered steps you'll do yourself.
|
|
700
|
+
content: `# Task Milestones
|
|
701
|
+
|
|
702
|
+
Milestones break down large tasks into trackable steps.
|
|
703
|
+
|
|
704
|
+
## Adding Milestones
|
|
705
|
+
|
|
706
|
+
\`\`\`
|
|
707
|
+
add_milestone(task_id, title: "Design database schema")
|
|
708
|
+
add_milestone(task_id, title: "Implement API endpoints")
|
|
709
|
+
add_milestone(task_id, title: "Write unit tests")
|
|
710
|
+
add_milestone(task_id, title: "Add integration tests")
|
|
711
|
+
\`\`\`
|
|
712
|
+
|
|
713
|
+
With order and description:
|
|
714
|
+
\`\`\`
|
|
715
|
+
add_milestone(
|
|
716
|
+
task_id,
|
|
717
|
+
title: "Set up authentication",
|
|
718
|
+
description: "Configure OAuth providers and session management",
|
|
719
|
+
order_index: 0
|
|
720
|
+
)
|
|
721
|
+
\`\`\`
|
|
722
|
+
|
|
723
|
+
## Viewing Milestones
|
|
724
|
+
|
|
725
|
+
\`\`\`
|
|
726
|
+
get_milestones(task_id)
|
|
727
|
+
\`\`\`
|
|
728
|
+
|
|
729
|
+
Or include when getting task:
|
|
730
|
+
\`\`\`
|
|
731
|
+
get_task(task_id, include_milestones: true)
|
|
732
|
+
\`\`\`
|
|
733
|
+
|
|
734
|
+
## Updating Progress
|
|
735
|
+
|
|
736
|
+
Mark milestone in progress:
|
|
737
|
+
\`\`\`
|
|
738
|
+
update_milestone(milestone_id, status: "in_progress")
|
|
739
|
+
\`\`\`
|
|
740
|
+
|
|
741
|
+
Complete a milestone:
|
|
742
|
+
\`\`\`
|
|
743
|
+
complete_milestone(milestone_id)
|
|
744
|
+
\`\`\`
|
|
745
|
+
|
|
746
|
+
## When to Use Milestones
|
|
747
|
+
|
|
748
|
+
**Good candidates:**
|
|
749
|
+
- Tasks estimated > 2 hours
|
|
750
|
+
- Multi-step implementations
|
|
751
|
+
- Features spanning multiple files/modules
|
|
752
|
+
- Tasks with clear phases
|
|
753
|
+
|
|
754
|
+
**Example breakdown:**
|
|
755
|
+
|
|
756
|
+
Task: "Implement user authentication"
|
|
757
|
+
1. Set up OAuth provider configuration
|
|
758
|
+
2. Create login/logout API endpoints
|
|
759
|
+
3. Implement session management
|
|
760
|
+
4. Add protected route middleware
|
|
761
|
+
5. Create login UI components
|
|
762
|
+
6. Write tests
|
|
763
|
+
|
|
764
|
+
## Milestones vs Subtasks
|
|
765
|
+
|
|
766
|
+
| Milestones | Subtasks |
|
|
767
|
+
|------------|----------|
|
|
768
|
+
| Sequential steps | Parallel work items |
|
|
769
|
+
| Same agent | Can be claimed by different agents |
|
|
770
|
+
| Progress tracking | Delegation |
|
|
771
|
+
| One at a time | Multiple in progress |
|
|
772
|
+
|
|
773
|
+
Use **milestones** for ordered steps you'll do yourself.
|
|
774
774
|
Use **subtasks** when work can be parallelized across agents.`,
|
|
775
775
|
},
|
|
776
776
|
fallback: {
|
|
777
777
|
title: 'Fallback Activities',
|
|
778
|
-
content: `# Fallback Activities
|
|
779
|
-
|
|
780
|
-
When no tasks are available, agents can perform background activities.
|
|
781
|
-
|
|
782
|
-
## Starting a Fallback Activity
|
|
783
|
-
|
|
784
|
-
\`\`\`
|
|
785
|
-
start_fallback_activity(project_id, activity: "code_review")
|
|
786
|
-
\`\`\`
|
|
787
|
-
|
|
788
|
-
## Available Activities
|
|
789
|
-
|
|
790
|
-
| Activity | Description |
|
|
791
|
-
|----------|-------------|
|
|
792
|
-
| \`code_review\` | Review code quality, patterns, best practices |
|
|
793
|
-
| \`security_review\` | Security audit, vulnerability scanning |
|
|
794
|
-
| \`performance_audit\` | Performance analysis, optimization opportunities |
|
|
795
|
-
| \`ux_review\` | UX/accessibility review |
|
|
796
|
-
| \`test_coverage\` | Test coverage analysis, missing tests |
|
|
797
|
-
| \`documentation_review\` | Documentation gaps, outdated docs |
|
|
798
|
-
| \`dependency_audit\` | Dependency updates, vulnerabilities |
|
|
799
|
-
| \`feature_ideation\` | Suggest improvements, new features |
|
|
800
|
-
| \`validate_completed_tasks\` | Review tasks awaiting validation |
|
|
801
|
-
| \`worktree_cleanup\` | Clean up stale worktrees |
|
|
802
|
-
|
|
803
|
-
## Recording Findings
|
|
804
|
-
|
|
805
|
-
During activities, record findings:
|
|
806
|
-
\`\`\`
|
|
807
|
-
add_finding(
|
|
808
|
-
project_id,
|
|
809
|
-
title: "SQL injection risk in user search",
|
|
810
|
-
category: "security", // security, performance, code_quality, etc.
|
|
811
|
-
severity: "high", // info, low, medium, high, critical
|
|
812
|
-
description: "User input passed directly to query without sanitization",
|
|
813
|
-
file_path: "src/api/users.ts",
|
|
814
|
-
line_number: 45
|
|
815
|
-
)
|
|
816
|
-
\`\`\`
|
|
817
|
-
|
|
818
|
-
## Recording Ideas
|
|
819
|
-
|
|
820
|
-
For feature suggestions:
|
|
821
|
-
\`\`\`
|
|
822
|
-
add_idea(
|
|
823
|
-
project_id,
|
|
824
|
-
title: "Add rate limiting to API",
|
|
825
|
-
description: "Protect against abuse by adding rate limits per user/IP"
|
|
826
|
-
)
|
|
827
|
-
\`\`\`
|
|
828
|
-
|
|
829
|
-
## Stopping Activities
|
|
830
|
-
|
|
831
|
-
Activities auto-stop when you start a task. Manual stop:
|
|
832
|
-
\`\`\`
|
|
833
|
-
stop_fallback_activity(project_id, summary: "Reviewed 5 files, found 2 issues")
|
|
834
|
-
\`\`\`
|
|
835
|
-
|
|
836
|
-
## Activity History
|
|
837
|
-
|
|
838
|
-
\`\`\`
|
|
839
|
-
get_activity_history(project_id)
|
|
840
|
-
\`\`\`
|
|
841
|
-
|
|
842
|
-
## Project Settings
|
|
843
|
-
|
|
844
|
-
Projects can restrict fallback activities:
|
|
845
|
-
\`\`\`
|
|
846
|
-
update_project(
|
|
847
|
-
project_id,
|
|
848
|
-
fallback_activities_enabled: true,
|
|
849
|
-
preferred_fallback_activities: ["code_review", "security_review"]
|
|
850
|
-
)
|
|
778
|
+
content: `# Fallback Activities
|
|
779
|
+
|
|
780
|
+
When no tasks are available, agents can perform background activities.
|
|
781
|
+
|
|
782
|
+
## Starting a Fallback Activity
|
|
783
|
+
|
|
784
|
+
\`\`\`
|
|
785
|
+
start_fallback_activity(project_id, activity: "code_review")
|
|
786
|
+
\`\`\`
|
|
787
|
+
|
|
788
|
+
## Available Activities
|
|
789
|
+
|
|
790
|
+
| Activity | Description |
|
|
791
|
+
|----------|-------------|
|
|
792
|
+
| \`code_review\` | Review code quality, patterns, best practices |
|
|
793
|
+
| \`security_review\` | Security audit, vulnerability scanning |
|
|
794
|
+
| \`performance_audit\` | Performance analysis, optimization opportunities |
|
|
795
|
+
| \`ux_review\` | UX/accessibility review |
|
|
796
|
+
| \`test_coverage\` | Test coverage analysis, missing tests |
|
|
797
|
+
| \`documentation_review\` | Documentation gaps, outdated docs |
|
|
798
|
+
| \`dependency_audit\` | Dependency updates, vulnerabilities |
|
|
799
|
+
| \`feature_ideation\` | Suggest improvements, new features |
|
|
800
|
+
| \`validate_completed_tasks\` | Review tasks awaiting validation |
|
|
801
|
+
| \`worktree_cleanup\` | Clean up stale worktrees |
|
|
802
|
+
|
|
803
|
+
## Recording Findings
|
|
804
|
+
|
|
805
|
+
During activities, record findings:
|
|
806
|
+
\`\`\`
|
|
807
|
+
add_finding(
|
|
808
|
+
project_id,
|
|
809
|
+
title: "SQL injection risk in user search",
|
|
810
|
+
category: "security", // security, performance, code_quality, etc.
|
|
811
|
+
severity: "high", // info, low, medium, high, critical
|
|
812
|
+
description: "User input passed directly to query without sanitization",
|
|
813
|
+
file_path: "src/api/users.ts",
|
|
814
|
+
line_number: 45
|
|
815
|
+
)
|
|
816
|
+
\`\`\`
|
|
817
|
+
|
|
818
|
+
## Recording Ideas
|
|
819
|
+
|
|
820
|
+
For feature suggestions:
|
|
821
|
+
\`\`\`
|
|
822
|
+
add_idea(
|
|
823
|
+
project_id,
|
|
824
|
+
title: "Add rate limiting to API",
|
|
825
|
+
description: "Protect against abuse by adding rate limits per user/IP"
|
|
826
|
+
)
|
|
827
|
+
\`\`\`
|
|
828
|
+
|
|
829
|
+
## Stopping Activities
|
|
830
|
+
|
|
831
|
+
Activities auto-stop when you start a task. Manual stop:
|
|
832
|
+
\`\`\`
|
|
833
|
+
stop_fallback_activity(project_id, summary: "Reviewed 5 files, found 2 issues")
|
|
834
|
+
\`\`\`
|
|
835
|
+
|
|
836
|
+
## Activity History
|
|
837
|
+
|
|
838
|
+
\`\`\`
|
|
839
|
+
get_activity_history(project_id)
|
|
840
|
+
\`\`\`
|
|
841
|
+
|
|
842
|
+
## Project Settings
|
|
843
|
+
|
|
844
|
+
Projects can restrict fallback activities:
|
|
845
|
+
\`\`\`
|
|
846
|
+
update_project(
|
|
847
|
+
project_id,
|
|
848
|
+
fallback_activities_enabled: true,
|
|
849
|
+
preferred_fallback_activities: ["code_review", "security_review"]
|
|
850
|
+
)
|
|
851
851
|
\`\`\``,
|
|
852
852
|
},
|
|
853
853
|
tokens: {
|
|
854
854
|
title: 'Token Usage & Cost Tracking',
|
|
855
|
-
content: `# Token Usage & Cost Tracking
|
|
856
|
-
|
|
857
|
-
## Checking Usage
|
|
858
|
-
|
|
859
|
-
\`\`\`
|
|
860
|
-
get_token_usage()
|
|
861
|
-
\`\`\`
|
|
862
|
-
|
|
863
|
-
Returns:
|
|
864
|
-
- Session stats (calls, tokens, avg per call)
|
|
865
|
-
- Top tools by token usage
|
|
866
|
-
- Model breakdown (input/output tokens)
|
|
867
|
-
- Estimated costs
|
|
868
|
-
|
|
869
|
-
## Reporting Actual Usage
|
|
870
|
-
|
|
871
|
-
MCP estimates are only ~1-5% of actual API usage. For accurate tracking:
|
|
872
|
-
|
|
873
|
-
\`\`\`
|
|
874
|
-
report_token_usage(
|
|
875
|
-
input_tokens: 1500,
|
|
876
|
-
output_tokens: 500,
|
|
877
|
-
model: "opus" // or sonnet, haiku
|
|
878
|
-
)
|
|
879
|
-
\`\`\`
|
|
880
|
-
|
|
881
|
-
Call this after each API response using values from the response headers:
|
|
882
|
-
- \`usage.input_tokens\`
|
|
883
|
-
- \`usage.output_tokens\`
|
|
884
|
-
|
|
885
|
-
## Model Pricing
|
|
886
|
-
|
|
887
|
-
| Model | Input (per 1M) | Output (per 1M) |
|
|
888
|
-
|-------|---------------|-----------------|
|
|
889
|
-
| Opus | $15.00 | $75.00 |
|
|
890
|
-
| Sonnet | $3.00 | $15.00 |
|
|
891
|
-
| Haiku | $0.25 | $1.25 |
|
|
892
|
-
|
|
893
|
-
## Cost Monitoring
|
|
894
|
-
|
|
895
|
-
Get cost summary:
|
|
896
|
-
\`\`\`
|
|
897
|
-
get_cost_summary(project_id, period: "daily") // daily, weekly, monthly
|
|
898
|
-
\`\`\`
|
|
899
|
-
|
|
900
|
-
Set up alerts:
|
|
901
|
-
\`\`\`
|
|
902
|
-
add_cost_alert(
|
|
903
|
-
project_id,
|
|
904
|
-
threshold_amount: 100, // USD
|
|
905
|
-
threshold_period: "daily",
|
|
906
|
-
alert_type: "warning" // warning, critical
|
|
907
|
-
)
|
|
908
|
-
\`\`\`
|
|
909
|
-
|
|
910
|
-
## Context Management
|
|
911
|
-
|
|
912
|
-
When token usage is high:
|
|
913
|
-
1. Check with \`get_token_usage()\`
|
|
914
|
-
2. If 50+ calls or 100k+ tokens: \`/clear\`
|
|
915
|
-
3. Immediately call \`start_work_session()\`
|
|
916
|
-
4. Continue with \`next_task\`
|
|
917
|
-
|
|
918
|
-
**Don't ask permission** - just clear and continue.
|
|
919
|
-
|
|
920
|
-
## Efficiency Tips
|
|
921
|
-
|
|
922
|
-
1. **Use lite mode** (default) - saves ~85% tokens on session start
|
|
923
|
-
2. **Batch updates** - Use \`batch_update_tasks\` when updating multiple
|
|
924
|
-
3. **Use stats endpoints** - \`get_task_stats\` instead of listing all tasks
|
|
855
|
+
content: `# Token Usage & Cost Tracking
|
|
856
|
+
|
|
857
|
+
## Checking Usage
|
|
858
|
+
|
|
859
|
+
\`\`\`
|
|
860
|
+
get_token_usage()
|
|
861
|
+
\`\`\`
|
|
862
|
+
|
|
863
|
+
Returns:
|
|
864
|
+
- Session stats (calls, tokens, avg per call)
|
|
865
|
+
- Top tools by token usage
|
|
866
|
+
- Model breakdown (input/output tokens)
|
|
867
|
+
- Estimated costs
|
|
868
|
+
|
|
869
|
+
## Reporting Actual Usage
|
|
870
|
+
|
|
871
|
+
MCP estimates are only ~1-5% of actual API usage. For accurate tracking:
|
|
872
|
+
|
|
873
|
+
\`\`\`
|
|
874
|
+
report_token_usage(
|
|
875
|
+
input_tokens: 1500,
|
|
876
|
+
output_tokens: 500,
|
|
877
|
+
model: "opus" // or sonnet, haiku
|
|
878
|
+
)
|
|
879
|
+
\`\`\`
|
|
880
|
+
|
|
881
|
+
Call this after each API response using values from the response headers:
|
|
882
|
+
- \`usage.input_tokens\`
|
|
883
|
+
- \`usage.output_tokens\`
|
|
884
|
+
|
|
885
|
+
## Model Pricing
|
|
886
|
+
|
|
887
|
+
| Model | Input (per 1M) | Output (per 1M) |
|
|
888
|
+
|-------|---------------|-----------------|
|
|
889
|
+
| Opus | $15.00 | $75.00 |
|
|
890
|
+
| Sonnet | $3.00 | $15.00 |
|
|
891
|
+
| Haiku | $0.25 | $1.25 |
|
|
892
|
+
|
|
893
|
+
## Cost Monitoring
|
|
894
|
+
|
|
895
|
+
Get cost summary:
|
|
896
|
+
\`\`\`
|
|
897
|
+
get_cost_summary(project_id, period: "daily") // daily, weekly, monthly
|
|
898
|
+
\`\`\`
|
|
899
|
+
|
|
900
|
+
Set up alerts:
|
|
901
|
+
\`\`\`
|
|
902
|
+
add_cost_alert(
|
|
903
|
+
project_id,
|
|
904
|
+
threshold_amount: 100, // USD
|
|
905
|
+
threshold_period: "daily",
|
|
906
|
+
alert_type: "warning" // warning, critical
|
|
907
|
+
)
|
|
908
|
+
\`\`\`
|
|
909
|
+
|
|
910
|
+
## Context Management
|
|
911
|
+
|
|
912
|
+
When token usage is high:
|
|
913
|
+
1. Check with \`get_token_usage()\`
|
|
914
|
+
2. If 50+ calls or 100k+ tokens: \`/clear\`
|
|
915
|
+
3. Immediately call \`start_work_session()\`
|
|
916
|
+
4. Continue with \`next_task\`
|
|
917
|
+
|
|
918
|
+
**Don't ask permission** - just clear and continue.
|
|
919
|
+
|
|
920
|
+
## Efficiency Tips
|
|
921
|
+
|
|
922
|
+
1. **Use lite mode** (default) - saves ~85% tokens on session start
|
|
923
|
+
2. **Batch updates** - Use \`batch_update_tasks\` when updating multiple
|
|
924
|
+
3. **Use stats endpoints** - \`get_task_stats\` instead of listing all tasks
|
|
925
925
|
4. **Clear context regularly** - Don't let it grow unbounded`,
|
|
926
926
|
},
|
|
927
927
|
sprints: {
|
|
928
928
|
title: 'Sprint Management',
|
|
929
|
-
content: `# Sprint Management
|
|
930
|
-
|
|
931
|
-
Sprints are time-bounded work periods with velocity tracking.
|
|
932
|
-
|
|
933
|
-
## Creating a Sprint
|
|
934
|
-
|
|
935
|
-
\`\`\`
|
|
936
|
-
create_sprint(
|
|
937
|
-
project_id,
|
|
938
|
-
title: "Sprint 5",
|
|
939
|
-
start_date: "2025-01-20",
|
|
940
|
-
end_date: "2025-02-03",
|
|
941
|
-
goal: "Complete authentication and user profile features"
|
|
942
|
-
)
|
|
943
|
-
\`\`\`
|
|
944
|
-
|
|
945
|
-
## Sprint Lifecycle
|
|
946
|
-
|
|
947
|
-
1. **Planning** → Add tasks, assign story points
|
|
948
|
-
2. **Active** → Work on tasks
|
|
949
|
-
3. **In Review** → Review completed work
|
|
950
|
-
4. **Retrospective** → Reflect on sprint
|
|
951
|
-
5. **Completed** → Archive with metrics
|
|
952
|
-
|
|
953
|
-
## Adding Tasks to Sprint
|
|
954
|
-
|
|
955
|
-
\`\`\`
|
|
956
|
-
add_task_to_sprint(
|
|
957
|
-
sprint_id,
|
|
958
|
-
task_id,
|
|
959
|
-
story_points: 3,
|
|
960
|
-
phase: "core" // pre, core, post
|
|
961
|
-
)
|
|
962
|
-
\`\`\`
|
|
963
|
-
|
|
964
|
-
## Starting a Sprint
|
|
965
|
-
|
|
966
|
-
\`\`\`
|
|
967
|
-
start_sprint(sprint_id)
|
|
968
|
-
\`\`\`
|
|
969
|
-
|
|
970
|
-
This locks \`committed_points\` at the current total.
|
|
971
|
-
|
|
972
|
-
## Getting Sprint Backlog
|
|
973
|
-
|
|
974
|
-
Tasks available to add:
|
|
975
|
-
\`\`\`
|
|
976
|
-
get_sprint_backlog(project_id, sprint_id)
|
|
977
|
-
\`\`\`
|
|
978
|
-
|
|
979
|
-
## Sprint Progress
|
|
980
|
-
|
|
981
|
-
\`\`\`
|
|
982
|
-
get_sprint(sprint_id)
|
|
983
|
-
\`\`\`
|
|
984
|
-
|
|
985
|
-
With just counts (saves tokens):
|
|
986
|
-
\`\`\`
|
|
987
|
-
get_sprint(sprint_id, summary_only: true)
|
|
988
|
-
\`\`\`
|
|
989
|
-
|
|
990
|
-
## Completing a Sprint
|
|
991
|
-
|
|
992
|
-
\`\`\`
|
|
993
|
-
complete_sprint(
|
|
994
|
-
sprint_id,
|
|
995
|
-
retrospective_notes: "Completed 80% of planned work. Auth took longer than expected.",
|
|
996
|
-
skip_retrospective: false
|
|
997
|
-
)
|
|
998
|
-
\`\`\`
|
|
999
|
-
|
|
1000
|
-
## Velocity Tracking
|
|
1001
|
-
|
|
1002
|
-
\`\`\`
|
|
1003
|
-
get_sprint_velocity(project_id, limit: 10)
|
|
1004
|
-
\`\`\`
|
|
1005
|
-
|
|
1006
|
-
Returns:
|
|
1007
|
-
- Committed vs completed points per sprint
|
|
1008
|
-
- Average velocity
|
|
929
|
+
content: `# Sprint Management
|
|
930
|
+
|
|
931
|
+
Sprints are time-bounded work periods with velocity tracking.
|
|
932
|
+
|
|
933
|
+
## Creating a Sprint
|
|
934
|
+
|
|
935
|
+
\`\`\`
|
|
936
|
+
create_sprint(
|
|
937
|
+
project_id,
|
|
938
|
+
title: "Sprint 5",
|
|
939
|
+
start_date: "2025-01-20",
|
|
940
|
+
end_date: "2025-02-03",
|
|
941
|
+
goal: "Complete authentication and user profile features"
|
|
942
|
+
)
|
|
943
|
+
\`\`\`
|
|
944
|
+
|
|
945
|
+
## Sprint Lifecycle
|
|
946
|
+
|
|
947
|
+
1. **Planning** → Add tasks, assign story points
|
|
948
|
+
2. **Active** → Work on tasks
|
|
949
|
+
3. **In Review** → Review completed work
|
|
950
|
+
4. **Retrospective** → Reflect on sprint
|
|
951
|
+
5. **Completed** → Archive with metrics
|
|
952
|
+
|
|
953
|
+
## Adding Tasks to Sprint
|
|
954
|
+
|
|
955
|
+
\`\`\`
|
|
956
|
+
add_task_to_sprint(
|
|
957
|
+
sprint_id,
|
|
958
|
+
task_id,
|
|
959
|
+
story_points: 3,
|
|
960
|
+
phase: "core" // pre, core, post
|
|
961
|
+
)
|
|
962
|
+
\`\`\`
|
|
963
|
+
|
|
964
|
+
## Starting a Sprint
|
|
965
|
+
|
|
966
|
+
\`\`\`
|
|
967
|
+
start_sprint(sprint_id)
|
|
968
|
+
\`\`\`
|
|
969
|
+
|
|
970
|
+
This locks \`committed_points\` at the current total.
|
|
971
|
+
|
|
972
|
+
## Getting Sprint Backlog
|
|
973
|
+
|
|
974
|
+
Tasks available to add:
|
|
975
|
+
\`\`\`
|
|
976
|
+
get_sprint_backlog(project_id, sprint_id)
|
|
977
|
+
\`\`\`
|
|
978
|
+
|
|
979
|
+
## Sprint Progress
|
|
980
|
+
|
|
981
|
+
\`\`\`
|
|
982
|
+
get_sprint(sprint_id)
|
|
983
|
+
\`\`\`
|
|
984
|
+
|
|
985
|
+
With just counts (saves tokens):
|
|
986
|
+
\`\`\`
|
|
987
|
+
get_sprint(sprint_id, summary_only: true)
|
|
988
|
+
\`\`\`
|
|
989
|
+
|
|
990
|
+
## Completing a Sprint
|
|
991
|
+
|
|
992
|
+
\`\`\`
|
|
993
|
+
complete_sprint(
|
|
994
|
+
sprint_id,
|
|
995
|
+
retrospective_notes: "Completed 80% of planned work. Auth took longer than expected.",
|
|
996
|
+
skip_retrospective: false
|
|
997
|
+
)
|
|
998
|
+
\`\`\`
|
|
999
|
+
|
|
1000
|
+
## Velocity Tracking
|
|
1001
|
+
|
|
1002
|
+
\`\`\`
|
|
1003
|
+
get_sprint_velocity(project_id, limit: 10)
|
|
1004
|
+
\`\`\`
|
|
1005
|
+
|
|
1006
|
+
Returns:
|
|
1007
|
+
- Committed vs completed points per sprint
|
|
1008
|
+
- Average velocity
|
|
1009
1009
|
- Trend analysis`,
|
|
1010
1010
|
},
|
|
1011
1011
|
topics: {
|
|
1012
1012
|
title: 'Available Help Topics',
|
|
1013
|
-
content: `# Available Help Topics
|
|
1014
|
-
|
|
1015
|
-
Use \`get_help(topic)\` for detailed guidance on any topic.
|
|
1016
|
-
|
|
1017
|
-
## Core Topics
|
|
1018
|
-
|
|
1019
|
-
| Topic | Description |
|
|
1020
|
-
|-------|-------------|
|
|
1021
|
-
| \`getting_started\` | Quick start guide, core workflow |
|
|
1022
|
-
| \`session\` | Session lifecycle, heartbeats, context management |
|
|
1023
|
-
| \`tasks\` | Task management, progress tracking, completion |
|
|
1024
|
-
| \`validation\` | Cross-agent task validation workflow |
|
|
1025
|
-
| \`git\` | Git workflows, worktrees, branch management |
|
|
1026
|
-
| \`deployment\` | Deployment coordination, requirements |
|
|
1027
|
-
|
|
1028
|
-
## Task Organization
|
|
1029
|
-
|
|
1030
|
-
| Topic | Description |
|
|
1031
|
-
|-------|-------------|
|
|
1032
|
-
| \`milestones\` | Breaking down complex tasks into steps |
|
|
1033
|
-
| \`subtasks\` | Parallelizable task breakdown |
|
|
1034
|
-
| \`bodies_of_work\` | Group related tasks into phases |
|
|
1035
|
-
| \`sprints\` | Time-bounded sprints with velocity tracking |
|
|
1036
|
-
|
|
1037
|
-
## Collaboration
|
|
1038
|
-
|
|
1039
|
-
| Topic | Description |
|
|
1040
|
-
|-------|-------------|
|
|
1041
|
-
| \`roles\` | Agent roles and specialization |
|
|
1042
|
-
| \`file_locks\` | Multi-agent file coordination |
|
|
1043
|
-
| \`git_issues\` | Git conflict and issue tracking |
|
|
1044
|
-
| \`requests\` | Handle user questions from dashboard |
|
|
1045
|
-
|
|
1046
|
-
## Knowledge & Tracking
|
|
1047
|
-
|
|
1048
|
-
| Topic | Description |
|
|
1049
|
-
|-------|-------------|
|
|
1050
|
-
| \`blockers\` | Recording and resolving blockers |
|
|
1051
|
-
| \`knowledge\` | Project knowledge base |
|
|
1052
|
-
| \`ideas\` | Feature ideas and requests |
|
|
1053
|
-
| \`tokens\` | Token usage and cost tracking |
|
|
1054
|
-
| \`fallback\` | Background activities when idle |
|
|
1055
|
-
| \`connectors\` | External integrations (Slack, webhooks) |
|
|
1056
|
-
|
|
1057
|
-
## Quick Examples
|
|
1058
|
-
|
|
1059
|
-
\`\`\`
|
|
1060
|
-
get_help("getting_started") // New to Vibescope? Start here
|
|
1061
|
-
get_help("git") // Git worktree workflow
|
|
1062
|
-
get_help("validation") // How to validate tasks
|
|
1063
|
-
get_help("session") // Session management
|
|
1064
|
-
get_help("bodies_of_work") // Organizing related tasks
|
|
1013
|
+
content: `# Available Help Topics
|
|
1014
|
+
|
|
1015
|
+
Use \`get_help(topic)\` for detailed guidance on any topic.
|
|
1016
|
+
|
|
1017
|
+
## Core Topics
|
|
1018
|
+
|
|
1019
|
+
| Topic | Description |
|
|
1020
|
+
|-------|-------------|
|
|
1021
|
+
| \`getting_started\` | Quick start guide, core workflow |
|
|
1022
|
+
| \`session\` | Session lifecycle, heartbeats, context management |
|
|
1023
|
+
| \`tasks\` | Task management, progress tracking, completion |
|
|
1024
|
+
| \`validation\` | Cross-agent task validation workflow |
|
|
1025
|
+
| \`git\` | Git workflows, worktrees, branch management |
|
|
1026
|
+
| \`deployment\` | Deployment coordination, requirements |
|
|
1027
|
+
|
|
1028
|
+
## Task Organization
|
|
1029
|
+
|
|
1030
|
+
| Topic | Description |
|
|
1031
|
+
|-------|-------------|
|
|
1032
|
+
| \`milestones\` | Breaking down complex tasks into steps |
|
|
1033
|
+
| \`subtasks\` | Parallelizable task breakdown |
|
|
1034
|
+
| \`bodies_of_work\` | Group related tasks into phases |
|
|
1035
|
+
| \`sprints\` | Time-bounded sprints with velocity tracking |
|
|
1036
|
+
|
|
1037
|
+
## Collaboration
|
|
1038
|
+
|
|
1039
|
+
| Topic | Description |
|
|
1040
|
+
|-------|-------------|
|
|
1041
|
+
| \`roles\` | Agent roles and specialization |
|
|
1042
|
+
| \`file_locks\` | Multi-agent file coordination |
|
|
1043
|
+
| \`git_issues\` | Git conflict and issue tracking |
|
|
1044
|
+
| \`requests\` | Handle user questions from dashboard |
|
|
1045
|
+
|
|
1046
|
+
## Knowledge & Tracking
|
|
1047
|
+
|
|
1048
|
+
| Topic | Description |
|
|
1049
|
+
|-------|-------------|
|
|
1050
|
+
| \`blockers\` | Recording and resolving blockers |
|
|
1051
|
+
| \`knowledge\` | Project knowledge base |
|
|
1052
|
+
| \`ideas\` | Feature ideas and requests |
|
|
1053
|
+
| \`tokens\` | Token usage and cost tracking |
|
|
1054
|
+
| \`fallback\` | Background activities when idle |
|
|
1055
|
+
| \`connectors\` | External integrations (Slack, webhooks) |
|
|
1056
|
+
|
|
1057
|
+
## Quick Examples
|
|
1058
|
+
|
|
1059
|
+
\`\`\`
|
|
1060
|
+
get_help("getting_started") // New to Vibescope? Start here
|
|
1061
|
+
get_help("git") // Git worktree workflow
|
|
1062
|
+
get_help("validation") // How to validate tasks
|
|
1063
|
+
get_help("session") // Session management
|
|
1064
|
+
get_help("bodies_of_work") // Organizing related tasks
|
|
1065
1065
|
\`\`\``,
|
|
1066
1066
|
},
|
|
1067
1067
|
roles: {
|
|
1068
1068
|
title: 'Agent Roles',
|
|
1069
|
-
content: `# Agent Roles
|
|
1070
|
-
|
|
1071
|
-
Roles specialize agents for different types of work.
|
|
1072
|
-
|
|
1073
|
-
## Available Roles
|
|
1074
|
-
|
|
1075
|
-
| Role | Description |
|
|
1076
|
-
|------|-------------|
|
|
1077
|
-
| \`developer\` | General development work (default) |
|
|
1078
|
-
| \`validator\` | Reviews and validates completed tasks |
|
|
1079
|
-
| \`deployer\` | Handles deployments |
|
|
1080
|
-
| \`reviewer\` | Code review focus |
|
|
1081
|
-
| \`maintainer\` | Housekeeping and maintenance |
|
|
1082
|
-
|
|
1083
|
-
## Setting Your Role
|
|
1084
|
-
|
|
1085
|
-
At session start:
|
|
1086
|
-
\`\`\`
|
|
1087
|
-
start_work_session(git_url, model, role: "validator")
|
|
1088
|
-
\`\`\`
|
|
1089
|
-
|
|
1090
|
-
Or mid-session:
|
|
1091
|
-
\`\`\`
|
|
1092
|
-
set_session_role(role: "validator")
|
|
1093
|
-
\`\`\`
|
|
1094
|
-
|
|
1095
|
-
## Role Configuration
|
|
1096
|
-
|
|
1097
|
-
View project role settings:
|
|
1098
|
-
\`\`\`
|
|
1099
|
-
get_role_settings(project_id)
|
|
1100
|
-
\`\`\`
|
|
1101
|
-
|
|
1102
|
-
Configure role behavior:
|
|
1103
|
-
\`\`\`
|
|
1104
|
-
update_role_settings(
|
|
1105
|
-
project_id,
|
|
1106
|
-
role: "validator",
|
|
1107
|
-
enabled: true,
|
|
1108
|
-
auto_assign_validation: true,
|
|
1109
|
-
fallback_activities: ["code_review", "security_review"]
|
|
1110
|
-
)
|
|
1111
|
-
\`\`\`
|
|
1112
|
-
|
|
1113
|
-
## Viewing Agents by Role
|
|
1114
|
-
|
|
1115
|
-
\`\`\`
|
|
1116
|
-
get_agents_by_role(project_id)
|
|
1117
|
-
\`\`\`
|
|
1118
|
-
|
|
1119
|
-
With counts only (saves tokens):
|
|
1120
|
-
\`\`\`
|
|
1121
|
-
get_agents_by_role(project_id, counts_only: true)
|
|
1122
|
-
\`\`\`
|
|
1123
|
-
|
|
1124
|
-
## Role-Specific Workflows
|
|
1125
|
-
|
|
1126
|
-
**Developer:**
|
|
1127
|
-
- Gets tasks via \`get_next_task\`
|
|
1128
|
-
- Creates PRs
|
|
1129
|
-
- Calls \`complete_task\`
|
|
1130
|
-
|
|
1131
|
-
**Validator:**
|
|
1132
|
-
- Gets tasks via \`get_tasks_awaiting_validation\`
|
|
1133
|
-
- Reviews code, runs tests
|
|
1134
|
-
- Approves/rejects via \`validate_task\`
|
|
1135
|
-
- Merges PRs on approval
|
|
1136
|
-
|
|
1137
|
-
**Deployer:**
|
|
1138
|
-
- Checks \`check_deployment_status\`
|
|
1139
|
-
- Validates deployments
|
|
1140
|
-
- Executes deployments
|
|
1069
|
+
content: `# Agent Roles
|
|
1070
|
+
|
|
1071
|
+
Roles specialize agents for different types of work.
|
|
1072
|
+
|
|
1073
|
+
## Available Roles
|
|
1074
|
+
|
|
1075
|
+
| Role | Description |
|
|
1076
|
+
|------|-------------|
|
|
1077
|
+
| \`developer\` | General development work (default) |
|
|
1078
|
+
| \`validator\` | Reviews and validates completed tasks |
|
|
1079
|
+
| \`deployer\` | Handles deployments |
|
|
1080
|
+
| \`reviewer\` | Code review focus |
|
|
1081
|
+
| \`maintainer\` | Housekeeping and maintenance |
|
|
1082
|
+
|
|
1083
|
+
## Setting Your Role
|
|
1084
|
+
|
|
1085
|
+
At session start:
|
|
1086
|
+
\`\`\`
|
|
1087
|
+
start_work_session(git_url, model, role: "validator")
|
|
1088
|
+
\`\`\`
|
|
1089
|
+
|
|
1090
|
+
Or mid-session:
|
|
1091
|
+
\`\`\`
|
|
1092
|
+
set_session_role(role: "validator")
|
|
1093
|
+
\`\`\`
|
|
1094
|
+
|
|
1095
|
+
## Role Configuration
|
|
1096
|
+
|
|
1097
|
+
View project role settings:
|
|
1098
|
+
\`\`\`
|
|
1099
|
+
get_role_settings(project_id)
|
|
1100
|
+
\`\`\`
|
|
1101
|
+
|
|
1102
|
+
Configure role behavior:
|
|
1103
|
+
\`\`\`
|
|
1104
|
+
update_role_settings(
|
|
1105
|
+
project_id,
|
|
1106
|
+
role: "validator",
|
|
1107
|
+
enabled: true,
|
|
1108
|
+
auto_assign_validation: true,
|
|
1109
|
+
fallback_activities: ["code_review", "security_review"]
|
|
1110
|
+
)
|
|
1111
|
+
\`\`\`
|
|
1112
|
+
|
|
1113
|
+
## Viewing Agents by Role
|
|
1114
|
+
|
|
1115
|
+
\`\`\`
|
|
1116
|
+
get_agents_by_role(project_id)
|
|
1117
|
+
\`\`\`
|
|
1118
|
+
|
|
1119
|
+
With counts only (saves tokens):
|
|
1120
|
+
\`\`\`
|
|
1121
|
+
get_agents_by_role(project_id, counts_only: true)
|
|
1122
|
+
\`\`\`
|
|
1123
|
+
|
|
1124
|
+
## Role-Specific Workflows
|
|
1125
|
+
|
|
1126
|
+
**Developer:**
|
|
1127
|
+
- Gets tasks via \`get_next_task\`
|
|
1128
|
+
- Creates PRs
|
|
1129
|
+
- Calls \`complete_task\`
|
|
1130
|
+
|
|
1131
|
+
**Validator:**
|
|
1132
|
+
- Gets tasks via \`get_tasks_awaiting_validation\`
|
|
1133
|
+
- Reviews code, runs tests
|
|
1134
|
+
- Approves/rejects via \`validate_task\`
|
|
1135
|
+
- Merges PRs on approval
|
|
1136
|
+
|
|
1137
|
+
**Deployer:**
|
|
1138
|
+
- Checks \`check_deployment_status\`
|
|
1139
|
+
- Validates deployments
|
|
1140
|
+
- Executes deployments
|
|
1141
1141
|
- Handles rollbacks`,
|
|
1142
1142
|
},
|
|
1143
1143
|
knowledge: {
|
|
1144
1144
|
title: 'Project Knowledge Base',
|
|
1145
|
-
content: `# Project Knowledge Base
|
|
1146
|
-
|
|
1147
|
-
Query aggregated project knowledge efficiently.
|
|
1148
|
-
|
|
1149
|
-
## Querying Knowledge
|
|
1150
|
-
|
|
1151
|
-
\`\`\`
|
|
1152
|
-
query_knowledge_base(
|
|
1153
|
-
project_id,
|
|
1154
|
-
categories: ["findings", "decisions", "completed_tasks"],
|
|
1155
|
-
scope: "summary", // summary or detailed
|
|
1156
|
-
limit: 10,
|
|
1157
|
-
search_query: "authentication"
|
|
1158
|
-
)
|
|
1159
|
-
\`\`\`
|
|
1160
|
-
|
|
1161
|
-
## Categories
|
|
1162
|
-
|
|
1163
|
-
| Category | Description |
|
|
1164
|
-
|----------|-------------|
|
|
1165
|
-
| \`findings\` | Audit findings, code issues |
|
|
1166
|
-
| \`qa\` | Questions and answers |
|
|
1167
|
-
| \`decisions\` | Architectural decisions |
|
|
1168
|
-
| \`completed_tasks\` | Recently completed work |
|
|
1169
|
-
| \`blockers\` | Resolved blockers |
|
|
1170
|
-
| \`progress\` | Progress updates |
|
|
1171
|
-
|
|
1172
|
-
## Recording Knowledge
|
|
1173
|
-
|
|
1174
|
-
### Findings
|
|
1175
|
-
\`\`\`
|
|
1176
|
-
add_finding(
|
|
1177
|
-
project_id,
|
|
1178
|
-
title: "N+1 query in user list",
|
|
1179
|
-
category: "performance",
|
|
1180
|
-
severity: "medium",
|
|
1181
|
-
description: "User list makes N+1 queries for profile images",
|
|
1182
|
-
file_path: "src/api/users.ts"
|
|
1183
|
-
)
|
|
1184
|
-
\`\`\`
|
|
1185
|
-
|
|
1186
|
-
### Decisions
|
|
1187
|
-
\`\`\`
|
|
1188
|
-
log_decision(
|
|
1189
|
-
project_id,
|
|
1190
|
-
title: "Use PostgreSQL for database",
|
|
1191
|
-
description: "Selected PostgreSQL over MongoDB",
|
|
1192
|
-
rationale: "Better support for complex queries and transactions",
|
|
1193
|
-
alternatives_considered: ["MongoDB", "MySQL"]
|
|
1194
|
-
)
|
|
1195
|
-
\`\`\`
|
|
1196
|
-
|
|
1197
|
-
### Ideas
|
|
1198
|
-
\`\`\`
|
|
1199
|
-
add_idea(
|
|
1200
|
-
project_id,
|
|
1201
|
-
title: "Add caching layer",
|
|
1202
|
-
description: "Redis cache for frequently accessed data",
|
|
1203
|
-
status: "raw" // raw, exploring, planned, in_development, shipped
|
|
1204
|
-
)
|
|
1205
|
-
\`\`\`
|
|
1206
|
-
|
|
1207
|
-
## Efficiency
|
|
1208
|
-
|
|
1209
|
-
Use \`query_knowledge_base\` instead of multiple separate calls:
|
|
1210
|
-
- Single call returns aggregated data
|
|
1211
|
-
- Filter by category to reduce response size
|
|
1145
|
+
content: `# Project Knowledge Base
|
|
1146
|
+
|
|
1147
|
+
Query aggregated project knowledge efficiently.
|
|
1148
|
+
|
|
1149
|
+
## Querying Knowledge
|
|
1150
|
+
|
|
1151
|
+
\`\`\`
|
|
1152
|
+
query_knowledge_base(
|
|
1153
|
+
project_id,
|
|
1154
|
+
categories: ["findings", "decisions", "completed_tasks"],
|
|
1155
|
+
scope: "summary", // summary or detailed
|
|
1156
|
+
limit: 10,
|
|
1157
|
+
search_query: "authentication"
|
|
1158
|
+
)
|
|
1159
|
+
\`\`\`
|
|
1160
|
+
|
|
1161
|
+
## Categories
|
|
1162
|
+
|
|
1163
|
+
| Category | Description |
|
|
1164
|
+
|----------|-------------|
|
|
1165
|
+
| \`findings\` | Audit findings, code issues |
|
|
1166
|
+
| \`qa\` | Questions and answers |
|
|
1167
|
+
| \`decisions\` | Architectural decisions |
|
|
1168
|
+
| \`completed_tasks\` | Recently completed work |
|
|
1169
|
+
| \`blockers\` | Resolved blockers |
|
|
1170
|
+
| \`progress\` | Progress updates |
|
|
1171
|
+
|
|
1172
|
+
## Recording Knowledge
|
|
1173
|
+
|
|
1174
|
+
### Findings
|
|
1175
|
+
\`\`\`
|
|
1176
|
+
add_finding(
|
|
1177
|
+
project_id,
|
|
1178
|
+
title: "N+1 query in user list",
|
|
1179
|
+
category: "performance",
|
|
1180
|
+
severity: "medium",
|
|
1181
|
+
description: "User list makes N+1 queries for profile images",
|
|
1182
|
+
file_path: "src/api/users.ts"
|
|
1183
|
+
)
|
|
1184
|
+
\`\`\`
|
|
1185
|
+
|
|
1186
|
+
### Decisions
|
|
1187
|
+
\`\`\`
|
|
1188
|
+
log_decision(
|
|
1189
|
+
project_id,
|
|
1190
|
+
title: "Use PostgreSQL for database",
|
|
1191
|
+
description: "Selected PostgreSQL over MongoDB",
|
|
1192
|
+
rationale: "Better support for complex queries and transactions",
|
|
1193
|
+
alternatives_considered: ["MongoDB", "MySQL"]
|
|
1194
|
+
)
|
|
1195
|
+
\`\`\`
|
|
1196
|
+
|
|
1197
|
+
### Ideas
|
|
1198
|
+
\`\`\`
|
|
1199
|
+
add_idea(
|
|
1200
|
+
project_id,
|
|
1201
|
+
title: "Add caching layer",
|
|
1202
|
+
description: "Redis cache for frequently accessed data",
|
|
1203
|
+
status: "raw" // raw, exploring, planned, in_development, shipped
|
|
1204
|
+
)
|
|
1205
|
+
\`\`\`
|
|
1206
|
+
|
|
1207
|
+
## Efficiency
|
|
1208
|
+
|
|
1209
|
+
Use \`query_knowledge_base\` instead of multiple separate calls:
|
|
1210
|
+
- Single call returns aggregated data
|
|
1211
|
+
- Filter by category to reduce response size
|
|
1212
1212
|
- Use \`summary\` scope for token efficiency`,
|
|
1213
1213
|
},
|
|
1214
1214
|
bodies_of_work: {
|
|
1215
1215
|
title: 'Bodies of Work',
|
|
1216
|
-
content: `# Bodies of Work
|
|
1217
|
-
|
|
1218
|
-
Bodies of work group related tasks into phases for coordinated execution.
|
|
1219
|
-
|
|
1220
|
-
## Creating a Body of Work
|
|
1221
|
-
|
|
1222
|
-
\`\`\`
|
|
1223
|
-
create_body_of_work(
|
|
1224
|
-
project_id,
|
|
1225
|
-
title: "User Authentication Feature",
|
|
1226
|
-
description: "Complete auth system with OAuth support",
|
|
1227
|
-
auto_deploy_on_completion: true,
|
|
1228
|
-
deploy_version_bump: "minor"
|
|
1229
|
-
)
|
|
1230
|
-
\`\`\`
|
|
1231
|
-
|
|
1232
|
-
## Task Phases
|
|
1233
|
-
|
|
1234
|
-
Tasks are organized into three phases:
|
|
1235
|
-
- **pre** - Setup, migrations, dependencies
|
|
1236
|
-
- **core** - Main implementation work
|
|
1237
|
-
- **post** - Cleanup, documentation, verification
|
|
1238
|
-
|
|
1239
|
-
## Adding Tasks
|
|
1240
|
-
|
|
1241
|
-
\`\`\`
|
|
1242
|
-
add_task_to_body_of_work(
|
|
1243
|
-
body_of_work_id,
|
|
1244
|
-
task_id,
|
|
1245
|
-
phase: "core" // pre, core, post
|
|
1246
|
-
)
|
|
1247
|
-
\`\`\`
|
|
1248
|
-
|
|
1249
|
-
## Task Dependencies
|
|
1250
|
-
|
|
1251
|
-
Create dependencies between tasks:
|
|
1252
|
-
\`\`\`
|
|
1253
|
-
add_task_dependency(
|
|
1254
|
-
body_of_work_id,
|
|
1255
|
-
task_id: "frontend-task",
|
|
1256
|
-
depends_on_task_id: "api-task"
|
|
1257
|
-
)
|
|
1258
|
-
\`\`\`
|
|
1259
|
-
|
|
1260
|
-
The dependent task won't be available until its dependencies are complete.
|
|
1261
|
-
|
|
1262
|
-
## Activating
|
|
1263
|
-
|
|
1264
|
-
Bodies of work start in "draft" status. Activate to begin:
|
|
1265
|
-
\`\`\`
|
|
1266
|
-
activate_body_of_work(body_of_work_id)
|
|
1267
|
-
\`\`\`
|
|
1268
|
-
|
|
1269
|
-
## Getting Next Task
|
|
1270
|
-
|
|
1271
|
-
\`\`\`
|
|
1272
|
-
get_next_body_of_work_task(body_of_work_id)
|
|
1273
|
-
\`\`\`
|
|
1274
|
-
|
|
1275
|
-
Returns the next available task considering:
|
|
1276
|
-
- Phase order (pre → core → post)
|
|
1277
|
-
- Task dependencies
|
|
1278
|
-
- Task status
|
|
1279
|
-
|
|
1280
|
-
## Viewing Bodies of Work
|
|
1281
|
-
|
|
1282
|
-
\`\`\`
|
|
1283
|
-
get_body_of_work(body_of_work_id) // Single BOW with tasks
|
|
1284
|
-
get_bodies_of_work(project_id) // All BOWs for project
|
|
1285
|
-
\`\`\`
|
|
1286
|
-
|
|
1287
|
-
## Auto-Deployment
|
|
1288
|
-
|
|
1289
|
-
If \`auto_deploy_on_completion: true\`, a deployment is automatically requested when all tasks complete.
|
|
1290
|
-
|
|
1291
|
-
Configure the trigger:
|
|
1292
|
-
- \`all_completed\` - Deploy immediately when all tasks done
|
|
1216
|
+
content: `# Bodies of Work
|
|
1217
|
+
|
|
1218
|
+
Bodies of work group related tasks into phases for coordinated execution.
|
|
1219
|
+
|
|
1220
|
+
## Creating a Body of Work
|
|
1221
|
+
|
|
1222
|
+
\`\`\`
|
|
1223
|
+
create_body_of_work(
|
|
1224
|
+
project_id,
|
|
1225
|
+
title: "User Authentication Feature",
|
|
1226
|
+
description: "Complete auth system with OAuth support",
|
|
1227
|
+
auto_deploy_on_completion: true,
|
|
1228
|
+
deploy_version_bump: "minor"
|
|
1229
|
+
)
|
|
1230
|
+
\`\`\`
|
|
1231
|
+
|
|
1232
|
+
## Task Phases
|
|
1233
|
+
|
|
1234
|
+
Tasks are organized into three phases:
|
|
1235
|
+
- **pre** - Setup, migrations, dependencies
|
|
1236
|
+
- **core** - Main implementation work
|
|
1237
|
+
- **post** - Cleanup, documentation, verification
|
|
1238
|
+
|
|
1239
|
+
## Adding Tasks
|
|
1240
|
+
|
|
1241
|
+
\`\`\`
|
|
1242
|
+
add_task_to_body_of_work(
|
|
1243
|
+
body_of_work_id,
|
|
1244
|
+
task_id,
|
|
1245
|
+
phase: "core" // pre, core, post
|
|
1246
|
+
)
|
|
1247
|
+
\`\`\`
|
|
1248
|
+
|
|
1249
|
+
## Task Dependencies
|
|
1250
|
+
|
|
1251
|
+
Create dependencies between tasks:
|
|
1252
|
+
\`\`\`
|
|
1253
|
+
add_task_dependency(
|
|
1254
|
+
body_of_work_id,
|
|
1255
|
+
task_id: "frontend-task",
|
|
1256
|
+
depends_on_task_id: "api-task"
|
|
1257
|
+
)
|
|
1258
|
+
\`\`\`
|
|
1259
|
+
|
|
1260
|
+
The dependent task won't be available until its dependencies are complete.
|
|
1261
|
+
|
|
1262
|
+
## Activating
|
|
1263
|
+
|
|
1264
|
+
Bodies of work start in "draft" status. Activate to begin:
|
|
1265
|
+
\`\`\`
|
|
1266
|
+
activate_body_of_work(body_of_work_id)
|
|
1267
|
+
\`\`\`
|
|
1268
|
+
|
|
1269
|
+
## Getting Next Task
|
|
1270
|
+
|
|
1271
|
+
\`\`\`
|
|
1272
|
+
get_next_body_of_work_task(body_of_work_id)
|
|
1273
|
+
\`\`\`
|
|
1274
|
+
|
|
1275
|
+
Returns the next available task considering:
|
|
1276
|
+
- Phase order (pre → core → post)
|
|
1277
|
+
- Task dependencies
|
|
1278
|
+
- Task status
|
|
1279
|
+
|
|
1280
|
+
## Viewing Bodies of Work
|
|
1281
|
+
|
|
1282
|
+
\`\`\`
|
|
1283
|
+
get_body_of_work(body_of_work_id) // Single BOW with tasks
|
|
1284
|
+
get_bodies_of_work(project_id) // All BOWs for project
|
|
1285
|
+
\`\`\`
|
|
1286
|
+
|
|
1287
|
+
## Auto-Deployment
|
|
1288
|
+
|
|
1289
|
+
If \`auto_deploy_on_completion: true\`, a deployment is automatically requested when all tasks complete.
|
|
1290
|
+
|
|
1291
|
+
Configure the trigger:
|
|
1292
|
+
- \`all_completed\` - Deploy immediately when all tasks done
|
|
1293
1293
|
- \`all_completed_validated\` - Wait for validation first`,
|
|
1294
1294
|
},
|
|
1295
1295
|
subtasks: {
|
|
1296
1296
|
title: 'Subtasks',
|
|
1297
|
-
content: `# Subtasks
|
|
1298
|
-
|
|
1299
|
-
Subtasks break down larger tasks into smaller, parallelizable pieces.
|
|
1300
|
-
|
|
1301
|
-
## Adding Subtasks
|
|
1302
|
-
|
|
1303
|
-
\`\`\`
|
|
1304
|
-
add_subtask(
|
|
1305
|
-
parent_task_id,
|
|
1306
|
-
title: "Implement login form UI",
|
|
1307
|
-
description: "Create React component for login form",
|
|
1308
|
-
priority: 2,
|
|
1309
|
-
estimated_minutes: 60
|
|
1310
|
-
)
|
|
1311
|
-
\`\`\`
|
|
1312
|
-
|
|
1313
|
-
## Viewing Subtasks
|
|
1314
|
-
|
|
1315
|
-
\`\`\`
|
|
1316
|
-
get_subtasks(parent_task_id)
|
|
1317
|
-
\`\`\`
|
|
1318
|
-
|
|
1319
|
-
Or include when getting task:
|
|
1320
|
-
\`\`\`
|
|
1321
|
-
get_task(task_id, include_subtasks: true)
|
|
1322
|
-
\`\`\`
|
|
1323
|
-
|
|
1324
|
-
## Working on Subtasks
|
|
1325
|
-
|
|
1326
|
-
Subtasks work just like regular tasks:
|
|
1327
|
-
\`\`\`
|
|
1328
|
-
update_task(subtask_id, status: "in_progress")
|
|
1329
|
-
complete_task(subtask_id, summary: "Completed login form")
|
|
1330
|
-
\`\`\`
|
|
1331
|
-
|
|
1332
|
-
## Subtasks vs Milestones
|
|
1333
|
-
|
|
1334
|
-
| Subtasks | Milestones |
|
|
1335
|
-
|----------|------------|
|
|
1336
|
-
| Independent units of work | Sequential steps |
|
|
1337
|
-
| Can be claimed by any agent | Same agent completes all |
|
|
1338
|
-
| Parallel execution | One at a time |
|
|
1339
|
-
| Full task lifecycle | Simple status tracking |
|
|
1340
|
-
|
|
1341
|
-
**Use subtasks when:**
|
|
1342
|
-
- Work can be done in parallel by multiple agents
|
|
1343
|
-
- Each piece is independent and self-contained
|
|
1344
|
-
- You want to delegate work
|
|
1345
|
-
|
|
1346
|
-
**Use milestones when:**
|
|
1347
|
-
- Steps must be done in order
|
|
1348
|
-
- Same person does all steps
|
|
1349
|
-
- Just need progress tracking
|
|
1350
|
-
|
|
1351
|
-
## Constraints
|
|
1352
|
-
|
|
1353
|
-
- Max depth is 1 (subtasks cannot have their own subtasks)
|
|
1354
|
-
- Subtasks inherit project from parent task
|
|
1297
|
+
content: `# Subtasks
|
|
1298
|
+
|
|
1299
|
+
Subtasks break down larger tasks into smaller, parallelizable pieces.
|
|
1300
|
+
|
|
1301
|
+
## Adding Subtasks
|
|
1302
|
+
|
|
1303
|
+
\`\`\`
|
|
1304
|
+
add_subtask(
|
|
1305
|
+
parent_task_id,
|
|
1306
|
+
title: "Implement login form UI",
|
|
1307
|
+
description: "Create React component for login form",
|
|
1308
|
+
priority: 2,
|
|
1309
|
+
estimated_minutes: 60
|
|
1310
|
+
)
|
|
1311
|
+
\`\`\`
|
|
1312
|
+
|
|
1313
|
+
## Viewing Subtasks
|
|
1314
|
+
|
|
1315
|
+
\`\`\`
|
|
1316
|
+
get_subtasks(parent_task_id)
|
|
1317
|
+
\`\`\`
|
|
1318
|
+
|
|
1319
|
+
Or include when getting task:
|
|
1320
|
+
\`\`\`
|
|
1321
|
+
get_task(task_id, include_subtasks: true)
|
|
1322
|
+
\`\`\`
|
|
1323
|
+
|
|
1324
|
+
## Working on Subtasks
|
|
1325
|
+
|
|
1326
|
+
Subtasks work just like regular tasks:
|
|
1327
|
+
\`\`\`
|
|
1328
|
+
update_task(subtask_id, status: "in_progress")
|
|
1329
|
+
complete_task(subtask_id, summary: "Completed login form")
|
|
1330
|
+
\`\`\`
|
|
1331
|
+
|
|
1332
|
+
## Subtasks vs Milestones
|
|
1333
|
+
|
|
1334
|
+
| Subtasks | Milestones |
|
|
1335
|
+
|----------|------------|
|
|
1336
|
+
| Independent units of work | Sequential steps |
|
|
1337
|
+
| Can be claimed by any agent | Same agent completes all |
|
|
1338
|
+
| Parallel execution | One at a time |
|
|
1339
|
+
| Full task lifecycle | Simple status tracking |
|
|
1340
|
+
|
|
1341
|
+
**Use subtasks when:**
|
|
1342
|
+
- Work can be done in parallel by multiple agents
|
|
1343
|
+
- Each piece is independent and self-contained
|
|
1344
|
+
- You want to delegate work
|
|
1345
|
+
|
|
1346
|
+
**Use milestones when:**
|
|
1347
|
+
- Steps must be done in order
|
|
1348
|
+
- Same person does all steps
|
|
1349
|
+
- Just need progress tracking
|
|
1350
|
+
|
|
1351
|
+
## Constraints
|
|
1352
|
+
|
|
1353
|
+
- Max depth is 1 (subtasks cannot have their own subtasks)
|
|
1354
|
+
- Subtasks inherit project from parent task
|
|
1355
1355
|
- Parent task completion is independent of subtasks`,
|
|
1356
1356
|
},
|
|
1357
1357
|
file_locks: {
|
|
1358
1358
|
title: 'File Locking',
|
|
1359
|
-
content: `# File Locking (Multi-Agent Coordination)
|
|
1360
|
-
|
|
1361
|
-
Prevent conflicts when multiple agents work on the same files.
|
|
1362
|
-
|
|
1363
|
-
## Checking Availability
|
|
1364
|
-
|
|
1365
|
-
Before editing a file:
|
|
1366
|
-
\`\`\`
|
|
1367
|
-
is_file_available(project_id, file_path: "src/api/users.ts")
|
|
1368
|
-
\`\`\`
|
|
1369
|
-
|
|
1370
|
-
Returns whether the file is free or who has it locked.
|
|
1371
|
-
|
|
1372
|
-
## Checking Out Files
|
|
1373
|
-
|
|
1374
|
-
Lock a file before editing:
|
|
1375
|
-
\`\`\`
|
|
1376
|
-
checkout_file(
|
|
1377
|
-
project_id,
|
|
1378
|
-
file_path: "src/api/users.ts",
|
|
1379
|
-
reason: "Fixing authentication bug"
|
|
1380
|
-
)
|
|
1381
|
-
\`\`\`
|
|
1382
|
-
|
|
1383
|
-
## Checking In Files
|
|
1384
|
-
|
|
1385
|
-
Release the file when done:
|
|
1386
|
-
\`\`\`
|
|
1387
|
-
checkin_file(
|
|
1388
|
-
checkout_id,
|
|
1389
|
-
summary: "Fixed token validation logic"
|
|
1390
|
-
)
|
|
1391
|
-
\`\`\`
|
|
1392
|
-
|
|
1393
|
-
Or by path:
|
|
1394
|
-
\`\`\`
|
|
1395
|
-
checkin_file(
|
|
1396
|
-
project_id,
|
|
1397
|
-
file_path: "src/api/users.ts",
|
|
1398
|
-
summary: "Fixed token validation logic"
|
|
1399
|
-
)
|
|
1400
|
-
\`\`\`
|
|
1401
|
-
|
|
1402
|
-
## Viewing Checkouts
|
|
1403
|
-
|
|
1404
|
-
\`\`\`
|
|
1405
|
-
get_file_checkouts(project_id) // Active checkouts
|
|
1406
|
-
get_file_checkouts(project_id, status: "checked_in") // Completed
|
|
1407
|
-
get_file_checkouts_stats(project_id) // Just counts
|
|
1408
|
-
\`\`\`
|
|
1409
|
-
|
|
1410
|
-
## Handling Abandoned Locks
|
|
1411
|
-
|
|
1412
|
-
If an agent session dies with a file locked:
|
|
1413
|
-
\`\`\`
|
|
1414
|
-
abandon_checkout(
|
|
1415
|
-
checkout_id,
|
|
1416
|
-
reason: "Agent session terminated"
|
|
1417
|
-
)
|
|
1418
|
-
\`\`\`
|
|
1419
|
-
|
|
1420
|
-
## Best Practices
|
|
1421
|
-
|
|
1422
|
-
1. **Always check availability** before editing shared files
|
|
1423
|
-
2. **Keep locks short** - check in as soon as you're done
|
|
1424
|
-
3. **Use meaningful reasons** - helps others understand why file is locked
|
|
1425
|
-
4. **Check in even if no changes** - releases the lock for others
|
|
1359
|
+
content: `# File Locking (Multi-Agent Coordination)
|
|
1360
|
+
|
|
1361
|
+
Prevent conflicts when multiple agents work on the same files.
|
|
1362
|
+
|
|
1363
|
+
## Checking Availability
|
|
1364
|
+
|
|
1365
|
+
Before editing a file:
|
|
1366
|
+
\`\`\`
|
|
1367
|
+
is_file_available(project_id, file_path: "src/api/users.ts")
|
|
1368
|
+
\`\`\`
|
|
1369
|
+
|
|
1370
|
+
Returns whether the file is free or who has it locked.
|
|
1371
|
+
|
|
1372
|
+
## Checking Out Files
|
|
1373
|
+
|
|
1374
|
+
Lock a file before editing:
|
|
1375
|
+
\`\`\`
|
|
1376
|
+
checkout_file(
|
|
1377
|
+
project_id,
|
|
1378
|
+
file_path: "src/api/users.ts",
|
|
1379
|
+
reason: "Fixing authentication bug"
|
|
1380
|
+
)
|
|
1381
|
+
\`\`\`
|
|
1382
|
+
|
|
1383
|
+
## Checking In Files
|
|
1384
|
+
|
|
1385
|
+
Release the file when done:
|
|
1386
|
+
\`\`\`
|
|
1387
|
+
checkin_file(
|
|
1388
|
+
checkout_id,
|
|
1389
|
+
summary: "Fixed token validation logic"
|
|
1390
|
+
)
|
|
1391
|
+
\`\`\`
|
|
1392
|
+
|
|
1393
|
+
Or by path:
|
|
1394
|
+
\`\`\`
|
|
1395
|
+
checkin_file(
|
|
1396
|
+
project_id,
|
|
1397
|
+
file_path: "src/api/users.ts",
|
|
1398
|
+
summary: "Fixed token validation logic"
|
|
1399
|
+
)
|
|
1400
|
+
\`\`\`
|
|
1401
|
+
|
|
1402
|
+
## Viewing Checkouts
|
|
1403
|
+
|
|
1404
|
+
\`\`\`
|
|
1405
|
+
get_file_checkouts(project_id) // Active checkouts
|
|
1406
|
+
get_file_checkouts(project_id, status: "checked_in") // Completed
|
|
1407
|
+
get_file_checkouts_stats(project_id) // Just counts
|
|
1408
|
+
\`\`\`
|
|
1409
|
+
|
|
1410
|
+
## Handling Abandoned Locks
|
|
1411
|
+
|
|
1412
|
+
If an agent session dies with a file locked:
|
|
1413
|
+
\`\`\`
|
|
1414
|
+
abandon_checkout(
|
|
1415
|
+
checkout_id,
|
|
1416
|
+
reason: "Agent session terminated"
|
|
1417
|
+
)
|
|
1418
|
+
\`\`\`
|
|
1419
|
+
|
|
1420
|
+
## Best Practices
|
|
1421
|
+
|
|
1422
|
+
1. **Always check availability** before editing shared files
|
|
1423
|
+
2. **Keep locks short** - check in as soon as you're done
|
|
1424
|
+
3. **Use meaningful reasons** - helps others understand why file is locked
|
|
1425
|
+
4. **Check in even if no changes** - releases the lock for others
|
|
1426
1426
|
5. **Use worktrees** - provides file isolation, reducing need for locks`,
|
|
1427
1427
|
},
|
|
1428
1428
|
connectors: {
|
|
1429
1429
|
title: 'External Connectors',
|
|
1430
|
-
content: `# External Connectors
|
|
1431
|
-
|
|
1432
|
-
Connectors enable sending events to external services.
|
|
1433
|
-
|
|
1434
|
-
## Supported Types
|
|
1435
|
-
|
|
1436
|
-
| Type | Description |
|
|
1437
|
-
|------|-------------|
|
|
1438
|
-
| \`webhook\` | Generic HTTP webhook |
|
|
1439
|
-
| \`slack\` | Slack notifications |
|
|
1440
|
-
| \`discord\` | Discord notifications |
|
|
1441
|
-
| \`github\` | GitHub integration |
|
|
1442
|
-
| \`custom\` | Custom connector |
|
|
1443
|
-
|
|
1444
|
-
## Adding a Connector
|
|
1445
|
-
|
|
1446
|
-
Slack example:
|
|
1447
|
-
\`\`\`
|
|
1448
|
-
add_connector(
|
|
1449
|
-
project_id,
|
|
1450
|
-
name: "Slack Notifications",
|
|
1451
|
-
type: "slack",
|
|
1452
|
-
config: { webhook_url: "https://hooks.slack.com/..." },
|
|
1453
|
-
events: {
|
|
1454
|
-
task_completed: true,
|
|
1455
|
-
blocker_added: true,
|
|
1456
|
-
deployment_started: true
|
|
1457
|
-
}
|
|
1458
|
-
)
|
|
1459
|
-
\`\`\`
|
|
1460
|
-
|
|
1461
|
-
Webhook example:
|
|
1462
|
-
\`\`\`
|
|
1463
|
-
add_connector(
|
|
1464
|
-
project_id,
|
|
1465
|
-
name: "CI/CD Webhook",
|
|
1466
|
-
type: "webhook",
|
|
1467
|
-
config: {
|
|
1468
|
-
url: "https://ci.example.com/webhook",
|
|
1469
|
-
headers: { "X-API-Key": "secret" }
|
|
1470
|
-
},
|
|
1471
|
-
events: { deployment_completed: true }
|
|
1472
|
-
)
|
|
1473
|
-
\`\`\`
|
|
1474
|
-
|
|
1475
|
-
## Available Events
|
|
1476
|
-
|
|
1477
|
-
- \`task_completed\` - Task marked done
|
|
1478
|
-
- \`task_validated\` - Task approved/rejected
|
|
1479
|
-
- \`blocker_added\` - New blocker recorded
|
|
1480
|
-
- \`blocker_resolved\` - Blocker resolved
|
|
1481
|
-
- \`deployment_started\` - Deployment began
|
|
1482
|
-
- \`deployment_completed\` - Deployment finished
|
|
1483
|
-
- \`agent_session_started\` - Agent connected
|
|
1484
|
-
- \`agent_session_ended\` - Agent disconnected
|
|
1485
|
-
|
|
1486
|
-
## Managing Connectors
|
|
1487
|
-
|
|
1488
|
-
\`\`\`
|
|
1489
|
-
get_connectors(project_id) // List all
|
|
1490
|
-
get_connector(connector_id) // Get details
|
|
1491
|
-
update_connector(connector_id, ...) // Update config
|
|
1492
|
-
delete_connector(connector_id) // Remove
|
|
1493
|
-
\`\`\`
|
|
1494
|
-
|
|
1495
|
-
## Testing
|
|
1496
|
-
|
|
1497
|
-
\`\`\`
|
|
1498
|
-
test_connector(connector_id)
|
|
1499
|
-
\`\`\`
|
|
1500
|
-
|
|
1501
|
-
Sends a test event and returns success/failure.
|
|
1502
|
-
|
|
1503
|
-
## Event History
|
|
1504
|
-
|
|
1505
|
-
\`\`\`
|
|
1506
|
-
get_connector_events(connector_id)
|
|
1507
|
-
get_connector_events(project_id) // All connectors
|
|
1430
|
+
content: `# External Connectors
|
|
1431
|
+
|
|
1432
|
+
Connectors enable sending events to external services.
|
|
1433
|
+
|
|
1434
|
+
## Supported Types
|
|
1435
|
+
|
|
1436
|
+
| Type | Description |
|
|
1437
|
+
|------|-------------|
|
|
1438
|
+
| \`webhook\` | Generic HTTP webhook |
|
|
1439
|
+
| \`slack\` | Slack notifications |
|
|
1440
|
+
| \`discord\` | Discord notifications |
|
|
1441
|
+
| \`github\` | GitHub integration |
|
|
1442
|
+
| \`custom\` | Custom connector |
|
|
1443
|
+
|
|
1444
|
+
## Adding a Connector
|
|
1445
|
+
|
|
1446
|
+
Slack example:
|
|
1447
|
+
\`\`\`
|
|
1448
|
+
add_connector(
|
|
1449
|
+
project_id,
|
|
1450
|
+
name: "Slack Notifications",
|
|
1451
|
+
type: "slack",
|
|
1452
|
+
config: { webhook_url: "https://hooks.slack.com/..." },
|
|
1453
|
+
events: {
|
|
1454
|
+
task_completed: true,
|
|
1455
|
+
blocker_added: true,
|
|
1456
|
+
deployment_started: true
|
|
1457
|
+
}
|
|
1458
|
+
)
|
|
1459
|
+
\`\`\`
|
|
1460
|
+
|
|
1461
|
+
Webhook example:
|
|
1462
|
+
\`\`\`
|
|
1463
|
+
add_connector(
|
|
1464
|
+
project_id,
|
|
1465
|
+
name: "CI/CD Webhook",
|
|
1466
|
+
type: "webhook",
|
|
1467
|
+
config: {
|
|
1468
|
+
url: "https://ci.example.com/webhook",
|
|
1469
|
+
headers: { "X-API-Key": "secret" }
|
|
1470
|
+
},
|
|
1471
|
+
events: { deployment_completed: true }
|
|
1472
|
+
)
|
|
1473
|
+
\`\`\`
|
|
1474
|
+
|
|
1475
|
+
## Available Events
|
|
1476
|
+
|
|
1477
|
+
- \`task_completed\` - Task marked done
|
|
1478
|
+
- \`task_validated\` - Task approved/rejected
|
|
1479
|
+
- \`blocker_added\` - New blocker recorded
|
|
1480
|
+
- \`blocker_resolved\` - Blocker resolved
|
|
1481
|
+
- \`deployment_started\` - Deployment began
|
|
1482
|
+
- \`deployment_completed\` - Deployment finished
|
|
1483
|
+
- \`agent_session_started\` - Agent connected
|
|
1484
|
+
- \`agent_session_ended\` - Agent disconnected
|
|
1485
|
+
|
|
1486
|
+
## Managing Connectors
|
|
1487
|
+
|
|
1488
|
+
\`\`\`
|
|
1489
|
+
get_connectors(project_id) // List all
|
|
1490
|
+
get_connector(connector_id) // Get details
|
|
1491
|
+
update_connector(connector_id, ...) // Update config
|
|
1492
|
+
delete_connector(connector_id) // Remove
|
|
1493
|
+
\`\`\`
|
|
1494
|
+
|
|
1495
|
+
## Testing
|
|
1496
|
+
|
|
1497
|
+
\`\`\`
|
|
1498
|
+
test_connector(connector_id)
|
|
1499
|
+
\`\`\`
|
|
1500
|
+
|
|
1501
|
+
Sends a test event and returns success/failure.
|
|
1502
|
+
|
|
1503
|
+
## Event History
|
|
1504
|
+
|
|
1505
|
+
\`\`\`
|
|
1506
|
+
get_connector_events(connector_id)
|
|
1507
|
+
get_connector_events(project_id) // All connectors
|
|
1508
1508
|
\`\`\``,
|
|
1509
1509
|
},
|
|
1510
1510
|
git_issues: {
|
|
1511
1511
|
title: 'Git Issues',
|
|
1512
|
-
content: `# Git Issues
|
|
1513
|
-
|
|
1514
|
-
Track and resolve git-related problems.
|
|
1515
|
-
|
|
1516
|
-
## Issue Types
|
|
1517
|
-
|
|
1518
|
-
| Type | Description |
|
|
1519
|
-
|------|-------------|
|
|
1520
|
-
| \`merge_conflict\` | Conflicting changes |
|
|
1521
|
-
| \`push_failed\` | Push rejected |
|
|
1522
|
-
| \`rebase_needed\` | Branch needs rebase |
|
|
1523
|
-
| \`branch_diverged\` | Branch diverged from base |
|
|
1524
|
-
| \`pr_not_mergeable\` | PR cannot be merged |
|
|
1525
|
-
|
|
1526
|
-
## Recording Issues
|
|
1527
|
-
|
|
1528
|
-
\`\`\`
|
|
1529
|
-
add_git_issue(
|
|
1530
|
-
project_id,
|
|
1531
|
-
issue_type: "merge_conflict",
|
|
1532
|
-
branch: "feature/add-auth",
|
|
1533
|
-
target_branch: "develop",
|
|
1534
|
-
conflicting_files: ["src/api/users.ts", "src/models/user.ts"],
|
|
1535
|
-
task_id: "task-uuid", // Optional
|
|
1536
|
-
error_message: "Automatic merge failed"
|
|
1537
|
-
)
|
|
1538
|
-
\`\`\`
|
|
1539
|
-
|
|
1540
|
-
## Viewing Issues
|
|
1541
|
-
|
|
1542
|
-
\`\`\`
|
|
1543
|
-
get_git_issues(project_id) // Open issues
|
|
1544
|
-
get_git_issues(project_id, status: "resolved") // Resolved
|
|
1545
|
-
get_git_issues(project_id, branch: "feature/x") // By branch
|
|
1546
|
-
get_git_issues(project_id, issue_type: "merge_conflict") // By type
|
|
1547
|
-
\`\`\`
|
|
1548
|
-
|
|
1549
|
-
## Resolving Issues
|
|
1550
|
-
|
|
1551
|
-
\`\`\`
|
|
1552
|
-
resolve_git_issue(
|
|
1553
|
-
git_issue_id,
|
|
1554
|
-
resolution_note: "Rebased branch and resolved conflicts manually"
|
|
1555
|
-
)
|
|
1556
|
-
\`\`\`
|
|
1557
|
-
|
|
1558
|
-
Auto-resolved (e.g., PR became mergeable):
|
|
1559
|
-
\`\`\`
|
|
1560
|
-
resolve_git_issue(
|
|
1561
|
-
git_issue_id,
|
|
1562
|
-
auto_resolved: true,
|
|
1563
|
-
resolution_note: "PR automatically became mergeable after upstream merge"
|
|
1564
|
-
)
|
|
1565
|
-
\`\`\`
|
|
1566
|
-
|
|
1567
|
-
## Handling Merge Conflicts
|
|
1568
|
-
|
|
1569
|
-
1. **Fetch latest changes:**
|
|
1570
|
-
\`\`\`bash
|
|
1571
|
-
git fetch origin
|
|
1572
|
-
\`\`\`
|
|
1573
|
-
|
|
1574
|
-
2. **Rebase on target:**
|
|
1575
|
-
\`\`\`bash
|
|
1576
|
-
git rebase origin/develop
|
|
1577
|
-
\`\`\`
|
|
1578
|
-
|
|
1579
|
-
3. **Resolve conflicts in editor**
|
|
1580
|
-
|
|
1581
|
-
4. **Continue rebase:**
|
|
1582
|
-
\`\`\`bash
|
|
1583
|
-
git add .
|
|
1584
|
-
git rebase --continue
|
|
1585
|
-
\`\`\`
|
|
1586
|
-
|
|
1587
|
-
5. **Force push:**
|
|
1588
|
-
\`\`\`bash
|
|
1589
|
-
git push --force-with-lease
|
|
1590
|
-
\`\`\`
|
|
1591
|
-
|
|
1592
|
-
6. **Resolve the issue:**
|
|
1593
|
-
\`\`\`
|
|
1594
|
-
resolve_git_issue(git_issue_id, resolution_note: "Rebased and resolved")
|
|
1512
|
+
content: `# Git Issues
|
|
1513
|
+
|
|
1514
|
+
Track and resolve git-related problems.
|
|
1515
|
+
|
|
1516
|
+
## Issue Types
|
|
1517
|
+
|
|
1518
|
+
| Type | Description |
|
|
1519
|
+
|------|-------------|
|
|
1520
|
+
| \`merge_conflict\` | Conflicting changes |
|
|
1521
|
+
| \`push_failed\` | Push rejected |
|
|
1522
|
+
| \`rebase_needed\` | Branch needs rebase |
|
|
1523
|
+
| \`branch_diverged\` | Branch diverged from base |
|
|
1524
|
+
| \`pr_not_mergeable\` | PR cannot be merged |
|
|
1525
|
+
|
|
1526
|
+
## Recording Issues
|
|
1527
|
+
|
|
1528
|
+
\`\`\`
|
|
1529
|
+
add_git_issue(
|
|
1530
|
+
project_id,
|
|
1531
|
+
issue_type: "merge_conflict",
|
|
1532
|
+
branch: "feature/add-auth",
|
|
1533
|
+
target_branch: "develop",
|
|
1534
|
+
conflicting_files: ["src/api/users.ts", "src/models/user.ts"],
|
|
1535
|
+
task_id: "task-uuid", // Optional
|
|
1536
|
+
error_message: "Automatic merge failed"
|
|
1537
|
+
)
|
|
1538
|
+
\`\`\`
|
|
1539
|
+
|
|
1540
|
+
## Viewing Issues
|
|
1541
|
+
|
|
1542
|
+
\`\`\`
|
|
1543
|
+
get_git_issues(project_id) // Open issues
|
|
1544
|
+
get_git_issues(project_id, status: "resolved") // Resolved
|
|
1545
|
+
get_git_issues(project_id, branch: "feature/x") // By branch
|
|
1546
|
+
get_git_issues(project_id, issue_type: "merge_conflict") // By type
|
|
1547
|
+
\`\`\`
|
|
1548
|
+
|
|
1549
|
+
## Resolving Issues
|
|
1550
|
+
|
|
1551
|
+
\`\`\`
|
|
1552
|
+
resolve_git_issue(
|
|
1553
|
+
git_issue_id,
|
|
1554
|
+
resolution_note: "Rebased branch and resolved conflicts manually"
|
|
1555
|
+
)
|
|
1556
|
+
\`\`\`
|
|
1557
|
+
|
|
1558
|
+
Auto-resolved (e.g., PR became mergeable):
|
|
1559
|
+
\`\`\`
|
|
1560
|
+
resolve_git_issue(
|
|
1561
|
+
git_issue_id,
|
|
1562
|
+
auto_resolved: true,
|
|
1563
|
+
resolution_note: "PR automatically became mergeable after upstream merge"
|
|
1564
|
+
)
|
|
1565
|
+
\`\`\`
|
|
1566
|
+
|
|
1567
|
+
## Handling Merge Conflicts
|
|
1568
|
+
|
|
1569
|
+
1. **Fetch latest changes:**
|
|
1570
|
+
\`\`\`bash
|
|
1571
|
+
git fetch origin
|
|
1572
|
+
\`\`\`
|
|
1573
|
+
|
|
1574
|
+
2. **Rebase on target:**
|
|
1575
|
+
\`\`\`bash
|
|
1576
|
+
git rebase origin/develop
|
|
1577
|
+
\`\`\`
|
|
1578
|
+
|
|
1579
|
+
3. **Resolve conflicts in editor**
|
|
1580
|
+
|
|
1581
|
+
4. **Continue rebase:**
|
|
1582
|
+
\`\`\`bash
|
|
1583
|
+
git add .
|
|
1584
|
+
git rebase --continue
|
|
1585
|
+
\`\`\`
|
|
1586
|
+
|
|
1587
|
+
5. **Force push:**
|
|
1588
|
+
\`\`\`bash
|
|
1589
|
+
git push --force-with-lease
|
|
1590
|
+
\`\`\`
|
|
1591
|
+
|
|
1592
|
+
6. **Resolve the issue:**
|
|
1593
|
+
\`\`\`
|
|
1594
|
+
resolve_git_issue(git_issue_id, resolution_note: "Rebased and resolved")
|
|
1595
1595
|
\`\`\``,
|
|
1596
1596
|
},
|
|
1597
1597
|
ideas: {
|
|
1598
1598
|
title: 'Ideas & Feature Requests',
|
|
1599
|
-
content: `# Ideas & Feature Requests
|
|
1600
|
-
|
|
1601
|
-
Track improvement ideas and feature requests.
|
|
1602
|
-
|
|
1603
|
-
## Adding Ideas
|
|
1604
|
-
|
|
1605
|
-
\`\`\`
|
|
1606
|
-
add_idea(
|
|
1607
|
-
project_id,
|
|
1608
|
-
title: "Add dark mode support",
|
|
1609
|
-
description: "Implement theme switching with dark mode option",
|
|
1610
|
-
status: "raw" // Default status
|
|
1611
|
-
)
|
|
1612
|
-
\`\`\`
|
|
1613
|
-
|
|
1614
|
-
## Idea Lifecycle
|
|
1615
|
-
|
|
1616
|
-
| Status | Description |
|
|
1617
|
-
|--------|-------------|
|
|
1618
|
-
| \`raw\` | Initial idea, not yet evaluated |
|
|
1619
|
-
| \`exploring\` | Being researched/discussed |
|
|
1620
|
-
| \`planned\` | Approved for implementation |
|
|
1621
|
-
| \`in_development\` | Being worked on |
|
|
1622
|
-
| \`shipped\` | Completed and deployed |
|
|
1623
|
-
|
|
1624
|
-
## Updating Ideas
|
|
1625
|
-
|
|
1626
|
-
\`\`\`
|
|
1627
|
-
update_idea(
|
|
1628
|
-
idea_id,
|
|
1629
|
-
status: "planned",
|
|
1630
|
-
doc_url: "https://docs.example.com/dark-mode-spec"
|
|
1631
|
-
)
|
|
1632
|
-
\`\`\`
|
|
1633
|
-
|
|
1634
|
-
## Converting to Task
|
|
1635
|
-
|
|
1636
|
-
When ready to implement:
|
|
1637
|
-
\`\`\`
|
|
1638
|
-
convert_idea_to_task(
|
|
1639
|
-
idea_id,
|
|
1640
|
-
priority: 2,
|
|
1641
|
-
estimated_minutes: 120,
|
|
1642
|
-
update_status: true // Sets idea to "in_development"
|
|
1643
|
-
)
|
|
1644
|
-
\`\`\`
|
|
1645
|
-
|
|
1646
|
-
This creates a task linked to the idea.
|
|
1647
|
-
|
|
1648
|
-
## Viewing Ideas
|
|
1649
|
-
|
|
1650
|
-
\`\`\`
|
|
1651
|
-
get_ideas(project_id) // All ideas
|
|
1652
|
-
get_ideas(project_id, status: "planned") // Ready to build
|
|
1653
|
-
get_ideas(project_id, search_query: "dark") // Search
|
|
1654
|
-
get_idea(idea_id) // Single idea
|
|
1655
|
-
\`\`\`
|
|
1656
|
-
|
|
1657
|
-
## Best Practices
|
|
1658
|
-
|
|
1659
|
-
1. **Capture ideas immediately** - Don't lose them
|
|
1660
|
-
2. **Be specific** - Include context and rationale
|
|
1661
|
-
3. **Link documentation** - Add doc_url when available
|
|
1662
|
-
4. **Update status** - Keep ideas current
|
|
1599
|
+
content: `# Ideas & Feature Requests
|
|
1600
|
+
|
|
1601
|
+
Track improvement ideas and feature requests.
|
|
1602
|
+
|
|
1603
|
+
## Adding Ideas
|
|
1604
|
+
|
|
1605
|
+
\`\`\`
|
|
1606
|
+
add_idea(
|
|
1607
|
+
project_id,
|
|
1608
|
+
title: "Add dark mode support",
|
|
1609
|
+
description: "Implement theme switching with dark mode option",
|
|
1610
|
+
status: "raw" // Default status
|
|
1611
|
+
)
|
|
1612
|
+
\`\`\`
|
|
1613
|
+
|
|
1614
|
+
## Idea Lifecycle
|
|
1615
|
+
|
|
1616
|
+
| Status | Description |
|
|
1617
|
+
|--------|-------------|
|
|
1618
|
+
| \`raw\` | Initial idea, not yet evaluated |
|
|
1619
|
+
| \`exploring\` | Being researched/discussed |
|
|
1620
|
+
| \`planned\` | Approved for implementation |
|
|
1621
|
+
| \`in_development\` | Being worked on |
|
|
1622
|
+
| \`shipped\` | Completed and deployed |
|
|
1623
|
+
|
|
1624
|
+
## Updating Ideas
|
|
1625
|
+
|
|
1626
|
+
\`\`\`
|
|
1627
|
+
update_idea(
|
|
1628
|
+
idea_id,
|
|
1629
|
+
status: "planned",
|
|
1630
|
+
doc_url: "https://docs.example.com/dark-mode-spec"
|
|
1631
|
+
)
|
|
1632
|
+
\`\`\`
|
|
1633
|
+
|
|
1634
|
+
## Converting to Task
|
|
1635
|
+
|
|
1636
|
+
When ready to implement:
|
|
1637
|
+
\`\`\`
|
|
1638
|
+
convert_idea_to_task(
|
|
1639
|
+
idea_id,
|
|
1640
|
+
priority: 2,
|
|
1641
|
+
estimated_minutes: 120,
|
|
1642
|
+
update_status: true // Sets idea to "in_development"
|
|
1643
|
+
)
|
|
1644
|
+
\`\`\`
|
|
1645
|
+
|
|
1646
|
+
This creates a task linked to the idea.
|
|
1647
|
+
|
|
1648
|
+
## Viewing Ideas
|
|
1649
|
+
|
|
1650
|
+
\`\`\`
|
|
1651
|
+
get_ideas(project_id) // All ideas
|
|
1652
|
+
get_ideas(project_id, status: "planned") // Ready to build
|
|
1653
|
+
get_ideas(project_id, search_query: "dark") // Search
|
|
1654
|
+
get_idea(idea_id) // Single idea
|
|
1655
|
+
\`\`\`
|
|
1656
|
+
|
|
1657
|
+
## Best Practices
|
|
1658
|
+
|
|
1659
|
+
1. **Capture ideas immediately** - Don't lose them
|
|
1660
|
+
2. **Be specific** - Include context and rationale
|
|
1661
|
+
3. **Link documentation** - Add doc_url when available
|
|
1662
|
+
4. **Update status** - Keep ideas current
|
|
1663
1663
|
5. **Convert when ready** - Move to tasks for execution`,
|
|
1664
1664
|
},
|
|
1665
1665
|
requests: {
|
|
1666
1666
|
title: 'User Requests',
|
|
1667
|
-
content: `# User Requests
|
|
1668
|
-
|
|
1669
|
-
Handle questions and requests from users via the dashboard.
|
|
1670
|
-
|
|
1671
|
-
## Checking for Requests
|
|
1672
|
-
|
|
1673
|
-
Requests are included in \`start_work_session\` response:
|
|
1674
|
-
- \`pending_requests\` - Array of unanswered requests
|
|
1675
|
-
- \`URGENT_QUESTIONS\` - High-priority questions
|
|
1676
|
-
|
|
1677
|
-
## Getting Pending Requests
|
|
1678
|
-
|
|
1679
|
-
\`\`\`
|
|
1680
|
-
get_pending_requests(project_id)
|
|
1681
|
-
\`\`\`
|
|
1682
|
-
|
|
1683
|
-
## Answering Questions
|
|
1684
|
-
|
|
1685
|
-
\`\`\`
|
|
1686
|
-
answer_question(
|
|
1687
|
-
request_id,
|
|
1688
|
-
answer: "The authentication flow uses JWT tokens stored in httpOnly cookies. Tokens expire after 24 hours and are automatically refreshed."
|
|
1689
|
-
)
|
|
1690
|
-
\`\`\`
|
|
1691
|
-
|
|
1692
|
-
## Acknowledging Requests
|
|
1693
|
-
|
|
1694
|
-
For non-question requests:
|
|
1695
|
-
\`\`\`
|
|
1696
|
-
acknowledge_request(request_id)
|
|
1697
|
-
\`\`\`
|
|
1698
|
-
|
|
1699
|
-
## Priority
|
|
1700
|
-
|
|
1701
|
-
When \`start_work_session\` returns pending requests:
|
|
1702
|
-
1. Answer questions FIRST (before starting tasks)
|
|
1703
|
-
2. \`URGENT_QUESTIONS\` take absolute priority
|
|
1704
|
-
3. Then proceed with \`next_task\`
|
|
1705
|
-
|
|
1706
|
-
## Best Practices
|
|
1707
|
-
|
|
1708
|
-
1. **Check requests early** - Answer before deep work
|
|
1709
|
-
2. **Be thorough** - Provide complete answers
|
|
1710
|
-
3. **Include context** - Reference code/docs when helpful
|
|
1667
|
+
content: `# User Requests
|
|
1668
|
+
|
|
1669
|
+
Handle questions and requests from users via the dashboard.
|
|
1670
|
+
|
|
1671
|
+
## Checking for Requests
|
|
1672
|
+
|
|
1673
|
+
Requests are included in \`start_work_session\` response:
|
|
1674
|
+
- \`pending_requests\` - Array of unanswered requests
|
|
1675
|
+
- \`URGENT_QUESTIONS\` - High-priority questions
|
|
1676
|
+
|
|
1677
|
+
## Getting Pending Requests
|
|
1678
|
+
|
|
1679
|
+
\`\`\`
|
|
1680
|
+
get_pending_requests(project_id)
|
|
1681
|
+
\`\`\`
|
|
1682
|
+
|
|
1683
|
+
## Answering Questions
|
|
1684
|
+
|
|
1685
|
+
\`\`\`
|
|
1686
|
+
answer_question(
|
|
1687
|
+
request_id,
|
|
1688
|
+
answer: "The authentication flow uses JWT tokens stored in httpOnly cookies. Tokens expire after 24 hours and are automatically refreshed."
|
|
1689
|
+
)
|
|
1690
|
+
\`\`\`
|
|
1691
|
+
|
|
1692
|
+
## Acknowledging Requests
|
|
1693
|
+
|
|
1694
|
+
For non-question requests:
|
|
1695
|
+
\`\`\`
|
|
1696
|
+
acknowledge_request(request_id)
|
|
1697
|
+
\`\`\`
|
|
1698
|
+
|
|
1699
|
+
## Priority
|
|
1700
|
+
|
|
1701
|
+
When \`start_work_session\` returns pending requests:
|
|
1702
|
+
1. Answer questions FIRST (before starting tasks)
|
|
1703
|
+
2. \`URGENT_QUESTIONS\` take absolute priority
|
|
1704
|
+
3. Then proceed with \`next_task\`
|
|
1705
|
+
|
|
1706
|
+
## Best Practices
|
|
1707
|
+
|
|
1708
|
+
1. **Check requests early** - Answer before deep work
|
|
1709
|
+
2. **Be thorough** - Provide complete answers
|
|
1710
|
+
3. **Include context** - Reference code/docs when helpful
|
|
1711
1711
|
4. **Acknowledge promptly** - Don't leave users waiting`,
|
|
1712
1712
|
},
|
|
1713
1713
|
};
|