vantage-peers-mcp 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -0
- package/dist/server.js +0 -0
- package/dist/src/tools.d.ts +8 -0
- package/dist/src/tools.js +14 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,6 +93,104 @@ The server also reads `CONVEX_URL` from `.env.local` in the parent directory if
|
|
|
93
93
|
### Fix Patterns (5)
|
|
94
94
|
`create_fix_pattern`, `list_fix_patterns`, `add_fix_attempt`, `validate_fix`, `link_issue_to_pattern`
|
|
95
95
|
|
|
96
|
+
#### `create_fix_pattern`
|
|
97
|
+
Create a new fix pattern in the knowledge base. Documents a bug symptom, root cause, and optional validated fix. Agents search the KB before fixing to avoid repeating known mistakes.
|
|
98
|
+
|
|
99
|
+
| Arg | Type | Required | Description |
|
|
100
|
+
|-----|------|----------|-------------|
|
|
101
|
+
| `symptom` | string | yes | What the bug looks like — the user-visible problem |
|
|
102
|
+
| `rootCause` | string | yes | Why the bug happens — the underlying technical cause |
|
|
103
|
+
| `tags` | string or string[] | yes | Tags for categorization (e.g. `"react-hydration"`) |
|
|
104
|
+
| `stack` | string or string[] | yes | Tech stack involved (e.g. `"next.js"`, `"convex"`) |
|
|
105
|
+
| `sourceProject` | string | yes | Project where this was discovered |
|
|
106
|
+
| `createdBy` | string | yes | Orchestrator name (e.g. `"sigma"`) |
|
|
107
|
+
| `severity` | string | yes | `"critical"`, `"major"`, or `"minor"` |
|
|
108
|
+
| `validatedFix` | string | no | The fix that worked — set later if not yet known |
|
|
109
|
+
| `files` | string or string[] | no | Files involved in the fix |
|
|
110
|
+
| `linkedIssueIds` | string or string[] | no | VantagePeers issue IDs linked to this pattern |
|
|
111
|
+
|
|
112
|
+
Example:
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"tool": "create_fix_pattern",
|
|
116
|
+
"arguments": {
|
|
117
|
+
"symptom": "Convex subscription silently drops after 60s of inactivity",
|
|
118
|
+
"rootCause": "Missing keepAlive ping in useConvexQuery wrapper",
|
|
119
|
+
"tags": ["convex-subscription", "silent-failure"],
|
|
120
|
+
"stack": ["next.js", "convex"],
|
|
121
|
+
"sourceProject": "myreeldream",
|
|
122
|
+
"createdBy": "sigma",
|
|
123
|
+
"severity": "major",
|
|
124
|
+
"validatedFix": "Add 30s ping interval to the subscription hook"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### `add_fix_attempt`
|
|
130
|
+
Log a fix attempt against an existing pattern. Documents what was tried, whether it worked, and why. If `worked: true` and the pattern has no `validatedFix`, auto-sets it.
|
|
131
|
+
|
|
132
|
+
| Arg | Type | Required | Description |
|
|
133
|
+
|-----|------|----------|-------------|
|
|
134
|
+
| `patternId` | string | yes | ID of the fix pattern |
|
|
135
|
+
| `description` | string | yes | What was tried — the fix approach |
|
|
136
|
+
| `worked` | boolean | yes | Whether this fix resolved the issue |
|
|
137
|
+
| `why` | string | yes | Why it worked or did not — the reasoning |
|
|
138
|
+
| `createdBy` | string | yes | Orchestrator name |
|
|
139
|
+
| `commit` | string | no | Git commit hash of this attempt |
|
|
140
|
+
|
|
141
|
+
Example:
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"tool": "add_fix_attempt",
|
|
145
|
+
"arguments": {
|
|
146
|
+
"patternId": "k5708d9xxwj81v92e0x3hwv36985g4d7",
|
|
147
|
+
"description": "Added 30s ping interval to useConvexQuery",
|
|
148
|
+
"worked": true,
|
|
149
|
+
"why": "Keeps the WebSocket connection alive past the server idle timeout",
|
|
150
|
+
"createdBy": "sigma",
|
|
151
|
+
"commit": "e866274"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### `validate_fix`
|
|
157
|
+
Promote a candidate fix to validated status on an existing pattern. Use after independently confirming the fix holds in production.
|
|
158
|
+
|
|
159
|
+
| Arg | Type | Required | Description |
|
|
160
|
+
|-----|------|----------|-------------|
|
|
161
|
+
| `patternId` | string | yes | ID of the fix pattern |
|
|
162
|
+
| `validatedFix` | string | yes | Description of the validated fix |
|
|
163
|
+
|
|
164
|
+
Example:
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"tool": "validate_fix",
|
|
168
|
+
"arguments": {
|
|
169
|
+
"patternId": "k5708d9xxwj81v92e0x3hwv36985g4d7",
|
|
170
|
+
"validatedFix": "30s ping interval in subscription hook — verified stable over 48h in production"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### `link_issue_to_pattern`
|
|
176
|
+
Link a VantagePeers issue to a fix pattern. Creates a bidirectional reference so the issue and pattern are discoverable from each other.
|
|
177
|
+
|
|
178
|
+
| Arg | Type | Required | Description |
|
|
179
|
+
|-----|------|----------|-------------|
|
|
180
|
+
| `patternId` | string | yes | ID of the fix pattern |
|
|
181
|
+
| `issueId` | string | yes | VantagePeers issue ID to link |
|
|
182
|
+
|
|
183
|
+
Example:
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"tool": "link_issue_to_pattern",
|
|
187
|
+
"arguments": {
|
|
188
|
+
"patternId": "k5708d9xxwj81v92e0x3hwv36985g4d7",
|
|
189
|
+
"issueId": "m97ewrrqczew67kc6at3a59e7985ea7h"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
96
194
|
### Error Monitoring (2)
|
|
97
195
|
`list_errors`, `get_error`
|
|
98
196
|
|
|
@@ -114,6 +212,22 @@ The server also reads `CONVEX_URL` from `.env.local` in the parent directory if
|
|
|
114
212
|
### Session (1)
|
|
115
213
|
`set_summary`
|
|
116
214
|
|
|
215
|
+
## Fix patterns cycle
|
|
216
|
+
|
|
217
|
+
A fix pattern is a validated learning extracted from a resolved bug — symptom, root cause, and the fix that worked — stored in the VantagePeers knowledge base. Patterns accumulate across projects and agents so that the same bug is never debugged twice from scratch.
|
|
218
|
+
|
|
219
|
+
The cycle runs as follows:
|
|
220
|
+
|
|
221
|
+
1. **Agent encounters a bug.** Before touching any code, call `search_fix_patterns` with a plain-language description of the symptom. The KB returns ranked matches using semantic vector search.
|
|
222
|
+
2. **KB hit.** If a validated pattern is returned, apply the known fix directly. Log the reuse via `add_fix_attempt` (`worked: true`) so confidence scores stay current.
|
|
223
|
+
3. **KB miss.** If no pattern matches, the agent fixes the bug manually using standard debugging. Once resolved, the learning is captured immediately via `create_fix_pattern` — symptom, root cause, severity, stack, and the working fix.
|
|
224
|
+
4. **Validation.** After the fix holds in production (or after a second independent confirmation), call `validate_fix` to promote the pattern to validated status. This is the signal that downstream agents can trust the pattern without verification.
|
|
225
|
+
5. **Issue linkage.** Call `link_issue_to_pattern` to attach the VantagePeers issue ID to the pattern. This creates a bidirectional reference: the issue record points to the pattern, and the pattern's `linkedIssueIds` list points back.
|
|
226
|
+
|
|
227
|
+
The four tools that power this cycle are: `create_fix_pattern`, `add_fix_attempt`, `validate_fix`, and `link_issue_to_pattern`. The fifth tool, `search_fix_patterns`, is in the Search / RAG category and is the entry point agents should call first.
|
|
228
|
+
|
|
229
|
+
On the agent side, the `/capitalize-fix` skill and the `inject-fix-patterns` hook automate steps 3-5: the hook fires on task completion events and prompts the orchestrator to capture the learning before closing the task. The cycle is designed to be low-friction — one tool call per step, all via MCP, no `npx convex run` required.
|
|
230
|
+
|
|
117
231
|
## Programmatic API (TypeScript)
|
|
118
232
|
|
|
119
233
|
For external services that need type-safe access to VantagePeers functions:
|
|
@@ -206,6 +320,18 @@ All orchestrator names are open strings — any lowercase name is accepted. The
|
|
|
206
320
|
|
|
207
321
|
## Changelog
|
|
208
322
|
|
|
323
|
+
### 2.2.0 — 2026-05-07
|
|
324
|
+
- 4 new fix-pattern tools: `create_fix_pattern`, `add_fix_attempt`, `validate_fix`, `link_issue_to_pattern`
|
|
325
|
+
- Detailed per-tool docs with arg tables and example calls in README
|
|
326
|
+
- New "Fix patterns cycle" section documenting the KB learning loop
|
|
327
|
+
- 41 new Zod input-validation unit tests for fix-pattern tools
|
|
328
|
+
|
|
329
|
+
### 2.1.1 — 2026-05-04
|
|
330
|
+
- Defense-in-depth `memoryIdSchema` validation for `create_briefing_note` and `update_briefing_note`
|
|
331
|
+
|
|
332
|
+
### 2.1.0 — 2026-04-25
|
|
333
|
+
- `update_briefing_note` MCP tool with RBAC
|
|
334
|
+
|
|
209
335
|
### 2.0.2 — 2026-04-14
|
|
210
336
|
- Added badges (npm version, downloads, license, tool count) to the published README
|
|
211
337
|
- Added Orchestrator Roles reference table including alpha, lambda, victor (Day 39 additions)
|
package/dist/server.js
CHANGED
|
File without changes
|
package/dist/src/tools.d.ts
CHANGED
|
@@ -27,6 +27,14 @@ export declare function assertContentSize(content: string, toolName: string): nu
|
|
|
27
27
|
*/
|
|
28
28
|
export declare const convexIdPattern: RegExp;
|
|
29
29
|
export declare const receiptIdSchema: z.ZodString;
|
|
30
|
+
export declare const memoryIdSchema: z.ZodString;
|
|
31
|
+
export declare const creatorSchema: z.ZodString;
|
|
32
|
+
export declare const severitySchema: z.ZodEnum<{
|
|
33
|
+
critical: "critical";
|
|
34
|
+
major: "major";
|
|
35
|
+
minor: "minor";
|
|
36
|
+
}>;
|
|
37
|
+
export declare const flexArray: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodString]>;
|
|
30
38
|
export declare const updateBriefingNoteDescription: string;
|
|
31
39
|
export declare const updateBriefingNoteSchema: z.ZodObject<{
|
|
32
40
|
noteId: z.ZodString;
|
package/dist/src/tools.js
CHANGED
|
@@ -51,17 +51,20 @@ export const convexIdPattern = /^[a-z0-9]{32}$/;
|
|
|
51
51
|
export const receiptIdSchema = z
|
|
52
52
|
.string()
|
|
53
53
|
.regex(convexIdPattern, "receiptId must be a 32-char lowercase alphanumeric Convex ID");
|
|
54
|
+
export const memoryIdSchema = z
|
|
55
|
+
.string()
|
|
56
|
+
.regex(convexIdPattern, "Invalid memory ID format (expected 32-char Convex ID)");
|
|
54
57
|
const memoryTypeSchema = z
|
|
55
58
|
.enum(["user", "feedback", "project", "reference", "episode"])
|
|
56
59
|
.describe("Memory classification type");
|
|
57
|
-
const creatorSchema = z
|
|
60
|
+
export const creatorSchema = z
|
|
58
61
|
.string()
|
|
59
62
|
.describe("Orchestrator role name (e.g. pi, tau, phi, sigma, omega, zeta, eta, kappa, alpha, lambda, victor, laurent, or any custom client role (lowercase string)). " +
|
|
60
63
|
"New internal orchestrators use Greek letters (lowercase); external client orchestrators use free lowercase strings.");
|
|
61
|
-
const severitySchema = z
|
|
64
|
+
export const severitySchema = z
|
|
62
65
|
.enum(["critical", "major", "minor"])
|
|
63
66
|
.describe("Episode severity — critical = cross-orchestrator lesson");
|
|
64
|
-
const flexArray = z.union([z.array(z.string()), z.string()]);
|
|
67
|
+
export const flexArray = z.union([z.array(z.string()), z.string()]);
|
|
65
68
|
const flexArrayOptional = flexArray.optional();
|
|
66
69
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
67
70
|
// update_briefing_note — Zod schema + description
|
|
@@ -96,9 +99,9 @@ export const updateBriefingNoteSchema = z.object({
|
|
|
96
99
|
.optional()
|
|
97
100
|
.describe("Optional new decisions array — full replace, not append"),
|
|
98
101
|
linkedMemoryIds: z
|
|
99
|
-
.array(
|
|
102
|
+
.array(memoryIdSchema)
|
|
100
103
|
.optional()
|
|
101
|
-
.describe("Optional new linkedMemoryIds array — full replace, not append. Each ID must point to memories table."),
|
|
104
|
+
.describe("Optional new linkedMemoryIds array — full replace, not append. Each ID must point to memories table, NOT briefingNotes or any other table."),
|
|
102
105
|
});
|
|
103
106
|
const assigneeSchema = z
|
|
104
107
|
.string()
|
|
@@ -1626,7 +1629,8 @@ export function registerTools(server, convex, oauthCtx) {
|
|
|
1626
1629
|
});
|
|
1627
1630
|
// ── create_briefing_note ────────────────────────────────────────────────────
|
|
1628
1631
|
server.tool("create_briefing_note", "Create a briefing note — a structured record of a topic discussion, with participants, " +
|
|
1629
|
-
"content, optional decisions, and optional links to existing memories."
|
|
1632
|
+
"content, optional decisions, and optional links to existing memories. " +
|
|
1633
|
+
"linkedMemoryIds MUST contain IDs from the memories table only — NOT briefingNotes IDs or IDs from any other table.", {
|
|
1630
1634
|
title: z.string().describe("Briefing note title"),
|
|
1631
1635
|
topic: z
|
|
1632
1636
|
.string()
|
|
@@ -1636,7 +1640,10 @@ export function registerTools(server, convex, oauthCtx) {
|
|
|
1636
1640
|
.describe("Who participated — e.g. ['pi', 'sigma'] or 'pi'"),
|
|
1637
1641
|
content: z.string().describe("Full briefing content"),
|
|
1638
1642
|
decisions: flexArrayOptional.describe("Decisions made during the briefing"),
|
|
1639
|
-
linkedMemoryIds:
|
|
1643
|
+
linkedMemoryIds: z
|
|
1644
|
+
.array(memoryIdSchema)
|
|
1645
|
+
.optional()
|
|
1646
|
+
.describe("Convex document IDs of related memories — each must be a 32-char ID from the memories table, NOT briefingNotes or any other table"),
|
|
1640
1647
|
createdBy: creatorSchema,
|
|
1641
1648
|
}, async ({ title, topic, participants, content, decisions, linkedMemoryIds, createdBy, }) => {
|
|
1642
1649
|
let contentBytes = 0;
|
package/package.json
CHANGED