Skip to content

Commit 8f3bf68

Browse files
committed
feat(v1.2.0): testing patterns detection, golden files extraction, wrapper libraries detection, file watcher for incrementalish indexing
1 parent c7d4dd8 commit 8f3bf68

17 files changed

Lines changed: 1584 additions & 370 deletions

File tree

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,3 @@ dist/
1010
*.swo
1111
*~
1212
.claude
13-
14-
# Internal docs (not for public release)
15-
SPEC.md
16-
TODO.md
17-
.mcp.json
18-
LINKEDIN_POST.md
19-
.codebase-intelligence.json

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
# Changelog
22

3+
## 1.2.0 (2025-12-06)
4+
5+
### Added
6+
7+
- **File watcher**: Automatic re-indexing when source files change
8+
- Auto-enabled by default (disable with `WATCH_FILES=false`)
9+
- 2-second debounce to avoid excessive re-indexing
10+
- Ignores node_modules, dist, .git, and test files by default
11+
12+
- **Import graph & wrapper detection**: Track library usage for AI-inferred wrappers
13+
- `get_component_usage` returns usage counts per library
14+
- `topUsed` array shows usage ratios (e.g., `@mycompany/ui: 847` vs `primeng: 3`)
15+
- Exposes tsconfig paths so AI can identify internal vs external imports
16+
17+
- **Enhanced `get_indexing_status`**: Now includes file watcher stats and pending changes
18+
- Shows `pendingChanges` count (files changed since last index)
19+
- Provides actionable hints for re-indexing decisions
20+
21+
- **`incrementalOnly` option for `refresh_index`**: API ready for Phase 2 incremental indexing
22+
23+
### Changed
24+
25+
- **Framework-agnostic architecture clarified**: Works on ANY project, Angular as first specialized analyzer
26+
- Generic analyzer supports 32 file extensions (JS, TS, Python, Java, Go, Rust, etc.)
27+
- Angular patterns (inject, signals, standalone) are specialized intelligence, not a requirement
28+
29+
- **Angular analyzer enhancements**:
30+
- `detectedPatterns` array for generic forwarding to indexer
31+
- Better standalone detection (explicit flag OR modern patterns)
32+
- Added `usesRxJS`, `usesEffect`, `usesComputed` flags
33+
34+
- **Indexer now forwards patterns generically**: Keeps core framework-agnostic
35+
36+
- README updated with correct "works on any project" messaging
37+
38+
39+
---
40+
41+
## 1.1.0 (2025-12-05)
42+
43+
### Added
44+
- **Testing framework detection**: Detects Jest, Jasmine/Karma, Vitest, Cypress, Playwright from actual code patterns (not just package.json)
45+
- **Golden Files**: Surfaces files that demonstrate all team patterns together—one file for AI to mimic
46+
- **Wrapper recommendations**: Exposes library wrapper detection in `get_team_patterns` response
47+
- **Test utilities tracking**: Detects ng-mocks, MSW, Testing Library usage
48+
49+
### Changed
50+
- Framework-agnostic indexer: Pattern detection moved into framework analyzers, indexer just forwards
51+
- Test files now parsed for pattern detection (`parseTests: true`)
52+
53+
### Removed
54+
- `get_analyzer_info` tool: Provided no user value—pure implementation details that wasted context window
55+
56+
---
57+
358
## 1.0.0 (2025-11-29)
459

560
Initial release.

