/recall
Search past PRDs and decisions with full-text and semantic search
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/recall
Context preview
What this command does when you run it.
Search past PRDs and decisions with full-text and semantic search
Command definition
recall.mdname: recall
description: Search past PRDs and decisions with full-text and semantic search
category: Memory
Recall Command
Search project history for past PRDs, decisions, and learnings.
Purpose
Enable quick access to historical context:
- Find similar past features ("How did we implement OAuth?")
- Recall technical decisions ("What database schema did we use?")
- Learn from past blockers ("What issues came up with Stripe integration?")
- Discover reusable patterns ("Show me all API implementations")
Usage
Basic Search (Full-Text)
/recall "OAuth implementation"
/recall "Stripe payment"
/recall "database schema"
Filters
# Search only completed PRDs
/recall "authentication" --status=complete
# Search by priority
/recall "feature" --priority=P0
# Search by date range
/recall "api" --since=30d
/recall "bug" --before=2025-10-01
# Search specific PRD
/recall "performance" --prd=PRD-003
Semantic Search (Optional)
# Find similar features (requires embeddings)
/recall --similar-to=PRD-003
/recall --similar-to="real-time chat"
Workflow
Step 1: Initialize Memory Index (First Run)
On first use, create SQLite FTS5 index:
→ Initializing search index...
→ Scanning product/prds/...
• Found 25 PRDs
• Indexing content...
• Building FTS5 index...
✓ Index created (.claude/memory/index.db)
This will speed up future searches significantly.
Index updates automatically when PRDs change.
Step 2: Full-Text Search
Search using SQLite FTS5:
SELECT
prd_id,
name,
status,
priority,
snippet(prds_fts, -1, '<mark>', '</mark>', '...', 30) AS snippet,
rank
FROM prds_fts
WHERE prds_fts MATCH 'oauth OR authentication'
ORDER BY rank
LIMIT 10;
Step 3: Rank and Display Results
Show most relevant PRDs:
🔍 Search Results for "OAuth implementation"
Found 3 matches:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📅 PRD-003: User Authentication System
✅ Status: Complete | P0 | Completed 2 months ago
🔑 Key Decisions:
• Used OAuth 2.0 with PKCE flow
• Chose NextAuth.js over Passport.js
• Token refresh every 30 minutes
• Stored refresh tokens in HttpOnly cookies
⚠️ Blockers Encountered:
• CORS issues with Google OAuth (fixed with proxy)
• Token rotation edge cases (solved in v1.1)
• Safari third-party cookie restrictions (used workaround)
💡 Learnings:
• Always test token expiration scenarios
• Document OAuth redirect URLs clearly
• Consider token security vs UX tradeoffs
📎 Related PRDs:
• PRD-007: SSO Integration (similar pattern)
• PRD-012: API Authentication (depends on this)
📄 File: product/prds/04-complete/241015-user-auth-PRD-003-v1.md
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📅 PRD-007: SSO Integration
🚧 Status: In Progress | P1 | Day 3
Snippet: "...building on <mark>OAuth</mark> foundation from PRD-003, add SAML..."
📄 File: product/prds/03-in-progress/241020-sso-PRD-007-v1.md
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📅 PRD-012: Third-Party API Auth
✅ Status: Ready | P0
Snippet: "...reuse <mark>OAuth</mark> client credentials flow for API-to-API..."
📄 File: product/prds/02-ready/241023-api-auth-PRD-012-v1.md
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Quick Actions:
• View PRD-003: Read PRD-003 file
• Copy decision: "Used OAuth 2.0 with PKCE flow"
• Find more: /recall "authentication" --status=complete
Step 4: Semantic Search (Optional)
If embeddings are enabled, use vector similarity:
/recall --similar-to=PRD-003
→ Finding similar PRDs...
→ Using embeddings for semantic search...
Found 4 similar PRDs (by concept, not keywords):
1. PRD-007: SSO Integration (89% similar)
Reason: Both involve authentication flows
2. PRD-015: Password Reset (76% similar)
Reason: User identity verification
3. PRD-021: API Keys Management (68% similar)
Reason: Authentication credentials
4. PRD-009: User Permissions (61% similar)
Reason: Authorization system
Memory Index Structure
.claude/memory/
├── index.db # SQLite FTS5 full-text index
├── embeddings/ # Vector embeddings (optional)
│ ├── PRD-003.json
│ ├── PRD-007.json
│ └── index.json
│
├── compressed/ # Archived conversations (future)
│ ├── 2025-10-01.jsonl.gz
│ └── 2025-10-15.jsonl.gz
│
└── config.json # Memory settings
SQLite Schema
-- Main PRD content table
CREATE TABLE prds (
prd_id TEXT PRIMARY KEY,
name TEXT NOT NULL,
status TEXT NOT NULL,
priority TEXT,
grade TEXT,
file_path TEXT NOT NULL,
content TEXT NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
completed_at DATETIME,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
-- FTS5 full-text search table
CREATE VIRTUAL TABLE prds_fts USING fts5(
prd_id UNINDEXED,
name,
content,
decisions,
blockers,
learnings,
tech_stack,
tokenize = 'porter unicode61'
);
-- Trigger to keep FTS in sync
CREATE TRIGGER prds_ai AFTER INSERT ON prds BEGIN
INSERT INTO prds_fts (prd_id, name, content, decisions, blockers, learnings, tech_stack)
VALUES (new.prd_id, new.name, new.content, ...);
END;
-- Index for filters
CREATE INDEX idx_prds_status ON prds(status);
CREATE INDEX idx_prds_priority ON prds(priority);
CREATE INDEX idx_prds_completed_at ON prds(completed_at);
Embeddings (Optional)
For semantic search, generate embeddings using OpenAI API:
// Generate embedding for PRD
const embedding = await openai.embeddings.create({
model: "text-embedding-3-small",
input: prd.content
});
// Save to .claude/memory/embeddings/PRD-003.json
{
"prd_id": "PRD-003",
"embedding": [0.123, -0.456, ...], // 1536 dimensions
"generated_at": "2025-10-26T10:00:00Z"
}
// Find similar PRDs using cosine similarity
function cosineSimilarity(a, b) {
const dotProduct = a.reduce((sum, val, i) => sum + val * b[i], 0);
consRead more
name: recall description: Search past PRDs and decisions with full-text and semantic search category: Memory
Recall Command
Search project history for past PRDs, decisions, and learnings.
Purpose
Enable quick access to historical context:
- Find similar past features ("How did we implement OAuth?")
- Recall technical decisions ("What database schema did we use?")
- Learn from past blockers ("What issues came up with Stripe integration?")
- Discover reusable patterns ("Show me all API implementations")
Usage
Basic Search (Full-Text)
/recall "OAuth implementation" /recall "Stripe payment" /recall "database schema"
Filters
# Search only completed PRDs /recall "authentication" --status=complete # Search by priority /recall "feature" --priority=P0 # Search by date range /recall "api" --since=30d /recall "bug" --before=2025-10-01 # Search specific PRD /recall "performance" --prd=PRD-003
Semantic Search (Optional)
# Find similar features (requires embeddings) /recall --similar-to=PRD-003 /recall --similar-to="real-time chat"
Workflow
Step 1: Initialize Memory Index (First Run)
On first use, create SQLite FTS5 index:
→ Initializing search index... → Scanning product/prds/... • Found 25 PRDs • Indexing content... • Building FTS5 index... ✓ Index created (.claude/memory/index.db) This will speed up future searches significantly.
Index updates automatically when PRDs change.
Step 2: Full-Text Search
Search using SQLite FTS5:
SELECT prd_id, name, status, priority, snippet(prds_fts, -1, '<mark>', '</mark>', '...', 30) AS snippet, rank FROM prds_fts WHERE prds_fts MATCH 'oauth OR authentication' ORDER BY rank LIMIT 10;
Step 3: Rank and Display Results
Show most relevant PRDs:
🔍 Search Results for "OAuth implementation" Found 3 matches: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📅 PRD-003: User Authentication System ✅ Status: Complete | P0 | Completed 2 months ago 🔑 Key Decisions: • Used OAuth 2.0 with PKCE flow • Chose NextAuth.js over Passport.js • Token refresh every 30 minutes • Stored refresh tokens in HttpOnly cookies ⚠️ Blockers Encountered: • CORS issues with Google OAuth (fixed with proxy) • Token rotation edge cases (solved in v1.1) • Safari third-party cookie restrictions (used workaround) 💡 Learnings: • Always test token expiration scenarios • Document OAuth redirect URLs clearly • Consider token security vs UX tradeoffs 📎 Related PRDs: • PRD-007: SSO Integration (similar pattern) • PRD-012: API Authentication (depends on this) 📄 File: product/prds/04-complete/241015-user-auth-PRD-003-v1.md ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📅 PRD-007: SSO Integration 🚧 Status: In Progress | P1 | Day 3 Snippet: "...building on <mark>OAuth</mark> foundation from PRD-003, add SAML..." 📄 File: product/prds/03-in-progress/241020-sso-PRD-007-v1.md ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📅 PRD-012: Third-Party API Auth ✅ Status: Ready | P0 Snippet: "...reuse <mark>OAuth</mark> client credentials flow for API-to-API..." 📄 File: product/prds/02-ready/241023-api-auth-PRD-012-v1.md ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💡 Quick Actions: • View PRD-003: Read PRD-003 file • Copy decision: "Used OAuth 2.0 with PKCE flow" • Find more: /recall "authentication" --status=complete
Step 4: Semantic Search (Optional)
If embeddings are enabled, use vector similarity:
/recall --similar-to=PRD-003 → Finding similar PRDs... → Using embeddings for semantic search... Found 4 similar PRDs (by concept, not keywords): 1. PRD-007: SSO Integration (89% similar) Reason: Both involve authentication flows 2. PRD-015: Password Reset (76% similar) Reason: User identity verification 3. PRD-021: API Keys Management (68% similar) Reason: Authentication credentials 4. PRD-009: User Permissions (61% similar) Reason: Authorization system
Memory Index Structure
.claude/memory/ ├── index.db # SQLite FTS5 full-text index ├── embeddings/ # Vector embeddings (optional) │ ├── PRD-003.json │ ├── PRD-007.json │ └── index.json │ ├── compressed/ # Archived conversations (future) │ ├── 2025-10-01.jsonl.gz │ └── 2025-10-15.jsonl.gz │ └── config.json # Memory settings
SQLite Schema
-- Main PRD content table CREATE TABLE prds ( prd_id TEXT PRIMARY KEY, name TEXT NOT NULL, status TEXT NOT NULL, priority TEXT, grade TEXT, file_path TEXT NOT NULL, content TEXT NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, completed_at DATETIME, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ); -- FTS5 full-text search table CREATE VIRTUAL TABLE prds_fts USING fts5( prd_id UNINDEXED, name, content, decisions, blockers, learnings, tech_stack, tokenize = 'porter unicode61' ); -- Trigger to keep FTS in sync CREATE TRIGGER prds_ai AFTER INSERT ON prds BEGIN INSERT INTO prds_fts (prd_id, name, content, decisions, blockers, learnings, tech_stack) VALUES (new.prd_id, new.name, new.content, ...); END; -- Index for filters CREATE INDEX idx_prds_status ON prds(status); CREATE INDEX idx_prds_priority ON prds(priority); CREATE INDEX idx_prds_completed_at ON prds(completed_at);
Embeddings (Optional)
For semantic search, generate embeddings using OpenAI API:
// Generate embedding for PRD
const embedding = await openai.embeddings.create({
model: "text-embedding-3-small",
input: prd.content
});
// Save to .claude/memory/embeddings/PRD-003.json
{
"prd_id": "PRD-003",
"embedding": [0.123, -0.456, ...], // 1536 dimensions
"generated_at": "2025-10-26T10:00:00Z"
}
// Find similar PRDs using cosine similarity
function cosineSimilarity(a, b) {
const dotProduct = a.reduce((sum, val, i) => sum + val * b[i], 0);
consThe complete Claude Code plugin for Product-Driven Development Transform PRDs from ideas to shipped features with AI-powered review, guided implementation, and automated quality gates. Never ship unclear requirements again.
Repo: Yassinello/claude-plugin-prd-workflow

