bootspring_memory

Access git-based project memory. Extract learnings, search history, and get file-specific context.

Overview#

The bootspring_memory tool provides access to your project's git history as a knowledge base. It extracts learnings from commit messages, categorizes them, and makes them searchable. This helps your AI assistant understand past decisions and patterns.

Parameters#

ParameterTypeRequiredDescription
actionstringYesAction to perform
querystringNoSearch query (for search action)
filesarrayNoFile paths to get learnings for (for files action)
limitnumberNoMax learnings to return (default: 20)

Actions#

ActionDescription
summaryGet categorized learnings summary
searchSearch learnings by keyword
filesGet learnings for specific files
statsGet repository overview statistics

Usage Examples#

Get Summary#

Use the bootspring_memory tool with: - action: "summary" - limit: 30

Response:

1{ 2 "totalLearnings": 45, 3 "categories": { 4 "bug_fix": { 5 "icon": "B", 6 "label": "Bug Fixes", 7 "count": 12, 8 "top": [ 9 { "hash": "abc123", "summary": "fix: resolve auth token expiration" }, 10 { "hash": "def456", "summary": "fix: handle null user in dashboard" }, 11 { "hash": "ghi789", "summary": "fix: correct date formatting in reports" } 12 ] 13 }, 14 "feature": { 15 "icon": "F", 16 "label": "Features", 17 "count": 18, 18 "top": [ 19 { "hash": "jkl012", "summary": "feat: add user profile page" }, 20 { "hash": "mno345", "summary": "feat: implement email notifications" }, 21 { "hash": "pqr678", "summary": "feat: add dark mode support" } 22 ] 23 }, 24 "refactor": { 25 "icon": "R", 26 "label": "Refactoring", 27 "count": 8, 28 "top": [ 29 { "hash": "stu901", "summary": "refactor: extract auth logic to hook" }, 30 { "hash": "vwx234", "summary": "refactor: simplify API error handling" } 31 ] 32 }, 33 "documentation": { 34 "icon": "D", 35 "label": "Documentation", 36 "count": 7, 37 "top": [ 38 { "hash": "yza567", "summary": "docs: add API reference" } 39 ] 40 } 41 } 42}

Search Learnings#

Use the bootspring_memory tool with: - action: "search" - query: "authentication" - limit: 10

Response:

1{ 2 "query": "authentication", 3 "matches": [ 4 { 5 "hash": "abc123", 6 "summary": "feat: implement Clerk authentication", 7 "categories": ["feature", "security"], 8 "details": "Added Clerk provider, middleware, and protected routes..." 9 }, 10 { 11 "hash": "def456", 12 "summary": "fix: resolve auth token expiration issue", 13 "categories": ["bug_fix", "security"], 14 "details": "Tokens were expiring prematurely due to timezone..." 15 }, 16 { 17 "hash": "ghi789", 18 "summary": "refactor: centralize authentication logic", 19 "categories": ["refactor"], 20 "details": "Moved auth helpers to lib/auth.ts..." 21 } 22 ] 23}

Get File-Specific Learnings#

Use the bootspring_memory tool with: - action: "files" - files: ["src/lib/auth.ts", "src/middleware.ts"] - limit: 15

Response:

1{ 2 "files": ["src/lib/auth.ts", "src/middleware.ts"], 3 "learnings": [ 4 { 5 "hash": "abc123", 6 "file": "src/lib/auth.ts", 7 "summary": "feat: add session validation helper", 8 "categories": ["feature"] 9 }, 10 { 11 "hash": "def456", 12 "file": "src/middleware.ts", 13 "summary": "fix: handle unauthenticated API requests", 14 "categories": ["bug_fix"] 15 }, 16 { 17 "hash": "ghi789", 18 "file": "src/lib/auth.ts", 19 "summary": "refactor: use Clerk's built-in helpers", 20 "categories": ["refactor"] 21 } 22 ] 23}

Get Repository Stats#

Use the bootspring_memory tool with: - action: "stats"

Response:

1{ 2 "totalCommits": 245, 3 "contributors": 3, 4 "firstCommit": "2024-01-15", 5 "lastCommit": "2024-03-20", 6 "categoryCounts": { 7 "feature": 89, 8 "bug_fix": 56, 9 "refactor": 42, 10 "documentation": 28, 11 "test": 18, 12 "chore": 12 13 } 14}

Memory Categories#

Learnings are automatically categorized based on commit prefixes:

CategoryPrefixIconDescription
featurefeat:FNew features
bug_fixfix:BBug fixes
refactorrefactor:RCode refactoring
documentationdocs:DDocumentation changes
testtest:TTest additions/changes
chorechore:CMaintenance tasks
performanceperf:PPerformance improvements
securitysecurity:SSecurity fixes

Error Handling#

Not a Git Repository#

{ "error": "Not a git repository", "hint": "Initialize git with: git init" }

Missing Query#

{ "error": "query required for search" }

Missing Files#

{ "error": "files array required" }

Use Cases#

Understanding Past Decisions#

Before making changes to a file:

Use bootspring_memory with: - action: "files" - files: ["src/components/Dashboard.tsx"]

This shows why the component was changed in the past.

Finding Similar Solutions#

When encountering a problem:

Use bootspring_memory with: - action: "search" - query: "timeout error"

Find how similar issues were resolved before.

Onboarding Context#

For new team members:

Use bootspring_memory with: - action: "summary"

Get an overview of project history and patterns.

Best Practices#

Write Good Commit Messages#

Memory quality depends on commit message quality. Use conventional commits:

  • feat: add user authentication
  • fix: resolve database connection timeout
  • refactor: extract validation logic

Regular Commits#

More frequent, focused commits create better memory entries.

Include Context in Commits#

Add details in commit body for richer memory:

feat: add rate limiting to API - Implemented sliding window algorithm - 100 requests per minute per user - Returns 429 with Retry-After header