neuronlayer 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,24 +13,19 @@
13
13
 
14
14
  AI coding assistants are powerful but forgetful:
15
15
 
16
- | Problem | Stat |
17
- |---------|------|
18
- | Productivity paradox | 19% SLOWER with AI |
19
- | "Almost right" frustration | 66% of developers |
20
- | Trust issues | Only 29% trust AI code |
21
- | Context collapse | AI forgets mid-session |
22
- | Technical debt | 1.64x higher errors |
23
- | Code duplication | 4x more cloning |
16
+ - Context collapse - AI forgets mid-session
17
+ - No persistent memory - every session starts fresh
18
+ - Code duplication - AI doesn't know what already exists
19
+ - Test breakage - AI suggestions break existing tests
24
20
 
25
21
  ## The Solution
26
22
 
27
23
  NeuronLayer gives AI assistants persistent, intelligent memory:
28
24
 
29
- - **Never forget context** - Decisions, patterns, and history persist across sessions
30
- - **Self-documenting codebase** - Architecture docs generate automatically
31
- - **Context rot prevention** - AI stays sharp even in long sessions
32
- - **Pattern enforcement** - Stops code duplication before it happens
33
- - **Test-aware suggestions** - AI respects your tests
25
+ - **Decisions persist** - Architectural decisions survive across sessions
26
+ - **Patterns learned** - AI knows your coding conventions
27
+ - **Context preserved** - Smart compaction prevents forgetting
28
+ - **Tests respected** - AI knows what tests exist
34
29
 
35
30
  ---
36
31
 
@@ -70,87 +65,64 @@ That's it! This automatically:
70
65
 
71
66
  Just restart your AI tool and NeuronLayer is active.
72
67
 
73
- ### Output
74
-
75
- ```
76
- NeuronLayer initialized!
77
-
78
- Project: my-project
79
- Path: /home/user/my-project
80
- Data: ~/.memorylayer/projects/my-project-abc123
81
-
82
- Configured MCP Clients:
83
- ✓ Claude Desktop: ~/.config/claude/claude_desktop_config.json
84
- ✓ OpenCode: ~/.opencode/config.json
85
- ✓ Claude Code: ~/.claude.json
86
-
87
- Restart your AI tools to activate.
88
- ```
89
-
90
68
  ---
91
69
 
92
- ## Manual Configuration
93
-
94
- If you prefer manual setup or use a different MCP client:
95
-
96
- ### Claude Desktop
70
+ ## MCP Tools
97
71
 
98
- Add to `claude_desktop_config.json`:
72
+ NeuronLayer exposes **12 MCP tools** organized into 6 gateway tools and 6 standalone tools.
99
73
 
100
- ```json
101
- {
102
- "mcpServers": {
103
- "neuronlayer": {
104
- "command": "npx",
105
- "args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
106
- }
107
- }
108
- }
109
- ```
74
+ ### Gateway Tools (Smart Routing)
110
75
 
111
- Config locations:
112
- - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
113
- - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
114
- - **Linux**: `~/.config/claude/claude_desktop_config.json`
76
+ These are the main tools. Each routes to multiple internal capabilities based on input:
115
77
 
116
- ### OpenCode
78
+ | Tool | Purpose |
79
+ |------|---------|
80
+ | `memory_query` | Search codebase, find code, look up symbols, get file context |
81
+ | `memory_record` | Save decisions, learn patterns, record feedback, track features |
82
+ | `memory_review` | Pre-code review: check patterns, conflicts, tests, get suggestions |
83
+ | `memory_status` | Project overview, architecture, recent changes, health check |
84
+ | `memory_ghost` | Proactive intelligence: conflicts, "you solved this before", session resume |
85
+ | `memory_verify` | Pre-commit check: validate imports, security, dependencies |
117
86
 
118
- Add to `~/.opencode/config.json`:
87
+ ### Standalone Tools
119
88
 
120
- ```json
121
- {
122
- "mcpServers": {
123
- "neuronlayer": {
124
- "command": "npx",
125
- "args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
126
- }
127
- }
128
- }
129
- ```
89
+ | Tool | Purpose |
90
+ |------|---------|
91
+ | `switch_project` | Switch between registered projects |
92
+ | `switch_feature_context` | Resume work on a previous feature |
93
+ | `trigger_compaction` | Reduce memory when context is full |
94
+ | `update_decision_status` | Mark decisions as deprecated/superseded |
95
+ | `export_decisions_to_adr` | Export decisions as ADR markdown files |
96
+ | `discover_projects` | Find git repos on the system |
130
97
 
