Skip to content

Commit c42f5ba

Browse files
committed
docs: update documentation for v0.4.0 Intelligent Git History
- Add dev_history tool documentation (new MCP tool) - Update dev_map docs with change frequency feature - Update dev_plan docs with git history integration - Update README with v0.4.0 features and version history - Update tools overview with 9 tools and v0.4.0 section - Update examples with dev_history usage patterns - Mark v0.4.0 tasks as complete in PLAN.md - Add changeset for v0.4.0 release
1 parent be34613 commit c42f5ba

File tree

9 files changed

+319
-41
lines changed

9 files changed

+319
-41
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
"@lytics/dev-agent": minor
3+
"@lytics/dev-agent-core": minor
4+
"@lytics/dev-agent-mcp": minor
5+
"@lytics/dev-agent-subagents": minor
6+
---
7+
8+
feat: Intelligent Git History (v0.4.0)
9+
10+
New capabilities for understanding codebase history:
11+
12+
**`dev_history` tool** - Semantic search over git commits
13+
- Search commit messages by meaning (e.g., "authentication token fix")
14+
- Get file history with rename tracking
15+
- Token-budgeted output
16+
17+
**`dev_map` enhancements** - Change frequency indicators
18+
- 🔥 Hot directories (5+ commits in 30 days)
19+
- ✏️ Active directories (1-4 commits in 30 days)
20+
- 📝 Recent activity (commits in 90 days)
21+
22+
**`dev_plan` enhancements** - Git context in planning
23+
- Related commits shown alongside code snippets
24+
- Issue/PR references extracted from commits
25+
- Helps understand prior work on similar features
26+
27+
**Core infrastructure:**
28+
- `GitIndexer` for semantic commit search
29+
- `LocalGitExtractor` for git operations
30+
- Extensible architecture for future git features

PLAN.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Focus on quality, documentation, and developer experience.
149149

150150
---
151151

152-
## Current: Intelligent Git History (v0.4.0)
152+
## Completed: Intelligent Git History (v0.4.0)
153153

154154
> "Who changed what and why" - completing the context picture.
155155
@@ -166,11 +166,11 @@ Git history is valuable context that LLMs can't easily access. We add intelligen
166166

167167
| Task | Issue | Status |
168168
|------|-------|--------|
169-
| Git types and extractor infrastructure | #91 | 🔲 Todo |
170-
| Commit indexing in core | #92 | 🔲 Todo |
171-
| `dev_history` MCP adapter | #93 | 🔲 Todo |
172-
| Change frequency in `dev_map` | #94 | 🔲 Todo |
173-
| History integration in `dev_plan` | #95 | 🔲 Todo |
169+
| Git types and extractor infrastructure | #91 | ✅ Done |
170+
| Commit indexing in core | #92 | ✅ Done |
171+
| `dev_history` MCP adapter | #93 | ✅ Done |
172+
| Change frequency in `dev_map` | #94 | ✅ Done |
173+
| History integration in `dev_plan` | #95 | ✅ Done |
174174

175175
### Architecture
176176

@@ -179,25 +179,24 @@ Git history is valuable context that LLMs can't easily access. We add intelligen
179179
- Blame methods stubbed (for future `dev_blame`)
180180
- Cross-repo `repository` field in types
181181

182-
### Out of Scope (v0.5+)
182+
---
183183

184-
- `dev_blame` (line-level attribution)
185-
- PR/issue linking from commits
186-
- Contributor expertise mapping
187-
- Cross-repo history
184+
## Current: Extended Git Intelligence (v0.5.0)
188185

189-
---
186+
> Building on git history with deeper insights.
190187
191-
## Future: Extended Intelligence (v0.5+)
188+
### Tasks
192189

193-
### Git History Enhancements
190+
| Task | Priority | Status |
191+
|------|----------|--------|
192+
| `dev_blame` - line attribution | 🟡 Medium | 🔲 Todo |
193+
| PR/issue linking from commits | 🟡 Medium | 🔲 Todo |
194+
| Contributor expertise mapping | 🟢 Low | 🔲 Todo |
195+
| Cross-repo history | 🟢 Low | 🔲 Todo |
194196

