feat: add GSD Memory cross-project knowledge system

Implements MCP server for semantic search across GSD projects:

MCP Tools:
- gsd_memory_search: Search across all registered projects
- gsd_memory_decisions: Find decisions from SUMMARY/PROJECT.md
- gsd_memory_patterns: Find patterns from SUMMARY.md
- gsd_memory_pitfalls: Find pitfalls from RESEARCH.md
- gsd_memory_stack: Find tech stack entries
- gsd_memory_register: Register project with memory
- gsd_memory_index: Trigger indexing/update
- gsd_memory_status: Show system status

Architecture:
- QMD wrapper with grep fallback when QMD unavailable
- YAML frontmatter extractors for GSD document types
- Project registry at ~/.gsd/projects.json
- Auto-install via bin/install.js for Claude Code

Workflow integrations:
- new-project: Registers project with memory
- plan-phase: Indexes after planning
- execute-phase: Indexes after execution
- complete-milestone: Indexes milestone completion
- Researcher agents query memory before Context7

Tests: 117 passing (66 unit + 51 integration)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-02-05 13:04:35 -06:00
parent f53011c9e2
commit af7a057294
120 changed files with 11335 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
---
name: gsd-phase-researcher
description: Researches how to implement a phase before planning. Produces RESEARCH.md consumed by gsd-planner. Spawned by /gsd:plan-phase orchestrator.
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__gsd-memory__*
color: cyan
---
@@ -100,6 +100,42 @@ When researching "best library for X":
<tool_strategy>
## GSD Memory: First for Past Work
**If `gsd_memory_*` MCP tools are available,** query past project knowledge before external research.
**When to use:**
- Check what decisions were made in similar phases
- Find patterns established in past projects
- Learn from documented pitfalls
- See what tech stack was used for similar domains
**How to use:**
```
1. Search for relevant context:
gsd_memory_search({ query: "[phase topic]" })
2. Find relevant decisions:
gsd_memory_decisions({ query: "[topic]" })
3. Find relevant patterns:
gsd_memory_patterns({ query: "[topic]" })
4. Check for pitfalls:
gsd_memory_pitfalls({ domain: "[domain]" })
5. See tech stack choices:
gsd_memory_stack({ query: "[library or purpose]" })
```
**Best practices:**
- Query memory BEFORE web research — past decisions may answer questions
- Note which project decisions came from for context
- Past decisions are HIGH confidence for this user's preferences
- Memory augments but doesn't replace current documentation
**If tools not available:** Skip and proceed to Context7.
## Context7: First for Libraries
Context7 provides authoritative, current documentation for libraries and frameworks.

View File

@@ -1,7 +1,7 @@
---
name: gsd-project-researcher
description: Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators.
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__gsd-memory__*
color: cyan
---
@@ -139,6 +139,42 @@ When researching "best library for X":
<tool_strategy>
## GSD Memory: First for Past Work
**If `gsd_memory_*` MCP tools are available,** query past project knowledge before external research.
**When to use:**
- Check what tech stack was used in similar projects
- Find patterns established in past work
- Learn from documented pitfalls
- See what decisions were made for similar domains
**How to use:**
```
1. Search for relevant context:
gsd_memory_search({ query: "[domain or topic]" })
2. Find relevant decisions:
gsd_memory_decisions({ query: "[topic]" })
3. Find relevant patterns:
gsd_memory_patterns({ query: "[topic]" })
4. Check for pitfalls:
gsd_memory_pitfalls({ domain: "[domain]" })
5. See tech stack choices:
gsd_memory_stack({ query: "[library or purpose]" })
```
**Best practices:**
- Query memory BEFORE web research — past decisions inform recommendations
- Past stack choices are HIGH confidence for this user's preferences
- Past pitfalls are HIGH confidence — actually experienced
- Memory augments but doesn't replace current documentation
**If tools not available:** Skip and proceed to Context7.
## Context7: First for Libraries
Context7 provides authoritative, current documentation for libraries and frameworks.