131
98
  ---
132
99
 
133
100
  ## Features
134
101
 
135
- ### Core Features
102
+ ### What's Implemented
136
103
 
137
- | Feature | Description |
138
- |---------|-------------|
139
- | **Semantic Search** | Find code by meaning, not just keywords |
140
- | **Decision Recording** | Log architectural decisions with context |
141
- | **Pattern Library** | Learn and enforce coding patterns |
142
- | **File Indexing** | AST-based symbol extraction |
104
+ | Feature | Status | Description |
105
+ |---------|--------|-------------|
106
+ | **Semantic Search** | Working | Find code by meaning using embeddings |
107
+ | **Decision Recording** | Working | Log architectural decisions with context |
108
+ | **Pattern Library** | Working | Learn and validate coding patterns |
109
+ | **File Indexing** | Working | AST-based symbol extraction |
110
+ | **Context Compaction** | Working | Smart summarization when context fills |
111
+ | **Test Indexing** | Working | Index tests, predict failures |
112
+ | **Git Integration** | Working | Track changes, correlate with decisions |
113
+ | **Multi-Project** | Working | Switch between projects |
143
114
 
144
- ### Advanced Features
115
+ ### Modules
145
116
 
146
- | Feature | Description |
147
- |---------|-------------|
148
- | **Living Documentation** | Auto-generated architecture docs |
149
- | **Context Rot Prevention** | Smart compaction keeps AI focused |
150
- | **Confidence Scoring** | Know when AI is guessing vs confident |
151
- | **Change Intelligence** | "What changed?" and "Why did it break?" |
152
- | **Architecture Enforcement** | Suggest existing functions, prevent duplication |
153
- | **Test-Aware Suggestions** | Predict test failures before they happen |
117
+ ```
118
+ src/core/
119
+ ├── living-docs/ # Architecture & changelog generation
120
+ ├── context-rot/ # Context health & compaction
121
+ ├── confidence/ # Source tracking & conflict detection
122
+ ├── change-intelligence/ # Git tracking & fix suggestions
123
+ ├── architecture/ # Pattern library & validation
124
+ └── test-awareness/ # Test indexing & failure prediction
125
+ ```
154
126
 
155
127
  ---
156
128
 
@@ -184,39 +156,6 @@ Add to `~/.opencode/config.json`:
184
156
 
185
157
  ---
186
158
 
187
- ## MCP Tools
188
-
189
- NeuronLayer exposes 25+ MCP tools:
190
-
191
- ### Query & Search
192
- - `memory_query` - Semantic search across codebase
193
- - `memory_status` - Project overview and health
194
-
195
- ### Recording
196
- - `memory_record` - Save decisions, patterns, feedback
197
- - `memory_review` - Pre-flight check before code changes
198
- - `memory_verify` - Validate AI-generated code
199
-
200
- ### Ghost Mode (AI-Proactive)
201
- - `memory_ghost` - Conflicts, deja vu, session resurrection
202
-
203
- ### Living Documentation
204
- - `get_architecture` - Project structure overview
205
- - `get_changelog` - Recent changes with context
206
- - `what_happened` - "What did we do yesterday?"
207
-
208
- ### Architecture Enforcement
209
- - `validate_pattern` - Check code against patterns
210
- - `suggest_existing` - Find reusable functions
211
- - `learn_pattern` - Teach new patterns
212
-
213
- ### Test Awareness
214
- - `get_related_tests` - Tests for a file/function
215
- - `check_tests` - Predict test failures
216
- - `suggest_test_update` - Test update suggestions
217
-
218
- ---
219
-
220
159
  ## CLI Commands
221
160
 
222
161
  ```bash
@@ -238,18 +177,54 @@ neuronlayer projects switch <id>
238
177
  # Export decisions to ADR files
239
178
  neuronlayer export --format madr
240
179
 
241
- # Discover projects in common locations
242
- neuronlayer projects discover
243
-
244
180
  # Show help
245
181
  neuronlayer help
246
182
  ```
247
183
 
248
184
  ---
249
185
 
