@@ -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
770920One command to index, one command to install:
0 commit comments