Skip to content

Commit f8b1dd0

Browse files
roadmap: simplify memory-commit integration approach
- Remove Phase 2 (auto-enrichment) - introduces hidden coupling - Remove Phase 4 (pattern mining) - premature optimization - Keep Phase 3 as optional convenience wrapper, gated by usage data - Explicit composition is the right default: traceable, works without commitmux, no storage bloat, always fresh data Explicit > implicit for developer tools
1 parent dfcec05 commit f8b1dd0

1 file changed

Lines changed: 26 additions & 20 deletions

File tree

docs/ROADMAP.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -178,40 +178,46 @@ These require architectural additions beyond analysis of local session data.
178178

179179
---
180180

181-
### Memory-Commit Integration (commitmux enrichment)
181+
### Memory-Commit Integration (optional convenience wrapper)
182182

183-
**What:** Enrich cross-session memory with commit details from commitmux. Connect the "why" (task goals, blockers) with the "what" (actual code changes).
183+
**Status:** Phase 1 shipped. Phase 2 deferred (needs usage data to justify).
184184

185-
**Why:** Memory currently stores commit SHAs as strings. Claude has to manually query commitmux to see what changed. Automatic enrichment creates a complete narrative: "We attempted X, hit blocker Y in file Z, solved it with commit ABC: [diff summary]."
185+
**Current state (Phase 1):** Memory stores commit SHAs as strings. Claude queries both systems manually:
186+
1. `get_task_history(query="auth")` → returns task with `commits=["abc123"]`
187+
2. `commitmux_get_patch(sha="abc123")` → returns full diff and message
188+
3. Claude synthesizes answer from both sources
186189

187-
**Approach (phased):**
190+
**This explicit composition is the right default.** It's verbose but traceable, works without commitmux (step 2 just skips), and keeps concerns separated.
188191

189-
**Phase 1 (passive):** Already shipped. Memory stores commit SHAs, Claude queries both tools manually.
192+
**Future consideration (Phase 2 - convenience only):**
190193

191-
**Phase 2 (auto-enrichment):** Enhance `ExtractTaskMemory` to populate Solution field automatically:
192-
```go
193-
if status == "completed" && len(commits) > 0 {
194-
// Query: commitmux get-patch <repo> <sha>
195-
solution = extractSolutionFromCommit(commits[0])
196-
// Returns: "Modified auth.go: added token refresh logic"
197-
}
198-
```
199-
Guard: only runs if commitmux binary exists and repo is indexed.
194+
IF usage data shows Claude frequently queries both systems together (≥5x per session over 20+ sessions), consider adding `enrich_commits` parameter to `get_task_history` as a convenience wrapper:
200195

201-
**Phase 3 (MCP enrichment):** Add `enrich_commits` parameter to `get_task_history`:
202196
```json
203197
{
204198
"query": "auth",
205-
"enrich_commits": true // Fetch full commit details from commitmux
199+
"enrich_commits": true // Explicit opt-in
206200
}
207201
```
208-
Returns task history WITH commit messages and diff summaries on-demand.
209202

210-
**Phase 4 (solution mining):** Extract patterns from diffs ("added retry logic", "fixed race condition"), store pattern taxonomy, enable pattern-based search: "How did we solve retry logic before?"
203+
**Implementation requirements:**
204+
- Must be explicit parameter (no auto-magic)
205+
- Must degrade gracefully when commitmux unavailable (return SHAs only)
206+
- Enrichment happens at query time (no storage of commit data in memory files)
207+
- Returns commit SHAs with inline diff summaries
208+
209+
**Why defer Phase 2:**
210+
- Saves Claude one MCP call, but adds complexity
211+
- Hidden dependency on commitmux creates confusion
212+
- Need data proving the convenience is worth the coupling
213+
214+
**Rejected approaches:**
215+
- ❌ Auto-enrichment during memory extraction (hidden coupling, staleness, storage bloat)
216+
- ❌ Solution pattern mining (premature optimization, no proven need)
211217

212-
**Decision criteria:** Measure memory query usage for 10-20 sessions. If Claude uses `get_task_history` ≥3x per session, Phase 2 ROI is clear.
218+
**Decision gate:** Deploy current state, measure `get_task_history` usage for 20+ sessions. If frequency ≥5x per session, revisit. Otherwise, explicit composition wins.
213219

214-
**Depends on:** Cross-session memory (shipped), commitmux indexing
220+
**Depends on:** Cross-session memory (shipped), graceful commitmux integration
215221

216222
---
217223

0 commit comments

Comments
 (0)