186
+ ## Manual Configuration
187
+
188
+ ### Claude Desktop
189
+
190
+ Add to `claude_desktop_config.json`:
191
+
192
+ ```json
193
+ {
194
+ "mcpServers": {
195
+ "neuronlayer": {
196
+ "command": "npx",
197
+ "args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
198
+ }
199
+ }
200
+ }
201
+ ```
202
+
203
+ Config locations:
204
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
205
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
206
+ - **Linux**: `~/.config/claude/claude_desktop_config.json`
207
+
208
+ ### OpenCode
209
+
210
+ Add to `~/.opencode/config.json`:
211
+
212
+ ```json
213
+ {
214
+ "mcpServers": {
215
+ "neuronlayer": {
216
+ "command": "npx",
217
+ "args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
218
+ }
219
+ }
220
+ }
221
+ ```
222
+
223
+ ---
224
+
250
225
  ## Data Storage
251
226
 
252
- NeuronLayer stores project data separately for each project:
227
+ Each project has isolated data:
253
228
 
254
229
  ```
255
230
  ~/.memorylayer/
@@ -258,89 +233,45 @@ NeuronLayer stores project data separately for each project:
258
233
  │ │ ├── memorylayer.db # SQLite database
259
234
  │ │ └── embeddings/ # Vector index
260
235
  │ └── project-b-def456/
261
- ├── memorylayer.db
262
- │ └── embeddings/
236
+ └── ...
263
237
  └── registry.json # Project registry
264
238
  ```
265
239
 
266
- Each project is isolated - no data mixing between projects.
267
-
268
240
  ---
269
241
 
270
242
  ## Privacy
271
243
 
272
- NeuronLayer is **100% local by default**:
244
+ NeuronLayer is **100% local**:
273
245
 
274
246
  - All data stored on your machine
275
- - No cloud services required
276
- - No telemetry or tracking
277
- - Works completely offline
247
+ - No cloud services
248
+ - No telemetry
249
+ - Works offline
278
250
 
279
251
  ---
280
252
 
281
253
  ## Development
282
254
 
283
- ### Prerequisites
284
-
285
- - Node.js 18+
286
- - npm or yarn
287
-
288
- ### Setup
289
-
290
255
  ```bash
291
- # Clone the repository
256
+ # Clone
292
257
  git clone https://github.com/abhisavakar/neuronlayer.git
293
258
  cd neuronlayer
294
259
 
295
- # Install dependencies
260
+ # Install
296
261
  npm install
297
262
 
298
263
  # Build
299
264
  npm run build
300
265
 
301
- # Run tests
266
+ # Test
302
267
  npm test
303
-
304
- # Type check
305
- npm run typecheck
306
268
  ```
307
269
 
308
270
  ---
309
271
 
310
- ## Contributing
311
-
312
- We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
313
-
314
- ### Areas We Need Help
315
-
316
- - Additional language support (Python, Go, Rust AST)
317
- - IDE extensions (VS Code, JetBrains)
318
- - Cursor integration (when they add MCP support)
319
- - Documentation improvements
320
- - Performance optimizations
321
-
322
- ---
323
-
324
- ## Roadmap
325
-
326
- - [x] Core MCP server
327
- - [x] Living Documentation
328
- - [x] Context Rot Prevention
329
- - [x] Confidence Scoring
330
- - [x] Change Intelligence
331
- - [x] Architecture Enforcement
332
- - [x] Test-Aware Suggestions
333
- - [x] Auto-setup for Claude Desktop
334
- - [x] Auto-setup for OpenCode
335
- - [ ] VS Code extension
336
- - [ ] Cursor support (pending MCP)
337
- - [ ] Team features (shared memory)
338
-
339
- ---
340
-
341
272
  ## License
342
273
 
343
- MIT License - see [LICENSE](LICENSE) for details.
274
+ MIT License - see [LICENSE](LICENSE)
344
275
 
345
276
  ---
346
277
 
@@ -350,16 +281,4 @@ MIT License - see [LICENSE](LICENSE) for details.
350
281
 
351
282
  ---
352
283
 
353
- ## Acknowledgments
354
-
355
- Built with:
356
- - [Model Context Protocol](https://modelcontextprotocol.io/) by Anthropic
357
- - [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
358
- - [tree-sitter](https://tree-sitter.github.io/tree-sitter/) for AST parsing
359
- - [Xenova/transformers](https://github.com/xenova/transformers.js) for embeddings
360
-
361
- ---
362
-
363
- **Made with determination over a weekend.**
364
-
365
- *Your codebase documents itself. AI that never forgets.*
284
+ Built with [Model Context Protocol](https://modelcontextprotocol.io/) by Anthropic.