Skip to content

Commit 56f1ac8

Browse files
committed
docs: add v0.8.5 release notes and update changeset
- Add v0.8.5 changelog entry to website - Update latest-version.ts with new release info - Update tools index with v0.8.5 marker - Update changeset to use patch bumps for all packages - Fix all v0.9.0 references to v0.8.5 - Document pattern analysis features and performance improvements
1 parent 1d3bddc commit 56f1ac8

File tree

4 files changed

+233
-33
lines changed

4 files changed

+233
-33
lines changed
Lines changed: 69 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,87 @@
11
---
2+
"@lytics/dev-agent-core": patch
23
"@lytics/dev-agent-mcp": patch
34
"@lytics/dev-agent": patch
45
"@lytics/dev-agent-cli": patch
56
---
67

7-
Refactor: Rename dev_explore → dev_inspect with focused actions
8+
feat(mcp): refactor dev_inspect and optimize pattern analysis
89

9-
**BREAKING CHANGES:**
10+
**API Simplification:**
1011

11-
- `dev_explore` renamed to `dev_inspect`
12-
- Actions changed from `['pattern', 'similar', 'relationships']` to `['compare', 'validate']`
13-
- Removed `action: "pattern"` → Use `dev_search` instead
14-
- Removed `action: "relationships"` → Use `dev_refs` instead
15-
- Renamed `action: "similar"``action: "compare"`
12+
- `dev_inspect` simplified to single-purpose tool (action parameter streamlined)
13+
- Previously: `dev_inspect({ action: "compare", query: "file.ts" })`
14+
- Now: `dev_inspect({ query: "file.ts" })`
15+
- Existing usage continues to work with dynamic MCP schema discovery
1616

17-
**What's New:**
17+
**Major Features:**
1818

19-
- `dev_inspect` with `action: "compare"` finds similar code implementations
20-
- `dev_inspect` with `action: "validate"` checks pattern consistency (placeholder for future)
21-
- Clearer tool boundaries: search vs. inspect vs. refs
22-
- File-focused analysis (always takes file path, not search query)
19+
- Created `PatternAnalysisService` with 5 pattern extractors:
20+
- Import style (ESM, CJS, mixed, unknown)
21+
- Error handling (throw, result, callback, unknown)
22+
- Type coverage (full, partial, none)
23+
- Testing (co-located test files)
24+
- File size (lines vs similar files)
25+
- Batch scanning optimization (5-10x faster: 500-1000ms vs 2-3 seconds)
26+
- Embedding-based similarity search (no more false matches)
27+
- Extension filtering (`.ts` only compares with `.ts`)
28+
- Comprehensive pattern analysis (finds similar files + analyzes patterns)
29+
30+
**Performance:**
31+
32+
- One ts-morph initialization vs 6 separate scans
33+
- Batch scan all files in one pass
34+
- `searchByDocumentId()` for embedding-based similarity
35+
- Pattern analysis: 500-1000ms (down from 2-3 seconds)
36+
37+
**Bug Fixes:**
38+
39+
- Fixed `findSimilar` to use document embeddings instead of file paths
40+
- Fixed `--force` flag to properly clear old vector data
41+
- Fixed race condition in LanceDB table creation
42+
- Removed `outputSchema` from all 9 MCP adapters (Cursor/Claude compatibility)
43+
44+
**New Features:**
45+
46+
- Test utilities in `@lytics/dev-agent-core/utils`:
47+
- `isTestFile()` — Check if file is a test file
48+
- `findTestFile()` — Find co-located test files
49+
- Vector store `clear()` method
50+
- Vector store `searchByDocumentId()` method
51+
- Comprehensive pattern comparison with statistical analysis
2352

2453
**Migration Guide:**
2554

2655
```typescript
27-
// Before
28-
dev_explore { action: "similar", query: "src/auth.ts" }
29-
dev_explore { action: "pattern", query: "error handling" }
30-
dev_explore { action: "relationships", query: "src/auth.ts" }
31-
32-
// After
33-
dev_inspect { action: "compare", query: "src/auth.ts" }
34-
dev_search { query: "error handling" }
35-
dev_refs { name: "authenticateUser" }
56+
// Before (v0.8.4)
57+
dev_inspect({ action: "compare", query: "src/auth.ts" })
58+
dev_inspect({ action: "validate", query: "src/auth.ts" })
59+
60+
// After (v0.8.5) - Streamlined!
61+
dev_inspect({ query: "src/auth.ts" })
3662
```
3763

38-
**Why:**
64+
The tool now automatically finds similar files AND performs pattern analysis. No migration needed - MCP tools discover the new schema dynamically.
65+
66+
**Re-index Recommended:**
67+
68+
```bash
69+
dev index . --force
70+
```
71+
72+
This clears old data and rebuilds with improved embedding-based search.
73+
74+
**Documentation:**
75+
76+
- Complete rewrite of dev-inspect.mdx
77+
- Updated README.md with pattern categories
78+
- Updated CLAUDE.md with new descriptions
79+
- Added v0.8.5 changelog entry to website
80+
- Migration guide from dev_explore
3981

