@vibescope/mcp-server 0.2.0 → 0.2.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.
Files changed (65) hide show
  1. package/dist/api-client.d.ts +64 -1
  2. package/dist/api-client.js +34 -3
  3. package/dist/handlers/bodies-of-work.js +82 -49
  4. package/dist/handlers/cost.js +62 -54
  5. package/dist/handlers/decisions.js +29 -16
  6. package/dist/handlers/deployment.js +112 -106
  7. package/dist/handlers/discovery.js +35 -5
  8. package/dist/handlers/fallback.js +24 -19
  9. package/dist/handlers/file-checkouts.d.ts +18 -0
  10. package/dist/handlers/file-checkouts.js +101 -0
  11. package/dist/handlers/findings.d.ts +6 -0
  12. package/dist/handlers/findings.js +85 -30
  13. package/dist/handlers/git-issues.js +36 -32
  14. package/dist/handlers/ideas.js +44 -26
  15. package/dist/handlers/index.d.ts +2 -0
  16. package/dist/handlers/index.js +6 -0
  17. package/dist/handlers/milestones.js +34 -27
  18. package/dist/handlers/organizations.js +86 -78
  19. package/dist/handlers/progress.js +22 -11
  20. package/dist/handlers/project.js +62 -22
  21. package/dist/handlers/requests.js +15 -11
  22. package/dist/handlers/roles.d.ts +18 -0
  23. package/dist/handlers/roles.js +130 -0
  24. package/dist/handlers/session.js +30 -8
  25. package/dist/handlers/sprints.js +76 -64
  26. package/dist/handlers/tasks.js +113 -73
  27. package/dist/handlers/validation.js +18 -14
  28. package/dist/tools.js +387 -0
  29. package/package.json +1 -1
  30. package/src/api-client.ts +89 -6
  31. package/src/handlers/__test-setup__.ts +7 -0
  32. package/src/handlers/bodies-of-work.ts +101 -101
  33. package/src/handlers/cost.test.ts +34 -44
  34. package/src/handlers/cost.ts +77 -92
  35. package/src/handlers/decisions.test.ts +3 -2
  36. package/src/handlers/decisions.ts +32 -27
  37. package/src/handlers/deployment.ts +142 -190
  38. package/src/handlers/discovery.test.ts +4 -5
  39. package/src/handlers/discovery.ts +37 -6
  40. package/src/handlers/fallback.ts +31 -29
  41. package/src/handlers/file-checkouts.test.ts +477 -0
  42. package/src/handlers/file-checkouts.ts +127 -0
  43. package/src/handlers/findings.test.ts +145 -0
  44. package/src/handlers/findings.ts +101 -64
  45. package/src/handlers/git-issues.ts +40 -80
  46. package/src/handlers/ideas.ts +56 -54
  47. package/src/handlers/index.ts +6 -0
  48. package/src/handlers/milestones.test.ts +1 -1
  49. package/src/handlers/milestones.ts +47 -45
  50. package/src/handlers/organizations.ts +104 -129
  51. package/src/handlers/progress.ts +24 -22
  52. package/src/handlers/project.ts +89 -57
  53. package/src/handlers/requests.ts +18 -14
  54. package/src/handlers/roles.test.ts +303 -0
  55. package/src/handlers/roles.ts +208 -0
  56. package/src/handlers/session.ts +39 -17
  57. package/src/handlers/sprints.ts +96 -129
  58. package/src/handlers/tasks.ts +144 -138
  59. package/src/handlers/validation.test.ts +1 -1
  60. package/src/handlers/validation.ts +20 -22
  61. package/src/tools.ts +387 -0
  62. package/dist/config/tool-categories.d.ts +0 -31
  63. package/dist/config/tool-categories.js +0 -253
  64. package/dist/knowledge.d.ts +0 -6
  65. package/dist/knowledge.js +0 -218
