You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Lead with concrete pain examples instead of config blocks
- Reorder sections: Discovers → Reasons → Remembers → Protects
- Collapse editor-specific setup into expandable details
- Trim preflight JSON example
- Add 30+ language support mention in opening section
- Use possessive "your team" framing throughout
Quantified pattern analysis with trend direction. Not "use inject()" — "97% of your team uses inject(), and it's rising."
35
+
36
+
-`inject()`: 97% adoption vs `constructor()`: 3% — with trend direction (rising/declining)
37
+
-`Signals`: rising (last used 2 days ago) vs `RxJS BehaviorSubject`: declining (180+ days)
38
+
- Golden files: real implementations scoring highest on modern pattern density — canonical examples to follow
39
+
- Pattern conflicts detected: when two approaches in the same category both exceed 20% adoption
40
+
41
+
### Remembers
42
+
43
+
Decisions, rationale, and past failures persist across sessions. Not just what your team does — why.
44
+
45
+
- Internal library usage: `@mycompany/ui-toolkit` (847 uses) vs `primeng` (3 uses) — and _why_ the wrapper exists
46
+
- "Tried direct PrimeNG toast, broke event system" — recorded as a failure memory, surfaced before the next agent repeats it
47
+
- Conventions from git history auto-extracted: `refactor:`, `migrate:`, `fix:`, `revert:` commits become memories with zero manual effort
48
+
49
+
### Protects
50
+
51
+
Before an edit happens, your agent gets a preflight briefing: what to use, what to avoid, what broke last time.
52
+
53
+
- Preflight card on `search_codebase` with `intent: "edit"` — risk level, preferred/avoid patterns, failure warnings, golden files, impact candidates
54
+
- Failure memories bump risk level and surface as explicit warnings
55
+
- Confidence decay: memories age (90-day or 180-day half-life). Stale guidance gets flagged, not blindly trusted
56
+
- Epistemic stress detection: when evidence is contradictory, stale, or too thin, the preflight card says "insufficient evidence" instead of guessing
8
57
9
-
### Claude Desktop
58
+
##Quick Start
10
59
11
-
Add to `claude_desktop_config.json`:
60
+
Add to your MCP client config:
12
61
13
62
```json
14
63
{
@@ -21,6 +70,9 @@ Add to `claude_desktop_config.json`:
21
70
}
22
71
```
23
72
73
+
<details>
74
+
<summary>Setup for VS Code, Cursor, Windsurf, Claude Code</summary>
75
+
24
76
### VS Code (Copilot)
25
77
26
78
Add `.vscode/mcp.json` to your project root:
@@ -68,52 +120,13 @@ Open Settings > MCP and add:
68
120
69
121
### Claude Code
70
122
71
-
No config file needed. Add to `.claude/settings.json` or run:
123
+
No config file needed. Run:
72
124
73
125
```bash
74
126
claude mcp add codebase-context -- npx -y codebase-context /path/to/your/project
75
127
```
76
128
77
-
## What Makes It a Second Brain
78
-
79
-
Other tools help AI find code. This one helps AI make the right decisions — by remembering what your team does, tracking how patterns evolve, and warning before mistakes repeat.
80
-
81
-
### Remembers
82
-
83
-
Decisions, rationale, and past failures persist across sessions. Not just what the team does — why.
84
-
85
-
- Internal library usage: `@mycompany/ui-toolkit` (847 uses) vs `primeng` (3 uses) — and _why_ the wrapper exists
86
-
- "Tried direct PrimeNG toast, broke event system" — recorded as a failure memory, surfaced before the next agent repeats it
87
-
- Conventions from git history auto-extracted: `refactor:`, `migrate:`, `fix:`, `revert:` commits become memories with zero manual effort
88
-
89
-
### Reasons
90
-
91
-
Quantified pattern analysis with trend direction. Not "use inject()" — "97% of the team uses inject(), and it's rising."
92
-
93
-
-`inject()`: 97% adoption vs `constructor()`: 3% — with trend direction (rising/declining)
94
-
-`Signals`: rising (last used 2 days ago) vs `RxJS BehaviorSubject`: declining (180+ days)
95
-
- Golden files: real implementations scoring highest on modern pattern density — canonical examples to follow
96
-
- Pattern conflicts detected: when two approaches in the same category both exceed 20% adoption
97
-
98
-
### Protects
99
-
100
-
Before an edit happens, the agent gets a preflight briefing: what to use, what to avoid, what broke last time.
101
-
102
-
- Preflight card on `search_codebase` with `intent: "edit"` — risk level, preferred/avoid patterns, failure warnings, golden files, impact candidates
103
-
- Failure memories bump risk level and surface as explicit warnings
104
-
- Confidence decay: memories age (90-day or 180-day half-life). Stale guidance gets flagged, not blindly trusted
105
-
- Epistemic stress detection: when evidence is contradictory, stale, or too thin, the preflight card says "insufficient evidence" instead of guessing
106
-
- Search quality transparency: `search_codebase` includes `searchQuality` (`ok`/`low_confidence`, signals, confidence, next steps) so ambiguous retrieval is explicit instead of hidden
107
-
108
-
### Discovers
109
-
110
-
Hybrid search (BM25 keyword 30% + vector embeddings 70%) with structured filters across 30+ languages:
111
-
112
-
-**Framework**: Angular, React, Vue
113
-
-**Language**: TypeScript, JavaScript, Python, Go, Rust, and 25+ more
@@ -127,7 +140,7 @@ Tested against a real enterprise Angular codebase (~30k files):
127
140
| Wrapper discovery |`ToastEventService`, `DialogComponent` surfaced over raw |
128
141
| Golden file identification | Top 5 files scoring 4-6 modern patterns each |
129
142
130
-
Without this context, AI agents default to generic patterns: raw PrimeNG imports, constructor injection, Jasmine syntax. With the second brain active, generated code matches the existing codebase on first attempt.
143
+
Without this context, AI agents default to generic patterns: raw PrimeNG imports, constructor injection, Jasmine syntax. With the second brain active, generated code matches your existing codebase on first attempt.
131
144
132
145
## How It Works
133
146
@@ -153,27 +166,18 @@ When using `search_codebase` with `intent: "edit"`, `"refactor"`, or `"migrate"`
@@ -237,7 +241,7 @@ The MCP creates the following structure in your project:
237
241
238
242
### Memory System
239
243
240
-
Patterns tell you _what_the team does ("97% use inject"), but not _why_ ("standalone compatibility"). Use `remember` to capture rationale that prevents repeated mistakes:
244
+
Patterns tell you _what_your team does ("97% use inject"), but not _why_ ("standalone compatibility"). Use `remember` to capture rationale that prevents repeated mistakes:
0 commit comments