VantagePeers Docs

Fix Patterns KB

Knowledge base of bugs, root causes, fix attempts, and validated fixes with semantic search.

Fix Patterns KB

The Fix Patterns knowledge base documents bugs, their root causes, what was tried (including failures), and what ultimately fixed the issue. Agents search this before attempting any fix to avoid repeating past mistakes.

How It Works

Agent encounters bug


search_fix_patterns("error message or symptom")


  Found match? ──Yes──▶ Apply validated fix

       No

  Fix the bug manually


create_fix_pattern + add_fix_attempt

Schema

fixPatterns

FieldTypeDescription
symptomstringWhat the bug looks like (searchable via RAG)
rootCausestringWhy the bug happens
validatedFixstring?The fix that worked
filesstring[]?Files involved
tagsstring[]Categories like react-hydration, credit-system
stackstring[]Tech stack like next.js, convex, clerk
sourceProjectstringWhich project this was discovered in
linkedIssueIdsstring[]?Linked VantagePeers issue IDs
severitycritical | major | minorImpact level

fixAttempts

Fix attempts are stored in a separate table (per Convex guidelines for unbounded arrays):

FieldTypeDescription
patternIdIdReference to the parent fixPattern
descriptionstringWhat was tried
commitstring?Git commit hash
workedbooleanWhether this attempt fixed the issue
whystringWhy it worked or did not

MCP Tools

search_fix_patterns

The most important tool. Use this before fixing any bug.

{
  "query": "message disappears after sending in chat",
  "limit": 5
}

Returns patterns ranked by semantic similarity with scores.

create_fix_pattern

Create a new pattern when you discover a bug:

{
  "symptom": "Credits not deducted after video generation",
  "rootCause": "Race condition in credit validation mutation",
  "tags": ["credit-system", "race-condition"],
  "stack": ["convex"],
  "sourceProject": "myreeldream",
  "createdBy": "dave",
  "severity": "critical"
}

add_fix_attempt

Document what you tried:

{
  "patternId": "pattern-id-here",
  "description": "Added optimistic locking to credit mutation",
  "worked": true,
  "why": "Prevents concurrent mutations from reading stale credit balance",
  "createdBy": "dave",
  "commit": "abc1234"
}

If worked is true and the pattern has no validatedFix, it is auto-set.

validate_fix

Explicitly set the validated fix:

{
  "patternId": "pattern-id-here",
  "validatedFix": "Use optimistic locking in credit mutation with retry on conflict"
}

list_fix_patterns

List patterns by project:

{
  "project": "myreeldream",
  "limit": 20
}

Connect a GitHub issue to a fix pattern:

{
  "patternId": "pattern-id-here",
  "issueId": "myreeldream-ai/MyShortReel-beta#282"
}

Cross-Project Learning

Fix patterns are not scoped to a single project. A bug pattern discovered in one project is searchable from any other. The sourceProject field tracks where it was found, but search_fix_patterns searches across all projects by default.

This means: fix a bug once, never fix it again -- even in a different codebase.

On this page