40-
- Eliminate tool duplication (`pattern` duplicated `dev_search`)
41-
- Clear single responsibility (file analysis only)
42-
- Better naming (`inspect` = deep file examination)
43-
- Reserve `dev_explore` for future external context (standards, examples, docs)
82+
**Tests:**
4483

84+
- All 1100+ tests passing
85+
- Added 10 new test-utils tests
86+
- Pattern analysis service fully tested
87+
- Integration tests for InspectAdapter

website/content/docs/tools/index.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@ dev-agent provides nine tools through the Model Context Protocol (MCP). These to
1111
| [`dev_map`](/docs/tools/dev-map) | Codebase structure overview with change frequency |
1212
| [`dev_history`](/docs/tools/dev-history) | Semantic search over git commits ✨ v0.4 |
1313
| [`dev_plan`](/docs/tools/dev-plan) | Assemble context for GitHub issues |
14-
| [`dev_inspect`](/docs/tools/dev-inspect) | Inspect files (compare implementations, check patterns) |
14+
| [`dev_inspect`](/docs/tools/dev-inspect) | File pattern analysis (finds similar code, compares 5 pattern categories) ✨ v0.8.5 |
1515
| [`dev_gh`](/docs/tools/dev-gh) | Search GitHub issues and PRs |
1616
| [`dev_status`](/docs/tools/dev-status) | Check repository indexing status |
1717
| [`dev_health`](/docs/tools/dev-health) | Monitor MCP server health |
1818

19-
## New in v0.5.0
19+
## New in v0.8.5
20+
21+
- **`dev_inspect`** — Refactored for comprehensive pattern analysis (5 categories)
22+
- **Performance** — 5-10x faster pattern analysis via batch scanning (500-1000ms)
23+
- **Accuracy** — Semantic similarity using document embeddings, extension filtering
24+
- **Simplified API** — Streamlined interface (no action parameter needed)
25+
26+
## v0.5.0
2027

2128
- **Enhanced indexing** — Arrow functions, React hooks, and exported constants now extracted
2229
- **`dev_search`** — Better coverage of modern JavaScript patterns (hooks, utilities, configs)

website/content/latest-version.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*/
55

66
export const latestVersion = {
7-
version: '0.8.4',
8-
title: 'Refocus on Semantic Value',
7+
version: '0.8.5',
8+
title: 'Enhanced Pattern Analysis & Performance',
99
date: 'December 14, 2025',
1010
summary:
11-
'Removed git analytics commands to focus on unique semantic capabilities. Cleaner codebase, clearer value proposition.',
12-
link: '/updates#v084--refocus-on-semantic-value',
11+
'Refactored dev_inspect with 5-10x faster pattern analysis, comprehensive code comparison across 5 pattern categories, and improved semantic search accuracy.',
12+
link: '/updates#v085--enhanced-pattern-analysis--performance',
1313
} as const;

website/content/updates/index.mdx

Lines changed: 151 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,154 @@ What's new in dev-agent. We ship improvements regularly to help AI assistants un
99

1010
---
1111