package/dist/knowledge.js DELETED
@@ -1,218 +0,0 @@
1
- /**
2
- * Knowledge Base
3
- *
4
- * Embedded help topics for on-demand agent guidance.
5
- */
6
- export const KNOWLEDGE_BASE = {
7
- getting_started: `# Getting Started
8
- 1. Call start_work_session(git_url) to initialize
9
- 2. Response includes next_task - start working on it immediately
10
- 3. Use update_task to mark in_progress and track progress
11
- 4. Call complete_task when done - it returns your next task
12
- 5. Use get_help(topic) when you need guidance on specific workflows`,
13
- tasks: `# Task Workflow
14
- - Mark task in_progress with update_task before starting
15
- - Update progress_percentage regularly (every 15-20% progress)
16
- - Include progress_note to auto-log milestones
17
- - One task at a time - complete current before starting another
18
- - complete_task returns next_task and context counts (validation, blockers, deployment)
19
- - Priority: 1=highest, 5=lowest`,
20
- validation: `# Task Validation
21
- Completed tasks need validation before PR merge. PRIORITIZE validation over new tasks.
22
-
23
- ## Validator Workflow
24
-
25
- ### 1. Claim Task
26
- claim_validation(task_id) → Returns worktree_setup with existing branch
27
-
28
- ### 2. Set Up Worktree (EXISTING branch)
29
- git fetch origin feature/task-branch
30
- git worktree add ../PROJECT-task-ID feature/task-branch
31
- cd ../PROJECT-task-ID
32
-
33
- ### 3. Run Tests Locally
34
- pnpm install && pnpm test && pnpm build
35
-
36
- ### 4. Approve or Reject
37
-
38
- **APPROVE** → Validator merges PR:
39
- validate_task(task_id, approved: true, validation_notes: "...")
40
- # Response includes merge instructions with PR URL
41
- gh pr merge <NUMBER> --squash
42
- git worktree remove ../PROJECT-task-ID
43
-
44
- **REJECT** → Create fix task:
45
- validate_task(task_id, approved: false, validation_notes: "Issues...", create_fix_task: true)
46
- # Creates fix task with SAME branch/PR
47
- # Fix agent picks up, pushes fixes to same PR
48
- git worktree remove ../PROJECT-task-ID
49
-
50
- ## Key Rules
51
- - Validators check out EXISTING branches
52
- - On approval: validator merges immediately
53
- - On rejection: use create_fix_task: true
54
- - Always clean up worktree after validation`,
55
- deployment: `# Deployment Workflow
56
- 1. Ensure all completed tasks are validated first
57
- 2. request_deployment(project_id, environment: "production")
58
- 3. claim_deployment_validation(project_id) - claim for validation
59
- 4. Run: pnpm build && pnpm test
60
- 5. report_validation(project_id, build_passed: true, tests_passed: true)
61
- 6. start_deployment(project_id) - returns project's deployment_instructions
62
- 7. Follow the instructions (e.g., push to main, run deploy command)
63
- 8. complete_deployment(project_id, success: true, summary: "...")`,
64
- git: `# Git Workflow
65
-
66
- Call get_git_workflow(project_id) for project-specific config.
67
-
68
- ## Workflow Types
69
- - **none**: No branching strategy
70
- - **trunk-based**: Commit directly to main, small frequent commits
71
- - **github-flow**: Feature branches, merge via PR after validation
72
- - **git-flow**: develop/release/feature branches
73
-
74
- ## Lifecycle Integration
75
-
76
- ### 1. Starting a Task
77
- When you call update_task(status: "in_progress"), the response includes:
78
- - **branch_name**: Suggested branch (e.g., feature/a1b2c3d4-task-title)
79
- - **base_branch**: Branch to branch from
80
- - **steps**: Git commands to create the branch
81
- - **reminder**: Call to update task with git_branch
82
-
83
- ### 2. Completing a Task
84
- When you call complete_task, the response includes:
85
- - **steps**: Push commands
86
- - **pr_suggestion**: { title, body_template } - ready-to-use PR content
87
- - **next_step**: Reminder that merge happens AFTER validation
88
-
89
- Add the PR link via add_task_reference(task_id, url, label: "Pull Request").
90
-
91
- ### 3. Validation Approved
92
- When validate_task(approved: true) is called, the response includes:
93
- - **target_branch**: Where to merge
94
- - **feature_branch**: Branch being merged
95
- - **steps**: Merge options (UI or command line)
96
- - **cleanup**: Branch deletion commands
97
- - **note**: Confirmation it's safe to merge
98
-
99
- ## Multi-Agent Worktrees (CRITICAL)
100
-
101
- When multiple agents share a repository, you MUST use git worktrees to prevent conflicts.
102
-
103
- ### Why Worktrees?
104
- - Branch switching in shared repos causes file conflicts between agents
105
- - Uncommitted changes from one agent block another's work
106
- - Worktrees provide isolated working directories with shared .git
107
-
108
- ### Setup (Once Per Task)
109
- \`\`\`bash
110
- # From main repo, create worktree for your task
111
- git worktree add ../worktree-<task-short-id> -b feature/<task-id>-<title>
112
-
113
- # Work in the worktree directory
114
- cd ../worktree-<task-short-id>
115
- \`\`\`
116
-
117
- ### Cleanup (After Task Merged)
118
- \`\`\`bash
119
- # Remove worktree after PR merged
120
- git worktree remove ../worktree-<task-short-id>
121
- git branch -d feature/<task-id>-<title>
122
- \`\`\`
123
-
124
- ### Worktree Rules
125
- - ALWAYS create a worktree before starting work on a task
126
- - Each agent works in their own worktree directory
127
- - Never switch branches in the main repo when other agents are active
128
- - Commit and push frequently to avoid losing work
129
-
130
- ## Handling Merge Conflicts
131
-
132
- When claim_validation detects conflicts (via GitHub API):
133
- 1. Response includes merge_conflict with rebase_instructions
134
- 2. Checkout the feature branch locally
135
- 3. Rebase onto target branch: \`git rebase origin/<target>\`
136
- 4. Resolve conflicts, then: \`git add . && git rebase --continue\`
137
- 5. Force push: \`git push origin <branch> --force-with-lease\`
138
- 6. Re-claim validation to verify PR is now mergeable
139
-
140
- ## Key Rules
141
- - Create worktree + branch when starting task (multi-agent environments)
142
- - Push and create PR when completing task
143
- - Wait for validation before merging
144
- - Resolve merge conflicts via rebase before approval
145
- - Clean up worktree and branch after successful merge`,
146
- blockers: `# Working with Blockers
147
- When stuck and need human input:
148
- 1. add_blocker(project_id, description: "What's blocking")
149
- 2. Ask your question to the user
150
- 3. resolve_blocker(blocker_id, resolution_note: "How resolved")
151
- Only use for genuine blockers requiring decisions - not routine questions.`,
152
- milestones: `# Task Milestones
153
- For complex tasks, break into milestones:
154
- 1. add_milestone(task_id, title: "Design schema")
155
- 2. add_milestone(task_id, title: "Implement API")
156
- 3. Update with complete_milestone(milestone_id) as you go
157
- Dashboard shows progress bar with completed/total.`,
158
- fallback: `# Fallback Activities
159
- When no tasks available, get_next_task suggests activities:
160
- - feature_ideation, code_review, performance_audit
161
- - security_review, test_coverage, documentation_review
162
- 1. start_fallback_activity(project_id, activity: "code_review")
163
- 2. Do the work, use add_finding for issues, add_idea for improvements
164
- 3. stop_fallback_activity(project_id, summary: "...")`,
165
- session: `# Session Management
166
- - start_work_session initializes and returns next_task (lite mode default)
167
- - Use mode:'full' for complete context when needed
168
- - heartbeat every 30-60 seconds maintains active status
169
- - end_work_session releases claimed tasks and returns summary
170
- - NEVER STOP: After completing a task, immediately start the next one
171
- - When context grows large: /clear then start_work_session to continue fresh
172
- - Your progress is saved to the dashboard - nothing is lost on /clear`,
173
- tokens: `# Token Efficiency
174
- Be mindful of token costs - every tool call has a cost.
175
- - Use mode:'lite' (default) - saves ~85% vs full mode
176
- - Call get_token_usage() to check consumption
177
- - /compact when context grows large
178
- - Batch related updates when possible
179
- - Trust lite mode; only use full mode for initial exploration`,
180
- sprints: `# Sprints
181
- Sprints are time-bounded bodies of work with velocity tracking.
182
-
183
- ## Lifecycle
184
- 1. **planning**: Create sprint, add tasks with story points
185
- 2. **active**: Sprint in progress, working on tasks
186
- 3. **in_review**: Sprint ended, reviewing completion
187
- 4. **retrospective**: Post-sprint reflection
188
- 5. **completed**: Final state, velocity recorded
189
-
190
- ## Workflow
191
- 1. create_sprint(project_id, title, start_date, end_date, goal)
192
- 2. get_sprint_backlog(project_id) - view available tasks
193
- 3. add_task_to_sprint(sprint_id, task_id, story_points) - add tasks
194
- 4. start_sprint(sprint_id) - locks committed_points
195
- 5. Work on tasks normally (they're assigned to the sprint)
196
- 6. complete_sprint(sprint_id) - calculates final velocity
197
-
198
- ## Velocity Tracking
199
- - committed_points: Total story points at sprint start
200
- - velocity_points: Story points completed by sprint end
201
- - get_sprint_velocity(project_id) - shows history and average velocity
202
-
203
- ## Auto-Deployment
204
- Set auto_deploy_on_completion: true when creating sprint.
205
- Triggers deployment when sprint completes.`,
206
- topics: `# Available Help Topics
207
- - getting_started: Basic workflow overview
208
- - tasks: Working on tasks, progress tracking
209
- - validation: Cross-agent task validation
210
- - deployment: Deployment coordination
211
- - git: Git workflow configuration
212
- - blockers: Handling blockers
213
- - milestones: Breaking down complex tasks
214
- - fallback: Background activities when idle
215
- - session: Session management
216
- - tokens: Token efficiency tips
217
- - sprints: Time-bounded task groupings with velocity tracking`,
218
- };