EVIDENCE.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Why This Exists: Research & Evidence
2+
3+
> **TL;DR**: AI coding assistants are smart but generic. They don't know YOUR codebase's patterns. This MCP gives them that context.
4+
5+
---
6+
7+
## The Problem (Validated by Research)
8+
9+
### Industry Pain Points
10+
11+
| Pain Point | Evidence |
12+
|------------|----------|
13+
| **"AI doesn't know my codebase"** | 63.3% of developers cite lack of codebase understanding as top AI limitation ([Stack Overflow 2024](https://survey.stackoverflow.co/2024/ai)) |
14+
| **"AI suggests generic patterns"** | AI suggests Material UI when team uses PrimeNG. Suggests constructor injection when team uses inject(). |
15+
| **"Vibe coding" creates churn** | AI-generated code doubled code churn in 2024, 8x increase in duplicated code ([GitClear 2024](https://www.gitclear.com/)), DORA recognizes code churn as negative predictor of defects ([State of DevOps 2024](https://dora.dev/research/2024/dora-report/)) |
16+
| **Time spent correcting AI** | Developers repeatedly correct same patterns: "use inject()", "use our wrapper", "write tests like we do" |
17+
18+
### What Existing Tools Don't Solve
19+
20+
| Tool Category | What They Do | The Gap |
21+
|---------------|--------------|---------|
22+
| **AGENTS.md, .cursorrules, CLAUDE.md** | Static instructions (what team WANTS) | Can't quantify actual usage (what team DOES) |
23+
| **Context7** | External library docs | Not YOUR internal patterns |
24+
| **GitHub Copilot @workspace** | Runtime search | No pre-indexed pattern awareness |
25+
| **Cursor embeddings** | Pre-indexed search | Framework-agnostic, no pattern detection |
26+
27+
---
28+
29+
## Our Solution
30+
31+
### What We Provide
32+
33+
| Feature | Why It Matters |
34+
|---------|----------------|
35+
| **Pattern Frequency Detection** | "97% use inject(), 3% constructor" — AI knows the consensus |
36+
| **Internal Library Discovery** | "Use @company/ui-toolkit not primeng directly" — wrapper detection |
37+
| **Golden Files** | Real examples showing patterns in context, not isolated snippets |
38+
| **Testing Framework Detection** | "Write Jest tests, not Jasmine" — detected from actual spec files |
39+
40+
### Complementary Positioning
41+
42+
> **AGENTS.md tells AI what team WANTS. We show what they DO.**
43+
44+
Combined: AI sees both intention (AGENTS.md) AND reality (pattern data). Can identify gaps.
45+
46+
---
47+
48+
## Known Limitations
49+
50+
We're honest about what we don't solve:
51+
52+
| Limitation | Status |
53+
|------------|--------|
54+
| **Pattern frequency ≠ pattern quality** | 97% usage could be technical debt. We show consensus, not correctness. |
55+
| **Stale index risk** | Manual re-indexing required. Lazy indexing planned (Phase 1.6). |
56+
| **Framework coverage** | Angular-specialized now. React/Vue analyzers extensible. |
57+
| **LLM context placement** | We provide data. LLM/client determines how to use it. |
58+
59+
---
60+
61+
## Key Learnings (From Building This)
62+
63+
1. **Statistical detection isn't enough** — Saying "97% use inject()" is useless if AI doesn't see HOW to use it. Golden Files with real examples solved this.
64+
65+
2. **Complementary, not replacement** — We work WITH AGENTS.md, not against it. Different layers of context.
66+
67+
3. **Simplicity beats completeness** — Dropped features that added complexity without clear value (dependency graphs, violation detection). Focus on core patterns.
68+
69+
4. **Human-led, not autonomous** — Research shows autonomous agents fail 65-85% of the time. We optimize for human+AI collaboration.
70+
71+
---
72+
73+
## Claim Validation Status
74+
75+
| Claim | Evidence | Status |
76+
|-------|----------|--------|
77+
| "63.3% cite lack of context" | Stack Overflow 2024 Survey | ✅ Cited |
78+
| "AI doubles code churn" | GitClear 2024 Report | ✅ Cited |
79+
| "97% inject() usage" | Pattern detection on indexed enterprise codebase | ✅ Validated |
80+
| "Reduces AI corrections" | 5-use-case methodology planned | ⏳ In Progress |
81+
| "X% token reduction" | To be measured | ⏳ Pending |
82+
83+
---
84+
85+
## Sources
86+
87+
1. [Stack Overflow 2024 Developer Survey - AI Section](https://survey.stackoverflow.co/2024/ai) — 65,000+ respondents
88+
2. [GitClear 2024 AI Code Quality Report](https://www.gitclear.com/) — Code churn analysis
89+
3. [DORA State of DevOps 2024](https://dora.dev/research/2024/dora-report/) — Code churn as quality metric
90+
4. [Anthropic MCP](https://modelcontextprotocol.io/) — Protocol specification
91+
5. Internal validation on enterprise Angular codebase (611 files, 887 chunks indexed)
92+
93+
📄 **[Research Notes](./research/06-arxiv-research.md)** — What I learned from the academic papers
94+
95+
---
96+
97+
*Last updated: December 2025*
98+

0 commit comments

Comments
 (0)