-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestpkg:mcppackages/mcp-server - adapters, toolspackages/mcp-server - adapters, tools
Description
Problem
Planner is missing critical commit context. GitHub history integration is currently disabled, causing AI plans to lack historical context and produce lower quality results.
Current state:
- Location:
packages/mcp-server/src/adapters/built-in/plan-adapter.ts:174 - Setting:
includeHistory: false // TODO: Enable when GitHub indexer integration is ready - Git history works but not properly wired to planner
Impact
- Quality: AI plans miss "why" context from commit messages
- Decisions: Can't see how similar features were implemented before
- Patterns: No visibility into codebase evolution patterns
- Success Criteria: Planner includes related commits for context
Solution
Enable includeHistory: true with proper error handling:
- Wire git indexer to context assembler
- Add fallback when git history unavailable
- Filter commits to only relevant ones (avoid noise)
- Add token budget management for commit context
Implementation checklist:
// In plan-adapter.ts
const options: ContextAssemblyOptions = {
includeCode: includeCode as boolean,
includePatterns: includePatterns as boolean,
includeHistory: true, // Enable!
includeGitHistory: (includeGitHistory as boolean) && !!this.gitIndexer,
maxGitCommitResults: 5,
tokenBudget: tokenBudget as number,
};Error handling needed:
- Gracefully handle missing git repository
- Handle git indexer initialization failures
- Don't block if git history unavailable
Acceptance Criteria
-
includeHistoryset totrue - Planner output includes related commits when available
- Graceful degradation when git history unavailable
- Token budget respected (commits don't overflow context)
- Integration tests verify commit context included
Files to Modify
packages/mcp-server/src/adapters/built-in/plan-adapter.ts- Enable historypackages/subagents/src/planner/context-assembler.ts- Wire git indexer- Tests for git history integration
Priority: P0 - Quality blocker
Part of: #104 - Performance & Reliability Critical Path
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpkg:mcppackages/mcp-server - adapters, toolspackages/mcp-server - adapters, tools