195-
| Feature | Priority |
196-
|---------|----------|
197-
| `dev_blame` - line attribution | 🟡 Medium |
198-
| PR/issue linking from commits | 🟡 Medium |
199-
| Contributor expertise mapping | 🟢 Low |
200-
| Cross-repo history | 🟢 Low |
197+
---
198+
199+
## Future: Extended Intelligence (v0.6+)
201200

202201
### Multi-Language Support
203202

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
[![pnpm](https://img.shields.io/badge/pnpm-8.15.4-orange.svg)](https://pnpm.io/)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
66

7-
**Local-first repository context provider for AI tools. Semantic code search, relationship queries, and codebase mapping via MCP.**
7+
**Local-first repository context provider for AI tools. Semantic code search, git history, relationship queries, and codebase mapping via MCP.**
88

99
## What is dev-agent?
1010

1111
dev-agent provides **rich, structured context** to AI assistants like Claude and Cursor. Instead of AI tools reading files one at a time, dev-agent gives them:
1212

1313
- 🔍 **Semantic search** with code snippets and relationships
14-
- 🗺️ **Codebase maps** showing structure and hot paths
14+
- 🗺️ **Codebase maps** showing structure and change frequency
1515
- 🔗 **Relationship queries** (what calls what)
16+
- 📜 **Git history search** (who changed what and why)
1617
- 📋 **Issue context** assembled for planning
1718

1819
**Philosophy:** Provide data, let LLMs reason. We don't try to be smart with heuristics—we provide comprehensive context so AI assistants can be smart.
@@ -36,7 +37,7 @@ dev mcp install # For Claude Code
3637

3738
## MCP Tools
3839

39-
When integrated with Cursor or Claude Code, dev-agent provides 8 powerful tools:
40+
When integrated with Cursor or Claude Code, dev-agent provides 9 powerful tools:
4041

4142
### `dev_search` - Semantic Code Search
4243
Natural language search with rich results including code snippets, imports, and relationships.
@@ -64,17 +65,19 @@ Find what functions validateToken calls
6465
- File paths and line numbers
6566
- Relevance scoring
6667

67-
### `dev_map` - Codebase Overview ✨ New in v0.3
68-
Get a high-level view of repository structure.
68+
### `dev_map` - Codebase Overview ✨ Enhanced in v0.4
69+
Get a high-level view of repository structure with change frequency.
6970

7071
```
7172
Show me the codebase structure with depth 3
7273
Focus on the packages/core directory
74+
Show hot areas with recent changes
7375
```
7476

7577
**Features:**
7678
- Directory tree with component counts
7779
- **Hot Paths:** Most referenced files
80+
- **Change Frequency:** 🔥 Hot (5+ commits/30d), ✏️ Active (1-4/30d), 📝 Recent (90d)
7881
- **Smart Depth:** Adaptive expansion based on density
7982
- **Signatures:** Function/class signatures in exports
8083

@@ -89,13 +92,27 @@ Focus on the packages/core directory
8992
## Directory Structure
9093

9194
└── packages/ (195 components)
92-
├── core/ (45 components)
95+
├── 🔥 core/ (45 components) — 12 commits in 30d
9396
│ └── exports: function search(query): Promise<Result[]>, class RepositoryIndexer
94-
├── mcp-server/ (28 components)
97+
├── ✏️ mcp-server/ (28 components) — 3 commits in 30d
9598
│ └── exports: class MCPServer, function createAdapter(config): Adapter
9699
```
97100

98-
### `dev_plan` - Context Assembly ✨ Refactored in v0.3
101+
### `dev_history` - Git History Search ✨ New in v0.4
102+
Semantic search over git commit history.
103+
104+
```
105+
Find commits about authentication token fixes
106+
Show history for src/auth/middleware.ts
107+
```
108+
109+
**Features:**
110+
- **Semantic search:** Find commits by meaning, not just text
111+
- **File history:** Track changes with rename detection
112+
- **Issue/PR refs:** Extracted from commit messages
113+
- **Token-budgeted output**
114+
115+
### `dev_plan` - Context Assembly ✨ Enhanced in v0.4
99116
Assemble rich context for implementing GitHub issues.
100117

101118
```
@@ -105,6 +122,7 @@ Assemble context for issue #42
105122
**Returns:**
106123
- Full issue with comments
107124
- Relevant code snippets from semantic search
125+
- **Related commits** from git history (new in v0.4)
108126
- Detected codebase patterns (test naming, locations)
109127
- Metadata (tokens, timing)
110128

@@ -245,6 +263,11 @@ pnpm typecheck
245263

246264
## Version History
247265

266+
- **v0.4.0** - Intelligent Git History release
267+
- New `dev_history` tool for semantic commit search
268+
- Enhanced `dev_map` with change frequency indicators (🔥 hot, ✏️ active)
269+
- Enhanced `dev_plan` with related commits from git history
270+
- New `GitIndexer` and `LocalGitExtractor` in core
248271
- **v0.3.0** - Context Quality release
249272
- New `dev_refs` tool for relationship queries
250273
- Enhanced `dev_map` with hot paths, smart depth, signatures

examples/README.md

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,51 @@ dev_map:
103103
dev_map:
104104
includeHotPaths: true
105105
smartDepth: true
106+
107+
# Show change frequency (v0.4+)
108+
dev_map:
109+
includeChangeFrequency: true
106110
```
107111

108112
**Output shows:**
109113
- Directory structure
110114
- Component counts per directory
111115
- Exported symbols with signatures
112116
- Hot paths (frequently referenced files)
117+
- Change frequency indicators (🔥 hot, ✏️ active, 📝 recent)
118+
119+
---
120+
121+
### `dev_history` - Git History Search ✨ v0.4
122+
123+
Semantic search over git commits:
124+
125+
```
126+
# Search commits by meaning
127+
dev_history:
128+
query: "authentication token fix"
129+
130+
# Get file history
131+
dev_history:
132+
mode: "file"
133+
file: "src/auth/middleware.ts"
134+
135+
# Filter by author
136+
dev_history:
137+
query: "performance optimization"
138+
author: "alice"
139+
140+
# Recent commits only
141+
dev_history:
142+
query: "bug fix"
143+
since: "30 days ago"
144+
```
145+
146+
**Output shows:**
147+
- Commits with relevance scores
148+
- Author and date
149+
- Changed files
150+
- Issue/PR references extracted from messages
113151

114152
---
115153

@@ -122,7 +160,7 @@ Get rich context for implementing a GitHub issue:
122160
dev_plan:
123161
issue: 42
124162
125-
# Full context package
163+
# Full context package (v0.4+)
126164
dev_plan:
127165
issue: 42
128166
includeCode: true
@@ -133,6 +171,7 @@ dev_plan:
133171
**Returns:**
134172
- Issue details (title, body, labels, comments)
135173
- Relevant code snippets from semantic search
174+
- **Related commits** from git history (v0.4+)
136175
- Codebase patterns (test conventions, etc.)
137176
- Related issues/PRs
138177

@@ -238,7 +277,12 @@ dev_health:
238277
dev_refs: { name: "suspectFunction", direction: "callees" }
239278
```
240279

241-
3. **Find similar issues:**
280+
3. **Find related commits:**
281+
```
282+
dev_history: { query: "similar bug fix" }
283+
```
284+
285+
4. **Find similar issues:**
242286
```
243287
dev_gh: { action: "search", query: "similar error" }
244288
```
@@ -259,10 +303,15 @@ dev_health:
259303

260304
1. **Understand the change area:**
261305
```
262-
dev_map: { focus: "path/to/changed/dir" }
306+
dev_map: { focus: "path/to/changed/dir", includeChangeFrequency: true }
307+
```
308+
309+
2. **Check file history:**
310+
```
311+
dev_history: { mode: "file", file: "path/to/changed/file.ts" }
263312
```
264313

265-
2. **Check impact:**
314+
3. **Check impact:**
266315
```
267316
dev_refs: { name: "changedFunction", direction: "callers" }
268317
```

website/content/docs/tools/_meta.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export default {
33
'dev-search': 'dev_search',
44
'dev-refs': 'dev_refs',
55
'dev-map': 'dev_map',
6+
'dev-history': 'dev_history',
67
'dev-plan': 'dev_plan',
78
'dev-explore': 'dev_explore',
89
'dev-gh': 'dev_gh',

0 commit comments

Comments
 (0)