neuronlayer 0.1.1 → 0.1.3

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
@@ -1,7 +1,8 @@
1
- # MemoryLayer
1
+ # NeuronLayer
2
2
 
3
3
  **Persistent memory layer for AI coding assistants. Your codebase documents itself.**
4
4
 
5
+ [![npm version](https://img.shields.io/npm/v/neuronlayer.svg)](https://www.npmjs.com/package/neuronlayer)
5
6
  [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
6
7
  [![Node.js](https://img.shields.io/badge/Node.js-18+-339933.svg)](https://nodejs.org/)
7
8
  [![MCP](https://img.shields.io/badge/MCP-Compatible-blue.svg)](https://modelcontextprotocol.io/)
@@ -12,48 +13,32 @@
12
13
 
13
14
  AI coding assistants are powerful but forgetful:
14
15
 
15
- | Problem | Stat |
16
- |---------|------|
17
- | Productivity paradox | 19% SLOWER with AI |
18
- | "Almost right" frustration | 66% of developers |
19
- | Trust issues | Only 29% trust AI code |
20
- | Context collapse | AI forgets mid-session |
21
- | Technical debt | 1.64x higher errors |
22
- | 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
23
20
 
24
21
  ## The Solution
25
22
 
26
- MemoryLayer gives AI assistants persistent, intelligent memory:
23
+ NeuronLayer gives AI assistants persistent, intelligent memory:
27
24
 
28
- - **Never forget context** - Decisions, patterns, and history persist across sessions
29
- - **Self-documenting codebase** - Architecture docs generate automatically
30
- - **Context rot prevention** - AI stays sharp even in long sessions
31
- - **Pattern enforcement** - Stops code duplication before it happens
32
- - **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
33
29
 
34
30
  ---
35
31
 
36
- ## Features
37
-
38
- ### Core Features (Free)
39
-
40
- | Feature | Description |
41
- |---------|-------------|
42
- | **Semantic Search** | Find code by meaning, not just keywords |
43
- | **Decision Recording** | Log architectural decisions with context |
44
- | **Pattern Library** | Learn and enforce coding patterns |
45
- | **File Indexing** | AST-based symbol extraction |
32
+ ## Compatibility
46
33
 
47
- ### Advanced Features
48
-
49
- | Feature | Description |
50
- |---------|-------------|
51
- | **Living Documentation** | Auto-generated architecture docs |
52
- | **Context Rot Prevention** | Smart compaction keeps AI focused |
53
- | **Confidence Scoring** | Know when AI is guessing vs confident |
54
- | **Change Intelligence** | "What changed?" and "Why did it break?" |
55
- | **Architecture Enforcement** | Suggest existing functions, prevent duplication |
56
- | **Test-Aware Suggestions** | Predict test failures before they happen |
34
+ | Tool | Supported | Auto-Configure |
35
+ |------|-----------|----------------|
36
+ | Claude Desktop | Yes | `neuronlayer init` |
37
+ | Claude Code (CLI) | Yes | `neuronlayer init` |
38
+ | OpenCode | Yes | `neuronlayer init` |
39
+ | VS Code + Continue | Yes | Manual config |
40
+ | Cursor | Not yet | No MCP support |
41
+ | Any MCP Client | Yes | Manual config |
57
42
 
58
43
  ---
59
44
 
@@ -65,26 +50,78 @@ MemoryLayer gives AI assistants persistent, intelligent memory:
65
50
  npm install -g neuronlayer
66
51
  ```
67
52
 
68
- ### Usage with Claude Desktop
69
-
70
- Add to your Claude Desktop config (`claude_desktop_config.json`):
53
+ ### One-Command Setup
71
54
 
72
- ```json
73
- {
74
- "mcpServers": {
75
- "memorylayer": {
76
- "command": "npx",
77
- "args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
78
- }
79
- }
80
- }
55
+ ```bash
56
+ cd your-project
57
+ neuronlayer init
81
58
  ```
82
59
 
83
- ### Usage with Any MCP Client
60
+ That's it! This automatically:
61
+ 1. Registers your project
62
+ 2. Configures Claude Desktop
63
+ 3. Configures OpenCode
64
+ 4. Configures Claude Code
65
+
66
+ Just restart your AI tool and NeuronLayer is active.
67
+
68
+ ---
69
+
70
+ ## MCP Tools
71
+
72
+ NeuronLayer exposes **12 MCP tools** organized into 6 gateway tools and 6 standalone tools.
73
+
74
+ ### Gateway Tools (Smart Routing)
75
+
76
+ These are the main tools. Each routes to multiple internal capabilities based on input:
77
+
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 |
86
+
87
+ ### Standalone Tools
88
+
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 |
97
+
98
+ ---
99
+
100
+ ## Features
101
+
102
+ ### What's Implemented
103
+
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 |
114
+
115
+ ### Modules
84
116
 
85
- ```bash
86
- # Start the MCP server
87
- memorylayer --project /path/to/your/project
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
88
125
  ```
89
126
 
90
127
  ---
@@ -93,12 +130,12 @@ memorylayer --project /path/to/your/project
93
130
 
94
131
  ```
95
132
  +-------------------------------------------------------------+
96
- | MEMORYLAYER |
133
+ | NEURONLAYER |
97
134
  +-------------------------------------------------------------+
98
135
  | |
99
136
  | +--------------+ +--------------+ +--------------+ |
100
137
  | | AI Tool |--->| MCP Server |--->| Memory | |
101
- | | (Claude etc) | | (stdio) | | Engine | |
138
+ | | Claude/Open | | (stdio) | | Engine | |
102
139
  | +--------------+ +--------------+ +--------------+ |
103
140
  | | |
104
141
  | +--------------------+--+----+ |
@@ -119,187 +156,129 @@ memorylayer --project /path/to/your/project
119
156
 
120
157
  ---
121
158
 
122
- ## MCP Tools
123
-
124
- MemoryLayer exposes 25+ MCP tools:
125
-
126
- ### Query & Search
127
- - `memory_query` - Semantic search across codebase
128
- - `memory_status` - Project overview and health
129
-
130
- ### Recording
131
- - `memory_record` - Save decisions, patterns, feedback
132
- - `memory_review` - Pre-flight check before code changes
133
- - `memory_verify` - Validate AI-generated code
134
-
135
- ### Ghost Mode (AI-Proactive)
136
- - `memory_ghost` - Conflicts, deja vu, session resurrection
159
+ ## CLI Commands
137
160
 
138
- ### Living Documentation
139
- - `get_architecture` - Project structure overview
140
- - `get_changelog` - Recent changes with context
141
- - `what_happened` - "What did we do yesterday?"
142
-
143
- ### Architecture Enforcement
144
- - `validate_pattern` - Check code against patterns
145
- - `suggest_existing` - Find reusable functions
146
- - `learn_pattern` - Teach new patterns
147
-
148
- ### Test Awareness
149
- - `get_related_tests` - Tests for a file/function
150
- - `check_tests` - Predict test failures
151
- - `suggest_test_update` - Test update suggestions
152
-
153
- ---
161
+ ```bash
162
+ # Quick setup (auto-configures AI tools)
163
+ neuronlayer init
154
164
 
155
- ## Configuration
165
+ # Initialize specific project
166
+ neuronlayer init /path/to/project
156
167
 
157
- MemoryLayer stores data in:
158
- - **Windows**: `%APPDATA%\.memorylayer\<project-hash>\`
159
- - **macOS/Linux**: `~/.memorylayer/<project-hash>/`
168
+ # List all registered projects
169
+ neuronlayer projects list
160
170
 
161
- ### CLI Commands
171
+ # Add a new project
172
+ neuronlayer projects add /path/to/my-project
162
173
 
163
- ```bash
164
- # List all indexed projects
165
- memorylayer projects
174
+ # Switch active project
175
+ neuronlayer projects switch <id>
166
176
 
167
- # Export decisions as ADRs
168
- memorylayer export --format adr --output ./docs/decisions
177
+ # Export decisions to ADR files
178
+ neuronlayer export --format madr
169
179
 
170
180
  # Show help
171
- memorylayer help
181
+ neuronlayer help
172
182
  ```
173
183
 
174
184
  ---
175
185
 
176
- ## Architecture
186
+ ## Manual Configuration
177
187
 
178
- ```
179
- src/
180
- ├── core/ # Business logic
181
- │ ├── engine.ts # Main orchestrator
182
- │ ├── living-docs/ # Auto-documentation
183
- │ ├── context-rot/ # Context health management
184
- │ ├── confidence/ # Trust scoring
185
- │ ├── change-intelligence/ # What changed & why
186
- │ ├── architecture/ # Pattern enforcement
187
- │ └── test-awareness/ # Test-respecting suggestions
188
- ├── server/
189
- │ ├── mcp.ts # MCP protocol handler
190
- │ ├── tools.ts # Tool definitions
191
- │ └── gateways/ # Unified tool APIs
192
- ├── storage/
193
- │ ├── tier1.ts # Hot cache
194
- │ ├── tier2.ts # SQLite storage
195
- │ └── tier3.ts # Vector embeddings
196
- ├── indexing/
197
- │ ├── indexer.ts # File indexing
198
- │ ├── ast.ts # AST parsing
199
- │ ├── embeddings.ts # Embedding generation
200
- │ └── watcher.ts # File watching
201
- └── types/ # TypeScript definitions
202
- ```
188
+ ### Claude Desktop
203
189
 
204
- ---
190
+ Add to `claude_desktop_config.json`:
205
191
 
206
- ## Development
192
+ ```json
193
+ {
194
+ "mcpServers": {
195
+ "neuronlayer": {
196
+ "command": "npx",
197
+ "args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
198
+ }
199
+ }
200
+ }
201
+ ```
207
202
 
208
- ### Prerequisites
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`
209
207
 
210
- - Node.js 18+
211
- - npm or yarn
208
+ ### OpenCode
212
209
 
213
- ### Setup
210
+ Add to `~/.opencode/config.json`:
214
211
 
215
- ```bash
216
- # Clone the repository
217
- git clone https://github.com/anthropics/memorylayer.git
218
- cd memorylayer
212
+ ```json
213
+ {
214
+ "mcpServers": {
215
+ "neuronlayer": {
216
+ "command": "npx",
217
+ "args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
218
+ }
219
+ }
220
+ }
221
+ ```
219
222
 
220
- # Install dependencies
221
- npm install
223
+ ---
222
224
 
223
- # Build
224
- npm run build
225
+ ## Data Storage
225
226
 
226
- # Run tests
227
- npm test
227
+ Each project has isolated data:
228
228
 
229
- # Type check
230
- npm run typecheck
231
229
  ```
232
-
233
- ### Scripts
234
-
235
- | Script | Description |
236
- |--------|-------------|
237
- | `npm run build` | Build the project |
238
- | `npm run dev` | Development mode with watch |
239
- | `npm run test` | Run tests |
240
- | `npm run typecheck` | Type check without building |
241
- | `npm run benchmark` | Run performance benchmarks |
230
+ ~/.memorylayer/
231
+ ├── projects/
232
+ │ ├── project-a-abc123/
233
+ │ │ ├── memorylayer.db # SQLite database
234
+ │ │ └── embeddings/ # Vector index
235
+ │ └── project-b-def456/
236
+ │ └── ...
237
+ └── registry.json # Project registry
238
+ ```
242
239
 
243
240
  ---
244
241
 
245
242
  ## Privacy
246
243
 
247
- MemoryLayer is **100% local by default**:
244
+ NeuronLayer is **100% local**:
248
245
 
249
246
  - All data stored on your machine
250
- - No cloud services required
251
- - No telemetry or tracking
247
+ - No cloud services
248
+ - No telemetry
252
249
  - Works offline
253
250
 
254
- Optional cloud features (coming soon) will use your own infrastructure.
255
-
256
251
  ---
257
252
 
258
- ## Contributing
259
-
260
- We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
261
-
262
- ### Areas We Need Help
253
+ ## Development
263
254
 
264
- - Additional language support (Python, Go, Rust AST)
265
- - IDE extensions (VS Code, JetBrains)
266
- - Documentation improvements
267
- - Performance optimizations
268
- - Bug fixes and test coverage
255
+ ```bash
256
+ # Clone
257
+ git clone https://github.com/abhisavakar/neuronlayer.git
258
+ cd neuronlayer
269
259
 
270
- ---
260
+ # Install
261
+ npm install
271
262
 
272
- ## Roadmap
263
+ # Build
264
+ npm run build
273
265
 
274
- - [x] Core MCP server
275
- - [x] Living Documentation
276
- - [x] Context Rot Prevention
277
- - [x] Confidence Scoring
278
- - [x] Change Intelligence
279
- - [x] Architecture Enforcement
280
- - [x] Test-Aware Suggestions
281
- - [ ] VS Code extension
282
- - [ ] Team features (shared memory)
283
- - [ ] Enterprise deployment (AWS Bedrock)
266
+ # Test
267
+ npm test
268
+ ```
284
269
 
285
270
  ---
286
271
 
287
272
  ## License
288
273
 
289
- MIT License - see [LICENSE](LICENSE) for details.
274
+ MIT License - see [LICENSE](LICENSE)
290
275
 
291
276
  ---
292
277
 
293
- ## Acknowledgments
278
+ ## Author
294
279
 
295
- Built with:
296
- - [Model Context Protocol](https://modelcontextprotocol.io/) by Anthropic
297
- - [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
298
- - [tree-sitter](https://tree-sitter.github.io/tree-sitter/) for AST parsing
299
- - [Xenova/transformers](https://github.com/xenova/transformers.js) for embeddings
280
+ **Abhishek Arun Savakar** - [savakar.com](https://savakar.com)
300
281
 
301
282
  ---
302
283
 
303
- **Made with determination over a weekend.**
304
-
305
- *Your codebase documents itself. AI that never forgets.*
284
+ Built with [Model Context Protocol](https://modelcontextprotocol.io/) by Anthropic.