|
| 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