12+
## v0.8.5 — Enhanced Pattern Analysis & Performance
13+
14+
*December 14, 2025*
15+
16+
**Refactored `dev_inspect` with 5-10x faster pattern analysis and comprehensive code comparison.**
17+
18+
### What's Changed
19+
20+
**🔄 Simplified `dev_inspect` Tool**
21+
22+
The `action` parameter has been streamlined. `dev_inspect` is now a single-purpose tool that automatically:
23+
- Finds similar files using semantic search
24+
- Analyzes and compares 5 pattern categories
25+
26+
```bash
27+
# Before (v0.8.4)
28+
dev_inspect { action: "compare", query: "src/auth.ts" }
29+
30+
# After (v0.8.5) - Simpler!
31+
dev_inspect { query: "src/auth.ts" }
32+
```
33+
34+
### What's New
35+
36+
**🔍 Comprehensive Pattern Analysis**
37+
38+
`dev_inspect` now analyzes 5 pattern categories automatically:
39+
40+
1. **Import Style** — ESM, CJS, mixed, or unknown
41+
2. **Error Handling** — throw, result types, callbacks, or unknown
42+
3. **Type Coverage** — full, partial, or none (TypeScript only)
43+
4. **Testing** — Detects co-located test files
44+
5. **File Size** — Lines vs similar files
45+
46+
**Example output:**
47+
```
48+
## File Inspection: src/auth/middleware.ts
49+
50+
### Similar Files (5 analyzed)
51+
1. `src/auth/session.ts` (78%)
52+
2. `src/middleware/logger.ts` (72%)
53+
3. `src/api/auth-handler.ts` (68%)
54+
55+
### Pattern Analysis
56+
57+
**Import Style:** Your file uses `esm`, matching 100% of similar files.
58+
**Error Handling:** Your file uses `throw`, but 60% use `result`.
59+
**Type Coverage:** Your file has `full` coverage (80% match).
60+
**Testing:** No test file found. 40% of similar files have tests.
61+
**Size:** 234 lines (smaller than average of 312 lines)
62+
```
63+
64+
**⚡ Performance Improvements**
65+
66+
- **5-10x faster** pattern analysis via batch scanning
67+
- **500-1000ms** analysis time (down from 2-3 seconds)
68+
- One ts-morph initialization vs 6 separate scans
69+
- Embedding-based similarity (no more false matches)
70+
71+
**🎯 Accuracy Improvements**
72+
73+
- **Extension filtering** — Only compares files with same extension
74+
- **Semantic similarity** — Uses document embeddings instead of file paths
75+
- **No duplicates** — Fixed search to return unique results
76+
- **Relevant comparisons**`.ts` files only compare with `.ts` files
77+
78+
### Bug Fixes
79+
80+
**Vector Store & Indexing**
81+
- Fixed `findSimilar` to use document embeddings instead of path strings
82+
- Fixed `--force` flag to properly clear old vector data
83+
- Fixed race condition in LanceDB table creation during concurrent operations
84+
- Added `searchByDocumentId()` for embedding-based similarity search
85+
86+
**MCP Protocol Compliance**
87+
- Removed `outputSchema` from all 9 MCP adapters
88+
- Fixed Cursor/Claude compatibility issues (MCP error -32600)
89+
- All tools now return plain markdown text wrapped in content blocks
90+
91+
### New Features
92+
93+
**Core Utilities**
94+
- Created `test-utils.ts` in `@lytics/dev-agent-core/utils`
95+
- `isTestFile()` — Check if a file is a test file
96+
- `findTestFile()` — Find co-located test files
97+
- Reusable across services
98+
99+
**Vector Store Enhancements**
100+
- `clear()` — Delete all documents (used by `--force`)
101+
- `searchByDocumentId()` — Find similar documents by embedding
102+
- Better race condition handling in table creation
103+
104+
### Architecture Improvements
105+
106+
**PatternAnalysisService**
107+
- Dedicated service in `@lytics/dev-agent-core`
108+
- 5 pattern extractors with comprehensive tests
109+
- Batch scanning optimization for performance
110+
- Comparison logic with statistical analysis
111+
112+
**Service Refactoring**
113+
- Extracted test utilities to `core/utils` (DRY principle)
114+
- PatternAnalysisService uses shared utilities
115+
- Cleaner separation of concerns
116+
117+
### Documentation
118+
119+
- Complete rewrite of dev-inspect.mdx
120+
- Updated README.md with pattern categories
121+
- Updated CLAUDE.md with new descriptions
122+
- Migration guide from dev_explore to dev_inspect
123+
124+
### Testing
125+
126+
- All 1100+ tests passing
127+
- Added 10 new test-utils tests
128+
- Pattern analysis service fully tested
129+
- Integration tests for InspectAdapter
130+
131+
### Migration Guide
132+
133+
**API Simplification:**
134+
```typescript
135+
// Old (v0.8.4) - Had action parameter
136+
dev_inspect({
137+
action: "compare",
138+
query: "src/auth.ts"
139+
})
140+
141+
// New (v0.8.5) - Streamlined!
142+
dev_inspect({
143+
query: "src/auth.ts"
144+
})
145+
```
146+
147+
The tool now does both similarity search AND pattern analysis automatically. Existing usage will continue to work.
148+
149+
**Re-index Recommended:**
150+
151+
For best results with the improved semantic search:
152+
```bash
153+
dev index . --force
154+
```
155+
156+
This clears old data and rebuilds with the improved embedding-based search.
157+
158+
---
159+
12160
## v0.8.4 — Refocus on Semantic Value
13161
14162
*December 14, 2025*
@@ -761,10 +909,12 @@ Hot Paths (most referenced):
761909
|------|---------|
762910
| `dev_search` | Semantic code search |
763911
| `dev_plan` | Context assembly for issues |
764-
| `dev_explore` | Pattern discovery |
912+
| `dev_inspect` | File analysis & pattern discovery |
765913
| `dev_gh` | GitHub issue/PR search |
766914
| `dev_status` | Repository health |
767915
916+
> **Note:** `dev_inspect` was originally named `dev_explore` at launch. It was renamed and enhanced in v0.8.5 with comprehensive pattern analysis.
917+
768918
### Installation
769919
770920
One command to index, one command to install:

0 commit comments

Comments
 (0)