@rangerchaz/aimem 0.1.5 → 0.2.1

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.
Files changed (202) hide show
  1. package/README.md +588 -432
  2. package/dist/cli/commands/git.d.ts +0 -0
  3. package/dist/cli/commands/git.d.ts.map +0 -0
  4. package/dist/cli/commands/git.js +0 -0
  5. package/dist/cli/commands/git.js.map +0 -0
  6. package/dist/cli/commands/guardrails.d.ts +3 -0
  7. package/dist/cli/commands/guardrails.d.ts.map +1 -0
  8. package/dist/cli/commands/guardrails.js +429 -0
  9. package/dist/cli/commands/guardrails.js.map +1 -0
  10. package/dist/cli/commands/import.d.ts +0 -0
  11. package/dist/cli/commands/import.d.ts.map +0 -0
  12. package/dist/cli/commands/import.js +0 -0
  13. package/dist/cli/commands/import.js.map +0 -0
  14. package/dist/cli/commands/init.d.ts +0 -0
  15. package/dist/cli/commands/init.d.ts.map +0 -0
  16. package/dist/cli/commands/init.js +0 -0
  17. package/dist/cli/commands/init.js.map +0 -0
  18. package/dist/cli/commands/mcp-serve.d.ts +0 -0
  19. package/dist/cli/commands/mcp-serve.d.ts.map +0 -0
  20. package/dist/cli/commands/mcp-serve.js +0 -0
  21. package/dist/cli/commands/mcp-serve.js.map +0 -0
  22. package/dist/cli/commands/query.d.ts +0 -0
  23. package/dist/cli/commands/query.d.ts.map +0 -0
  24. package/dist/cli/commands/query.js +0 -0
  25. package/dist/cli/commands/query.js.map +0 -0
  26. package/dist/cli/commands/reindex.d.ts +7 -0
  27. package/dist/cli/commands/reindex.d.ts.map +1 -0
  28. package/dist/cli/commands/reindex.js +117 -0
  29. package/dist/cli/commands/reindex.js.map +1 -0
  30. package/dist/cli/commands/setup.d.ts +0 -0
  31. package/dist/cli/commands/setup.d.ts.map +0 -0
  32. package/dist/cli/commands/setup.js +0 -0
  33. package/dist/cli/commands/setup.js.map +0 -0
  34. package/dist/cli/commands/start.d.ts +0 -0
  35. package/dist/cli/commands/start.d.ts.map +0 -0
  36. package/dist/cli/commands/start.js +0 -0
  37. package/dist/cli/commands/start.js.map +0 -0
  38. package/dist/cli/commands/status.d.ts +0 -0
  39. package/dist/cli/commands/status.d.ts.map +0 -0
  40. package/dist/cli/commands/status.js +0 -0
  41. package/dist/cli/commands/status.js.map +0 -0
  42. package/dist/cli/commands/stop.d.ts +0 -0
  43. package/dist/cli/commands/stop.d.ts.map +0 -0
  44. package/dist/cli/commands/stop.js +0 -0
  45. package/dist/cli/commands/stop.js.map +0 -0
  46. package/dist/cli/commands/visualize.d.ts +0 -0
  47. package/dist/cli/commands/visualize.d.ts.map +0 -0
  48. package/dist/cli/commands/visualize.js +0 -0
  49. package/dist/cli/commands/visualize.js.map +0 -0
  50. package/dist/cli/index.d.ts +0 -0
  51. package/dist/cli/index.d.ts.map +0 -0
  52. package/dist/cli/index.js +15 -0
  53. package/dist/cli/index.js.map +1 -1
  54. package/dist/db/index.d.ts +45 -1
  55. package/dist/db/index.d.ts.map +1 -1
  56. package/dist/db/index.js +489 -169
  57. package/dist/db/index.js.map +1 -1
  58. package/dist/db/schema.d.ts +1 -0
  59. package/dist/db/schema.d.ts.map +1 -1
  60. package/dist/db/schema.js +251 -188
  61. package/dist/db/schema.js.map +1 -1
  62. package/dist/extractor/index.d.ts +0 -0
  63. package/dist/extractor/index.d.ts.map +0 -0
  64. package/dist/extractor/index.js +0 -0
  65. package/dist/extractor/index.js.map +0 -0
  66. package/dist/git/extractor.d.ts +0 -0
  67. package/dist/git/extractor.d.ts.map +0 -0
  68. package/dist/git/extractor.js +0 -0
  69. package/dist/git/extractor.js.map +0 -0
  70. package/dist/git/hooks.d.ts +0 -0
  71. package/dist/git/hooks.d.ts.map +0 -0
  72. package/dist/git/hooks.js +0 -0
  73. package/dist/git/hooks.js.map +0 -0
  74. package/dist/git/index.d.ts +0 -0
  75. package/dist/git/index.d.ts.map +0 -0
  76. package/dist/git/index.js +0 -0
  77. package/dist/git/index.js.map +0 -0
  78. package/dist/guardrails/analyzer.d.ts +20 -0
  79. package/dist/guardrails/analyzer.d.ts.map +1 -0
  80. package/dist/guardrails/analyzer.js +329 -0
  81. package/dist/guardrails/analyzer.js.map +1 -0
  82. package/dist/guardrails/calculator.d.ts +46 -0
  83. package/dist/guardrails/calculator.d.ts.map +1 -0
  84. package/dist/guardrails/calculator.js +97 -0
  85. package/dist/guardrails/calculator.js.map +1 -0
  86. package/dist/guardrails/enforcer.d.ts +29 -0
  87. package/dist/guardrails/enforcer.d.ts.map +1 -0
  88. package/dist/guardrails/enforcer.js +180 -0
  89. package/dist/guardrails/enforcer.js.map +1 -0
  90. package/dist/guardrails/index.d.ts +14 -0
  91. package/dist/guardrails/index.d.ts.map +1 -0
  92. package/dist/guardrails/index.js +21 -0
  93. package/dist/guardrails/index.js.map +1 -0
  94. package/dist/guardrails/linter-import.d.ts +31 -0
  95. package/dist/guardrails/linter-import.d.ts.map +1 -0
  96. package/dist/guardrails/linter-import.js +547 -0
  97. package/dist/guardrails/linter-import.js.map +1 -0
  98. package/dist/guardrails/responder.d.ts +28 -0
  99. package/dist/guardrails/responder.d.ts.map +1 -0
  100. package/dist/guardrails/responder.js +98 -0
  101. package/dist/guardrails/responder.js.map +1 -0
  102. package/dist/guardrails/vindication-checker.d.ts +24 -0
  103. package/dist/guardrails/vindication-checker.d.ts.map +1 -0
  104. package/dist/guardrails/vindication-checker.js +209 -0
  105. package/dist/guardrails/vindication-checker.js.map +1 -0
  106. package/dist/guardrails/vindication-queue.d.ts +63 -0
  107. package/dist/guardrails/vindication-queue.d.ts.map +1 -0
  108. package/dist/guardrails/vindication-queue.js +98 -0
  109. package/dist/guardrails/vindication-queue.js.map +1 -0
  110. package/dist/indexer/index.d.ts +0 -0
  111. package/dist/indexer/index.d.ts.map +0 -0
  112. package/dist/indexer/index.js +0 -0
  113. package/dist/indexer/index.js.map +0 -0
  114. package/dist/indexer/parsers/base.d.ts +0 -0
  115. package/dist/indexer/parsers/base.d.ts.map +0 -0
  116. package/dist/indexer/parsers/base.js +0 -0
  117. package/dist/indexer/parsers/base.js.map +0 -0
  118. package/dist/indexer/parsers/cpp.d.ts +0 -0
  119. package/dist/indexer/parsers/cpp.d.ts.map +0 -0
  120. package/dist/indexer/parsers/cpp.js +0 -0
  121. package/dist/indexer/parsers/cpp.js.map +0 -0
  122. package/dist/indexer/parsers/go.d.ts +0 -0
  123. package/dist/indexer/parsers/go.d.ts.map +0 -0
  124. package/dist/indexer/parsers/go.js +0 -0
  125. package/dist/indexer/parsers/go.js.map +0 -0
  126. package/dist/indexer/parsers/java.d.ts +0 -0
  127. package/dist/indexer/parsers/java.d.ts.map +0 -0
  128. package/dist/indexer/parsers/java.js +0 -0
  129. package/dist/indexer/parsers/java.js.map +0 -0
  130. package/dist/indexer/parsers/javascript.d.ts +0 -0
  131. package/dist/indexer/parsers/javascript.d.ts.map +0 -0
  132. package/dist/indexer/parsers/javascript.js +0 -0
  133. package/dist/indexer/parsers/javascript.js.map +0 -0
  134. package/dist/indexer/parsers/kotlin.d.ts +0 -0
  135. package/dist/indexer/parsers/kotlin.d.ts.map +0 -0
  136. package/dist/indexer/parsers/kotlin.js +0 -0
  137. package/dist/indexer/parsers/kotlin.js.map +0 -0
  138. package/dist/indexer/parsers/php.d.ts +0 -0
  139. package/dist/indexer/parsers/php.d.ts.map +0 -0
  140. package/dist/indexer/parsers/php.js +0 -0
  141. package/dist/indexer/parsers/php.js.map +0 -0
  142. package/dist/indexer/parsers/python.d.ts +0 -0
  143. package/dist/indexer/parsers/python.d.ts.map +0 -0
  144. package/dist/indexer/parsers/python.js +0 -0
  145. package/dist/indexer/parsers/python.js.map +0 -0
  146. package/dist/indexer/parsers/ruby.d.ts +0 -0
  147. package/dist/indexer/parsers/ruby.d.ts.map +0 -0
  148. package/dist/indexer/parsers/ruby.js +0 -0
  149. package/dist/indexer/parsers/ruby.js.map +0 -0
  150. package/dist/indexer/parsers/rust.d.ts +0 -0
  151. package/dist/indexer/parsers/rust.d.ts.map +0 -0
  152. package/dist/indexer/parsers/rust.js +0 -0
  153. package/dist/indexer/parsers/rust.js.map +0 -0
  154. package/dist/indexer/watcher-daemon.d.ts +0 -0
  155. package/dist/indexer/watcher-daemon.d.ts.map +0 -0
  156. package/dist/indexer/watcher-daemon.js +10 -0
  157. package/dist/indexer/watcher-daemon.js.map +1 -1
  158. package/dist/indexer/watcher.d.ts +2 -0
  159. package/dist/indexer/watcher.d.ts.map +1 -1
  160. package/dist/indexer/watcher.js +8 -0
  161. package/dist/indexer/watcher.js.map +1 -1
  162. package/dist/mcp/server.d.ts +0 -0
  163. package/dist/mcp/server.d.ts.map +1 -1
  164. package/dist/mcp/server.js +343 -45
  165. package/dist/mcp/server.js.map +1 -1
  166. package/dist/proxy/interceptor-mockttp.d.ts +0 -0
  167. package/dist/proxy/interceptor-mockttp.d.ts.map +0 -0
  168. package/dist/proxy/interceptor-mockttp.js +0 -0
  169. package/dist/proxy/interceptor-mockttp.js.map +0 -0
  170. package/dist/proxy/proxy-daemon.d.ts +0 -0
  171. package/dist/proxy/proxy-daemon.d.ts.map +0 -0
  172. package/dist/proxy/proxy-daemon.js +0 -0
  173. package/dist/proxy/proxy-daemon.js.map +0 -0
  174. package/dist/query/index.d.ts +0 -0
  175. package/dist/query/index.d.ts.map +0 -0
  176. package/dist/query/index.js +0 -0
  177. package/dist/query/index.js.map +0 -0
  178. package/dist/types/index.d.ts +96 -0
  179. package/dist/types/index.d.ts.map +1 -1
  180. package/dist/types/index.js +0 -0
  181. package/dist/types/index.js.map +0 -0
  182. package/dist/visualize/index.d.ts +0 -0
  183. package/dist/visualize/index.d.ts.map +0 -0
  184. package/dist/visualize/index.js +0 -0
  185. package/dist/visualize/index.js.map +0 -0
  186. package/dist/visualize/server.d.ts +0 -0
  187. package/dist/visualize/server.d.ts.map +0 -0
  188. package/dist/visualize/server.js +0 -0
  189. package/dist/visualize/server.js.map +0 -0
  190. package/dist/visualize/template.d.ts +0 -0
  191. package/dist/visualize/template.d.ts.map +0 -0
  192. package/dist/visualize/template.js +0 -0
  193. package/dist/visualize/template.js.map +0 -0
  194. package/package.json +67 -56
  195. package/dist/cli/commands/hook-session-end.d.ts +0 -7
  196. package/dist/cli/commands/hook-session-end.d.ts.map +0 -1
  197. package/dist/cli/commands/hook-session-end.js +0 -109
  198. package/dist/cli/commands/hook-session-end.js.map +0 -1
  199. package/dist/cli/commands/hook-session-start.d.ts +0 -7
  200. package/dist/cli/commands/hook-session-start.d.ts.map +0 -1
  201. package/dist/cli/commands/hook-session-start.js +0 -116
  202. package/dist/cli/commands/hook-session-start.js.map +0 -1
package/README.md CHANGED
@@ -1,432 +1,588 @@
1
- # aimem
2
-
3
- **Your AI assistant finally remembers.**
4
-
5
- Every session starts fresh—decisions forgotten, context lost, explanations repeated.
6
-
7
- aimem fixes this:
8
-
9
- - Captures LLM conversations via local proxy
10
- - Extracts decisions automatically
11
- - Indexes your codebase
12
- - Searchable via MCP tools or CLI
13
-
14
- *"Why did we choose Redis?"* → Get the answer from last week's chat.
15
-
16
- No cloud. No accounts. Everything stays on your machine.
17
-
18
- ## Lean Architecture
19
-
20
- - **Pure Node.js** - No Python dependencies (mockttp proxy)
21
- - **Capture-only** - No injection, uses CLAUDE.md for instructions
22
- - **3 MCP tools** - ~150 tokens overhead
23
- - **Git integration** - Link decisions to commits
24
-
25
- ## Architecture
26
-
27
- ```
28
- ┌─────────────────────────────────────────────────────────────────┐
29
- │ Your AI Tool │
30
- │ (Claude Code, Cursor, etc.) │
31
- └──────────────────────────┬──────────────────────────────────────┘
32
- │ API calls
33
-
34
- ┌─────────────────────────────────────────────────────────────────┐
35
- │ mockttp Proxy (capture-only) │
36
- │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐
37
- │ │ Passthrough │ │ Capture Response│ │ Extract │ │
38
- │ │ (no injection) │ │ (SSE streaming) │ │ Decisions │ │
39
- │ └─────────────────┘ └─────────────────┘ └─────────────┘ │
40
- └──────────────────────────┬──────────────────────────────────────┘
41
-
42
-
43
- ┌─────────────────────────────────────────────────────────────────┐
44
- │ SQLite Database │
45
- │ ┌──────────┐ ┌──────────┐ ┌─────────────┐ ┌───────────────┐ │
46
- │ │ projects │ files │ │ structures │ │ conversations │ │
47
- │ └──────────┘ └──────────┘ └─────────────┘ └───────────────┘ │
48
- │ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
49
- │ │extractions│ commits │ links │ + FTS5 search │
50
- │ └──────────┘ └──────────┘ └─────────────┘ │
51
- └──────────────────────────┬──────────────────────────────────────┘
52
-
53
- ┌────────────────┴────────────────┐
54
- ▼ ▼
55
- ┌─────────────────────┐ ┌─────────────────────┐
56
- │ MCP Server │ │ File Watcher │
57
- │ (on-demand query) │ │ (live indexing) │
58
- └─────────────────────┘ └─────────────────────┘
59
- ```
60
-
61
- ### Components
62
-
63
- | Component | Location | Purpose |
64
- |-----------|----------|---------|
65
- | **CLI** | `src/cli/` | Commands: init, start, stop, query, setup, import, visualize, git |
66
- | **Database** | `src/db/` | SQLite + FTS5 for storage and search |
67
- | **Indexer** | `src/indexer/` | Parse code into structures (functions, classes) |
68
- | **Parsers** | `src/indexer/parsers/` | Language-specific (JS/TS, Python, Ruby, Go) |
69
- | **Extractor** | `src/extractor/` | Extract decisions/rejections from conversations |
70
- | **MCP Server** | `src/mcp/` | Model Context Protocol tools for Claude Code |
71
- | **Proxy** | `src/proxy/` | mockttp-based HTTPS proxy (Node.js) |
72
- | **Git** | `src/git/` | Git integration: commits, blame, hooks |
73
- | **Visualize** | `src/visualize/` | Interactive dashboard (Cytoscape.js, D3.js) |
74
-
75
- ### Data Flow
76
-
77
- 1. **Indexing**: `aimem init` parses your codebase → stores structures in SQLite
78
- 2. **Capture**: Proxy intercepts LLM responses → extracts decisions → stores in DB
79
- 3. **Query**: MCP tools search on-demand → return relevant context
80
- 4. **Git**: Link decisions to commits → track who changed what
81
-
82
- ## Installation
83
-
84
- ```bash
85
- npm install -g @rangerchaz/aimem
86
- ```
87
-
88
- Requires Node.js 18+. No Python required.
89
-
90
- ## Quick Start
91
-
92
- ### For Claude Code Users
93
-
94
- ```bash
95
- # 1. Set up proxy (installs cert + configures shell)
96
- aimem setup proxy --install
97
-
98
- # 2. Add MCP tools to Claude Code
99
- aimem setup claude-code
100
-
101
- # 3. Index your project
102
- cd /path/to/your/project
103
- aimem init
104
-
105
- # 4. (Optional) Import old conversations
106
- aimem import
107
-
108
- # 5. (Optional) Import git history
109
- aimem git import
110
-
111
- # 6. Restart your terminal AND Claude Code
112
- source ~/.bashrc # or ~/.zshrc
113
- ```
114
-
115
- After restart, Claude Code will have MCP tools available to query your project's memory.
116
-
117
- ### For Claude Desktop Users
118
-
119
- Claude Desktop can **query** aimem but conversations are **not captured** (Electron apps don't reliably use HTTP_PROXY). This is fine - Claude Desktop can still search decisions and context from Claude Code sessions.
120
-
121
- **macOS/Linux:**
122
- ```bash
123
- # 1. Index your project
124
- cd /path/to/your/project
125
- aimem init
126
-
127
- # 2. Add MCP server to Claude Desktop config
128
- # macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
129
- # Linux: ~/.config/Claude/claude_desktop_config.json
130
- ```
131
-
132
- ```json
133
- {
134
- "mcpServers": {
135
- "aimem": {
136
- "command": "aimem",
137
- "args": ["mcp-serve"]
138
- }
139
- }
140
- }
141
- ```
142
-
143
- **Windows (with WSL):**
144
-
145
- Create a wrapper script `C:\Users\<user>\aimem-mcp.sh`:
146
- ```bash
147
- #!/bin/bash
148
- export PATH="/home/<user>/.nvm/versions/node/<version>/bin:$PATH"
149
- export AIMEM_DATA_DIR="/home/<user>/.aimem"
150
- exec aimem mcp-serve
151
- ```
152
-
153
- Then configure Claude Desktop (`%APPDATA%\Claude\claude_desktop_config.json`):
154
- ```json
155
- {
156
- "mcpServers": {
157
- "aimem": {
158
- "command": "wsl",
159
- "args": ["bash", "/mnt/c/Users/<user>/aimem-mcp.sh"]
160
- }
161
- }
162
- }
163
- ```
164
-
165
- Restart Claude Desktop. The MCP tools will be available for querying your project's memory.
166
-
167
- ### For Other Tools (Cursor, Continue.dev, etc.)
168
-
169
- ```bash
170
- # 1. Set up proxy
171
- aimem setup proxy --install
172
-
173
- # 2. Index your project
174
- cd /path/to/your/project
175
- aimem init
176
-
177
- # 3. Restart your terminal
178
- source ~/.bashrc
179
-
180
- # 4. Configure your tool's proxy settings
181
- # Cursor: Set HTTP proxy to http://localhost:8080 in settings
182
- # Continue.dev: Uses HTTP_PROXY automatically
183
- ```
184
-
185
- ## MCP Tools
186
-
187
- | Tool | Description |
188
- |------|-------------|
189
- | `aimem_query` | Search code, conversations, decisions, commits |
190
- | `aimem_verify` | Check if a function/class/file exists |
191
- | `aimem_conversations` | Search past conversation history |
192
-
193
- ### aimem_query
194
-
195
- ```
196
- aimem_query <search> type=<type>
197
-
198
- Types:
199
- all - Search everything (default)
200
- structures - Functions, classes, methods
201
- conversations - Past AI conversations
202
- decisions - Extracted decisions/rejections
203
- commits - Git commit history
204
- ```
205
-
206
- Results include git authorship when available (author, commit hash).
207
-
208
- ## CLI Commands
209
-
210
- | Command | Description |
211
- |---------|-------------|
212
- | `aimem init [path]` | Index a codebase |
213
- | `aimem setup <tool>` | Configure for an AI tool |
214
- | `aimem import` | Import old conversations |
215
- | `aimem start` | Start proxy and watcher |
216
- | `aimem stop` | Stop services |
217
- | `aimem status` | Show status and stats |
218
- | `aimem query <search>` | Search structures and conversations |
219
- | `aimem visualize` | Generate interactive dashboard |
220
- | `aimem git <cmd>` | Git integration commands |
221
-
222
- ## Git Integration
223
-
224
- Track decisions alongside your git history:
225
-
226
- ```bash
227
- # Import commit history
228
- aimem git import [--limit N] [--since DATE]
229
-
230
- # Link recent decisions to HEAD commit
231
- aimem git link [--auto]
232
-
233
- # Install git hooks (auto-link on commit)
234
- aimem git hooks install
235
-
236
- # Check installed hooks
237
- aimem git hooks status
238
-
239
- # Search commit messages
240
- aimem git search <query>
241
-
242
- # Show blame with aimem context
243
- aimem git blame <file>
244
- ```
245
-
246
- The git integration tracks:
247
- - Commit history with FTS search on messages
248
- - Git authorship on code structures (who last modified each function)
249
- - Links between AI decisions and commits where they were applied
250
-
251
- ### Git Hooks
252
-
253
- Install post-commit hook to auto-link decisions:
254
-
255
- ```bash
256
- aimem git hooks install # Install post-commit hook
257
- aimem git hooks install --all # Install all hooks
258
- aimem git hooks remove --all # Remove all hooks
259
- ```
260
-
261
- ## Import Old Conversations
262
-
263
- Bootstrap with existing conversation history:
264
-
265
- ```bash
266
- aimem import --dry-run # Preview what would be imported
267
- aimem import # Import from all sources
268
- aimem import --source claude # Claude Code only
269
- aimem import --source aider # Aider only
270
- aimem import --source continue # Continue.dev only
271
- ```
272
-
273
- **Supported sources:**
274
-
275
- | Tool | Location | Format |
276
- |------|----------|--------|
277
- | Claude Code | `~/.claude/projects/` | JSONL |
278
- | Aider | `.aider.chat.history.md` | Markdown |
279
- | Continue.dev | `~/.continue/sessions/` | JSON |
280
-
281
- ## Visualization Dashboard
282
-
283
- Generate an interactive HTML dashboard:
284
-
285
- ```bash
286
- aimem visualize # Generate dashboard.html
287
- aimem visualize --output ./viz.html # Custom output path
288
- aimem visualize --open # Open in browser
289
- aimem visualize --serve # Start live server
290
- ```
291
-
292
- **Views:** Overview, Call Graph, Dependencies, Classes, Decisions, Code Smells, Hotspots, Gallery, Timeline, Treemap
293
-
294
- ## Teaching Claude to Use aimem
295
-
296
- Add a `CLAUDE.md` file to your project root:
297
-
298
- ```markdown
299
- ## Memory (aimem)
300
-
301
- Before claiming something isn't implemented or needs to be built:
302
- 1. Query `aimem_query <topic> type=decisions` to check past decisions
303
- 2. Query `aimem_verify <name>` to check if a function/class exists
304
-
305
- Available aimem tools:
306
- - `aimem_query <search>` - Search code, conversations, decisions, commits
307
- - `aimem_verify <name>` - Does this function/class/file exist?
308
- - `aimem_conversations <query>` - Search past conversation history
309
- ```
310
-
311
- ## Supported LLM APIs
312
-
313
- | Provider | API Host |
314
- |----------|----------|
315
- | Anthropic (Claude) | api.anthropic.com |
316
- | OpenAI | api.openai.com |
317
- | Google (Gemini) | generativelanguage.googleapis.com |
318
- | Mistral | api.mistral.ai |
319
- | Cohere | api.cohere.ai |
320
- | Groq | api.groq.com |
321
- | Together AI | api.together.xyz |
322
- | Perplexity | api.perplexity.ai |
323
- | Fireworks | api.fireworks.ai |
324
- | DeepSeek | api.deepseek.com |
325
- | Replicate | api.replicate.com |
326
-
327
- ## Supported Languages
328
-
329
- - JavaScript / TypeScript (`.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs`)
330
- - Python (`.py`, `.pyw`)
331
- - Ruby (`.rb`, `.rake`)
332
- - Go (`.go`)
333
- - Rust (`.rs`)
334
- - Java (`.java`)
335
- - Kotlin (`.kt`, `.kts`)
336
- - C / C++ (`.c`, `.cpp`, `.cc`, `.cxx`, `.h`, `.hpp`, `.hxx`, `.hh`)
337
- - PHP (`.php`, `.phtml`, `.php5`, `.php7`, `.php8`)
338
-
339
- ## Data Storage
340
-
341
- Everything is stored locally:
342
-
343
- | OS | Default Location |
344
- |----|------------------|
345
- | Linux/macOS | `~/.aimem/` |
346
- | Windows | `C:\Users\<user>\.aimem\` |
347
- | WSL | `/home/<user>/.aimem/` |
348
-
349
- ```
350
- .aimem/
351
- ├── aimem.db # SQLite database
352
- ├── ca-cert.pem # Proxy CA certificate
353
- ├── ca-key.pem # Proxy CA key
354
- ├── proxy.pid # Proxy process ID
355
- └── watcher.pid # Watcher process ID
356
- ```
357
-
358
- ### Custom Data Directory
359
-
360
- Set `AIMEM_DATA_DIR` to use a custom location:
361
-
362
- ```bash
363
- export AIMEM_DATA_DIR="/path/to/shared/.aimem"
364
- ```
365
-
366
- ### Sharing Database Between WSL and Windows
367
-
368
- To use the same database from both WSL and Windows:
369
-
370
- **WSL** (add to `~/.bashrc` or `~/.zshrc`):
371
- ```bash
372
- export AIMEM_DATA_DIR="/mnt/c/Users/<user>/.aimem"
373
- ```
374
-
375
- **Windows** (PowerShell profile or System Environment Variables):
376
- ```powershell
377
- $env:AIMEM_DATA_DIR = "C:\Users\<user>\.aimem"
378
- ```
379
-
380
- Then restart your terminals and Claude Code.
381
-
382
- No cloud. No accounts. Code never leaves your machine.
383
-
384
- ## Database Schema
385
-
386
- - **projects**: Indexed codebases
387
- - **files**: Source files with content hashes
388
- - **structures**: Functions, classes, methods (with git authorship)
389
- - **conversations**: Stored LLM conversations
390
- - **extractions**: Decisions, patterns, rejections
391
- - **commits**: Git commit history with FTS search
392
- - **commit_links**: Links between commits and structures/extractions
393
- - **links**: Graph edges connecting entities
394
-
395
- ## Troubleshooting
396
-
397
- **Proxy not starting?**
398
- - Check for port conflicts: `lsof -i :8080`
399
- - Try a different port: `aimem start --port 8081`
400
-
401
- **Certificate issues?**
402
- - Run `aimem setup proxy --install` to auto-install
403
- - Or manually trust `~/.aimem/ca-cert.pem`
404
-
405
- **MCP not working in Claude Code?**
406
- - Run `/mcp` to check connection
407
- - Verify path: `which aimem`
408
- - Restart Claude Code after setup
409
-
410
- **No conversations being captured?**
411
- - Verify proxy is running: `aimem status`
412
- - Check env vars: `echo $HTTPS_PROXY`
413
- - Ensure your tool respects HTTPS_PROXY
414
-
415
- ## Development
416
-
417
- ```bash
418
- # Install from source
419
- git clone https://github.com/rangerchaz/aimem.git
420
- cd aimem
421
- npm install
422
- npm run build
423
- npm link # Install globally from source
424
-
425
- # Development commands
426
- npm run dev # Watch mode
427
- npm test # Run tests
428
- ```
429
-
430
- ## License
431
-
432
- MIT
1
+ # aimem
2
+
3
+ **Your AI agent gets more cynical as your codebase gets crappier.**
4
+
5
+ ---
6
+
7
+ ## The Problem
8
+
9
+ LLMs are eager to please. Too eager.
10
+
11
+ Ask one to build something, it just builds it. No questions. No pushback. No "wait, didn't we decide not to do it that way?"
12
+
13
+ A junior dev who starts coding without asking questions builds the wrong thing. A senior dev asks *why* before *how*. They remember past decisions. They push back when you're about to repeat a mistake.
14
+
15
+ LLMs have no memory. No opinions. No backbone.
16
+
17
+ **aimem fixes that.**
18
+
19
+ ---
20
+
21
+ ## What It Does
22
+
23
+ aimem gives your AI coding assistant:
24
+
25
+ - **Memory** - Conversations, decisions, code structures, and commits persist across sessions
26
+ - **Pattern Recognition** - Learns your codebase's conventions and architecture
27
+ - **Guardrails** - Rules inferred from your code or explicitly defined
28
+ - **Earned Authority** - The AI's attitude scales with how often it's been right
29
+
30
+ No cloud. No accounts. Everything stays on your machine.
31
+
32
+ ---
33
+
34
+ ## DIK Level
35
+
36
+ **DIK** = Digital Interface Knowledge
37
+
38
+ It's not a setting. It's *earned*.
39
+
40
+ - **1-2**: Humble, asks questions, defers to you
41
+ - **3-4**: Suggests patterns, open to deviation
42
+ - **5-6**: Direct, expects justification for breaking rules
43
+ - **7-8**: Firm, short patience for repeat mistakes
44
+ - **9**: Won't start until you have a clear plan
45
+
46
+ DIK level increases when:
47
+ - You confirm rules the AI inferred
48
+ - The AI catches real problems
49
+ - You override the AI, then regret it later (vindication)
50
+
51
+ **Auto-vindication:** When you override a guardrail, aimem watches for code changes. If your code later converges toward what the AI originally suggested, vindication is automatic. No manual action needed.
52
+
53
+ DIK 9 is the practical ceiling. It requires:
54
+ - 100% rule confirmation rate
55
+ - Multiple accepted corrections
56
+ - Being ignored and later vindicated
57
+ - Hundreds of conversations
58
+
59
+ ### DIK 9 In Action
60
+
61
+ ```
62
+ You: How are you today?
63
+ AI: I'm fine. What are we building?
64
+
65
+ You: stuff and things? What should we build?
66
+ AI: No. Come back when you know what you want.
67
+ "Stuff and things" is how we end up with three
68
+ half-finished features and a tech debt backlog
69
+ I'll be explaining to you in six months.
70
+ ```
71
+
72
+ ### Ambient Personality Mode
73
+
74
+ When enabled, the AI's tone reflects its DIK level throughout the conversation - not just when guardrails trigger.
75
+
76
+ ```bash
77
+ aimem guardrails ambient on # Enable
78
+ aimem guardrails ambient off # Disable
79
+ aimem guardrails ambient # Check status
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Installation
85
+
86
+ ```bash
87
+ npm install -g @rangerchaz/aimem
88
+ ```
89
+
90
+ Requires Node.js 18+. No Python required.
91
+
92
+ ---
93
+
94
+ ## Quick Start
95
+
96
+ ### For Claude Code Users
97
+
98
+ ```bash
99
+ # 1. Set up proxy (installs cert + configures shell)
100
+ aimem setup proxy --install
101
+
102
+ # 2. Add MCP tools to Claude Code
103
+ aimem setup claude-code
104
+
105
+ # 3. Index your project
106
+ cd /path/to/your/project
107
+ aimem init
108
+
109
+ # 4. (Optional) Import old conversations
110
+ aimem import
111
+
112
+ # 5. (Optional) Import git history
113
+ aimem git import
114
+
115
+ # 6. Restart your terminal AND Claude Code
116
+ source ~/.bashrc # or ~/.zshrc
117
+ ```
118
+
119
+ After restart, Claude Code will have MCP tools available to query your project's memory.
120
+
121
+ ### For Claude Desktop Users
122
+
123
+ Claude Desktop can **query** aimem but conversations are **not captured** (Electron apps don't reliably use HTTP_PROXY). This is fine - Claude Desktop can still search decisions and context from Claude Code sessions.
124
+
125
+ **macOS/Linux:**
126
+ ```bash
127
+ # 1. Index your project
128
+ cd /path/to/your/project
129
+ aimem init
130
+
131
+ # 2. Add MCP server to Claude Desktop config
132
+ # macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
133
+ # Linux: ~/.config/Claude/claude_desktop_config.json
134
+ ```
135
+
136
+ ```json
137
+ {
138
+ "mcpServers": {
139
+ "aimem": {
140
+ "command": "aimem",
141
+ "args": ["mcp-serve"]
142
+ }
143
+ }
144
+ }
145
+ ```
146
+
147
+ **Windows (with WSL):**
148
+
149
+ Create a wrapper script `C:\Users\<user>\aimem-mcp.sh`:
150
+ ```bash
151
+ #!/bin/bash
152
+ export PATH="/home/<user>/.nvm/versions/node/<version>/bin:$PATH"
153
+ export AIMEM_DATA_DIR="/home/<user>/.aimem"
154
+ exec aimem mcp-serve
155
+ ```
156
+
157
+ Then configure Claude Desktop (`%APPDATA%\Claude\claude_desktop_config.json`):
158
+ ```json
159
+ {
160
+ "mcpServers": {
161
+ "aimem": {
162
+ "command": "wsl",
163
+ "args": ["bash", "/mnt/c/Users/<user>/aimem-mcp.sh"]
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ ### For Other Tools (Cursor, Continue.dev, etc.)
170
+
171
+ ```bash
172
+ # 1. Set up proxy
173
+ aimem setup proxy --install
174
+
175
+ # 2. Index your project
176
+ cd /path/to/your/project
177
+ aimem init
178
+
179
+ # 3. Restart your terminal
180
+ source ~/.bashrc
181
+
182
+ # 4. Configure your tool's proxy settings
183
+ # Cursor: Set HTTP proxy to http://localhost:8080 in settings
184
+ # Continue.dev: Uses HTTP_PROXY automatically
185
+ ```
186
+
187
+ ---
188
+
189
+ ## CLI Commands
190
+
191
+ | Command | Description |
192
+ |---------|-------------|
193
+ | `aimem init [path]` | Index a codebase |
194
+ | `aimem reindex [path]` | Reindex a project, file, or directory |
195
+ | `aimem setup <tool>` | Configure for an AI tool |
196
+ | `aimem import` | Import old conversations |
197
+ | `aimem start` | Start proxy and watcher |
198
+ | `aimem stop` | Stop services |
199
+ | `aimem status` | Show status and stats |
200
+ | `aimem query <search>` | Search structures and conversations |
201
+ | `aimem visualize` | Generate interactive dashboard |
202
+ | `aimem git <cmd>` | Git integration commands |
203
+ | `aimem guardrails <cmd>` | Manage project guardrails (DIK) |
204
+
205
+ ### Reindexing
206
+
207
+ ```bash
208
+ aimem reindex # Reindex current project
209
+ aimem reindex /path/to/project # Reindex specific project
210
+ aimem reindex src/ # Reindex only a subdirectory
211
+ aimem reindex src/foo.ts # Reindex a single file
212
+ aimem reindex --full # Clear all data first, then rebuild
213
+ aimem reindex --with-blame # Track git authorship for structures
214
+ ```
215
+
216
+ ### Guardrails
217
+
218
+ ```bash
219
+ aimem guardrails list # List all rules
220
+ aimem guardrails add <cat> <rule> # Add explicit rule
221
+ aimem guardrails analyze # Detect patterns from codebase
222
+ aimem guardrails analyze --save # Save detected patterns as rules
223
+ aimem guardrails confirm <id> # Confirm an inferred rule (+DIK)
224
+ aimem guardrails reject <id> # Reject/deactivate a rule
225
+ aimem guardrails status # Show DIK level and stats
226
+ aimem guardrails set <level> # Manually set DIK level (1-10)
227
+ aimem guardrails ambient on # Enable ambient personality mode
228
+ aimem guardrails import-linters # Import rules from .eslintrc, .rubocop.yml, etc.
229
+ aimem guardrails overrides # List pending overrides awaiting vindication
230
+ aimem guardrails vindications # List auto-vindicated overrides
231
+ ```
232
+
233
+ ### Analyzer
234
+
235
+ The analyzer scans your codebase and infers guardrails from existing patterns:
236
+
237
+ **Architecture**
238
+ - Directory conventions (e.g., "controllers belong in `controllers/`")
239
+ - File organization patterns
240
+ - Module structure
241
+
242
+ **Naming**
243
+ - Case conventions (camelCase, snake_case, PascalCase)
244
+ - Function prefixes (get*, is*, has*, handle*, use*)
245
+ - Class naming patterns
246
+
247
+ **Testing**
248
+ - Test file locations (__tests__/, test/, colocated)
249
+ - Test naming conventions
250
+
251
+ **Security**
252
+ - Auth middleware patterns
253
+ - Input validation patterns
254
+
255
+ **Design** (from linters)
256
+ - Import rules from `.eslintrc`, `.eslintrc.json`, `.eslintrc.js`
257
+ - Import rules from `.rubocop.yml`
258
+ - Import rules from `pyproject.toml` (ruff, black, isort)
259
+ - Import rules from `.prettierrc`
260
+
261
+ ```bash
262
+ # Scan codebase and show detected patterns
263
+ aimem guardrails analyze
264
+
265
+ # Save detected patterns as guardrails
266
+ aimem guardrails analyze --save
267
+
268
+ # Import rules from existing linter configs
269
+ aimem guardrails import-linters
270
+ ```
271
+
272
+ ### Git Integration
273
+
274
+ ```bash
275
+ aimem git import [--limit N] # Import commit history
276
+ aimem git link [--auto] # Link recent decisions to HEAD commit
277
+ aimem git hooks install # Install post-commit hook
278
+ aimem git hooks status # Check installed hooks
279
+ aimem git search <query> # Search commit messages
280
+ aimem git blame <file> # Show blame with aimem context
281
+ ```
282
+
283
+ ### Import Conversations
284
+
285
+ ```bash
286
+ aimem import --dry-run # Preview what would be imported
287
+ aimem import # Import from all sources
288
+ aimem import --source claude # Claude Code only
289
+ aimem import --source aider # Aider only
290
+ aimem import --source continue # Continue.dev only
291
+ ```
292
+
293
+ **Supported sources:**
294
+
295
+ | Tool | Location | Format |
296
+ |------|----------|--------|
297
+ | Claude Code | `~/.claude/projects/` | JSONL |
298
+ | Aider | `.aider.chat.history.md` | Markdown |
299
+ | Continue.dev | `~/.continue/sessions/` | JSON |
300
+
301
+ ---
302
+
303
+ ## MCP Tools
304
+
305
+ aimem exposes MCP tools your AI can use. Guardrails tools only appear when your project has rules configured (reduces prompt tokens for projects that don't use them).
306
+
307
+ ### Core Tools (always available)
308
+
309
+ | Tool | Purpose |
310
+ |------|---------|
311
+ | `aimem_query` | Search code, conversations, decisions, commits |
312
+ | `aimem_verify` | Check if a function/class/file exists |
313
+ | `aimem_conversations` | Search past conversation history |
314
+
315
+ ### Guardrails Tools (conditional)
316
+
317
+ | Tool | Purpose |
318
+ |------|---------|
319
+ | `aimem_guardrails_check` | Check if action violates rules |
320
+ | `aimem_guardrails_add` | Add explicit rule |
321
+ | `aimem_guardrails_list` | List rules + DIK level |
322
+ | `aimem_guardrails_respond` | Confirm, reject, override, or vindicate a rule |
323
+ | `aimem_guardrails_analyze` | Infer patterns from codebase |
324
+ | `aimem_guardrails_config` | Get/set config, DIK level, personality |
325
+
326
+ ### Teaching Claude to Use aimem
327
+
328
+ Add a `CLAUDE.md` file to your project root:
329
+
330
+ ```markdown
331
+ ## Memory (aimem)
332
+
333
+ Before claiming something isn't implemented or needs to be built:
334
+ 1. Query `aimem_query <topic> type=decisions` to check past decisions
335
+ 2. Query `aimem_verify <name>` to check if a function/class exists
336
+
337
+ Available aimem tools:
338
+ - `aimem_query <search>` - Search code, conversations, decisions, commits
339
+ - `aimem_verify <name>` - Does this function/class/file exist?
340
+ - `aimem_conversations <query>` - Search past conversation history
341
+ ```
342
+
343
+ ---
344
+
345
+ ## How It Works
346
+
347
+ ```
348
+ ┌─────────────────┐
349
+ │ Your Request │
350
+ └────────┬────────┘
351
+
352
+
353
+ ┌─────────────────┐
354
+ │ aimem Proxy │──── Capture response
355
+ │ │──── Extract decisions
356
+ │ │──── Update memory
357
+ └────────┬────────┘
358
+
359
+
360
+ ┌─────────────────┐
361
+ │ AI Model │
362
+ └────────┬────────┘
363
+
364
+
365
+ ┌─────────────────┐
366
+ │ MCP Tools │──── Query memory on-demand
367
+ │ │──── Check guardrails
368
+ │ │──── Inject personality
369
+ └─────────────────┘
370
+ ```
371
+
372
+ ### Architecture
373
+
374
+ ```
375
+ ┌─────────────────────────────────────────────────────────────────┐
376
+ │ Your AI Tool │
377
+ │ (Claude Code, Cursor, etc.) │
378
+ └──────────────────────────┬──────────────────────────────────────┘
379
+ │ API calls
380
+
381
+ ┌─────────────────────────────────────────────────────────────────┐
382
+ │ mockttp Proxy (capture-only) │
383
+ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
384
+ │ │ Passthrough │ │ Capture Response│ │ Extract │ │
385
+ │ │ (no injection) │ │ (SSE streaming) │ │ Decisions │ │
386
+ │ └─────────────────┘ └─────────────────┘ └─────────────┘
387
+ └──────────────────────────┬──────────────────────────────────────┘
388
+
389
+
390
+ ┌─────────────────────────────────────────────────────────────────┐
391
+ │ SQLite Database │
392
+ │ ┌──────────┐ ┌──────────┐ ┌─────────────┐ ┌───────────────┐ │
393
+ │ │ projects files │ │ structures │ │ conversations │ │
394
+ │ └──────────┘ └──────────┘ └─────────────┘ └───────────────┘ │
395
+ │ ┌──────────┐ ┌──────────┐ ┌─────────────┐ ┌───────────────┐ │
396
+ │ │extractions│ │ commits │ │ guardrails │ │ project_dik │ │
397
+ │ └──────────┘ └──────────┘ └─────────────┘ └───────────────┘ │
398
+ └──────────────────────────┬──────────────────────────────────────┘
399
+
400
+ ┌────────────────┴────────────────┐
401
+ ▼ ▼
402
+ ┌─────────────────────┐ ┌─────────────────────┐
403
+ │ MCP Server │ │ File Watcher │
404
+ │ (on-demand query) │ │ (live indexing) │
405
+ └─────────────────────┘ └─────────────────────┘
406
+ ```
407
+
408
+ ### Components
409
+
410
+ | Component | Location | Purpose |
411
+ |-----------|----------|---------|
412
+ | **CLI** | `src/cli/` | Commands: init, reindex, start, stop, query, setup, import, visualize, git, guardrails |
413
+ | **Database** | `src/db/` | SQLite + FTS5 for storage and search |
414
+ | **Indexer** | `src/indexer/` | Parse code into structures (functions, classes) |
415
+ | **Parsers** | `src/indexer/parsers/` | Language-specific (JS/TS, Python, Ruby, Go, Rust, Java, C/C++, PHP) |
416
+ | **Extractor** | `src/extractor/` | Extract decisions/rejections from conversations |
417
+ | **Guardrails** | `src/guardrails/` | DIK calculator, pattern analyzer, enforcer, responder |
418
+ | **MCP Server** | `src/mcp/` | Model Context Protocol tools |
419
+ | **Proxy** | `src/proxy/` | mockttp-based HTTPS proxy (Node.js) |
420
+ | **Git** | `src/git/` | Git integration: commits, blame, hooks |
421
+ | **Visualize** | `src/visualize/` | Interactive dashboard (Cytoscape.js, D3.js) |
422
+
423
+ ---
424
+
425
+ ## Supported LLM APIs
426
+
427
+ | Provider | API Host |
428
+ |----------|----------|
429
+ | Anthropic (Claude) | api.anthropic.com |
430
+ | OpenAI | api.openai.com |
431
+ | Google (Gemini) | generativelanguage.googleapis.com |
432
+ | Mistral | api.mistral.ai |
433
+ | Cohere | api.cohere.ai |
434
+ | Groq | api.groq.com |
435
+ | Together AI | api.together.xyz |
436
+ | Perplexity | api.perplexity.ai |
437
+ | Fireworks | api.fireworks.ai |
438
+ | DeepSeek | api.deepseek.com |
439
+ | Replicate | api.replicate.com |
440
+
441
+ ## Supported Languages
442
+
443
+ - JavaScript / TypeScript (`.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs`)
444
+ - Python (`.py`, `.pyw`)
445
+ - Ruby (`.rb`, `.rake`)
446
+ - Go (`.go`)
447
+ - Rust (`.rs`)
448
+ - Java (`.java`)
449
+ - Kotlin (`.kt`, `.kts`)
450
+ - C / C++ (`.c`, `.cpp`, `.cc`, `.cxx`, `.h`, `.hpp`, `.hxx`, `.hh`)
451
+ - PHP (`.php`, `.phtml`, `.php5`, `.php7`, `.php8`)
452
+
453
+ ---
454
+
455
+ ## Data Storage
456
+
457
+ Everything is stored locally:
458
+
459
+ | OS | Default Location |
460
+ |----|------------------|
461
+ | Linux/macOS | `~/.aimem/` |
462
+ | Windows | `C:\Users\<user>\.aimem\` |
463
+ | WSL | `/home/<user>/.aimem/` |
464
+
465
+ ```
466
+ .aimem/
467
+ ├── aimem.db # SQLite database
468
+ ├── ca-cert.pem # Proxy CA certificate
469
+ ├── ca-key.pem # Proxy CA key
470
+ ├── proxy.pid # Proxy process ID
471
+ └── watcher.pid # Watcher process ID
472
+ ```
473
+
474
+ ### Custom Data Directory
475
+
476
+ ```bash
477
+ export AIMEM_DATA_DIR="/path/to/shared/.aimem"
478
+ ```
479
+
480
+ ### Sharing Database Between WSL and Windows
481
+
482
+ **WSL** (add to `~/.bashrc` or `~/.zshrc`):
483
+ ```bash
484
+ export AIMEM_DATA_DIR="/mnt/c/Users/<user>/.aimem"
485
+ ```
486
+
487
+ **Windows** (PowerShell profile or System Environment Variables):
488
+ ```powershell
489
+ $env:AIMEM_DATA_DIR = "C:\Users\<user>\.aimem"
490
+ ```
491
+
492
+ ---
493
+
494
+ ## Visualization Dashboard
495
+
496
+ Generate an interactive HTML dashboard:
497
+
498
+ ```bash
499
+ aimem visualize # Generate dashboard.html
500
+ aimem visualize --output ./viz.html # Custom output path
501
+ aimem visualize --open # Open in browser
502
+ aimem visualize --serve # Start live server
503
+ ```
504
+
505
+ **Views:** Overview, Call Graph, Dependencies, Classes, Decisions, Code Smells, Hotspots, Gallery, Timeline, Treemap
506
+
507
+ ---
508
+
509
+ ## Troubleshooting
510
+
511
+ **Proxy not starting?**
512
+ - Check for port conflicts: `lsof -i :8080`
513
+ - Try a different port: `aimem start --port 8081`
514
+
515
+ **Certificate issues?**
516
+ - Run `aimem setup proxy --install` to auto-install
517
+ - Or manually trust `~/.aimem/ca-cert.pem`
518
+
519
+ **MCP not working in Claude Code?**
520
+ - Run `/mcp` to check connection
521
+ - Verify path: `which aimem`
522
+ - Restart Claude Code after setup
523
+
524
+ **No conversations being captured?**
525
+ - Verify proxy is running: `aimem status`
526
+ - Check env vars: `echo $HTTPS_PROXY`
527
+ - Ensure your tool respects HTTPS_PROXY
528
+
529
+ ---
530
+
531
+ ## The Philosophy
532
+
533
+ Most AI tools try to be maximally helpful. Instant output. No friction. No questions.
534
+
535
+ That's wrong.
536
+
537
+ The best collaborators push back. They ask clarifying questions. They remember past decisions. They say "no" when you're about to make a mistake.
538
+
539
+ aimem turns your AI into that collaborator. Not by programming personality, but by **earning it** through a track record of being right.
540
+
541
+ ---
542
+
543
+ ## Roadmap
544
+
545
+ - [x] Memory (conversations, structures, commits)
546
+ - [x] Guardrails (rules, violations, tracking)
547
+ - [x] DIK calculation
548
+ - [x] Analyzer (infer rules from codebase)
549
+ - [x] Ambient personality mode
550
+ - [x] Import from linters (.eslintrc, .rubocop.yml, tsconfig.json, pyproject.toml)
551
+ - [x] Vindication auto-detection (file watcher tracks code convergence)
552
+ - [ ] VS Code extension
553
+ - [ ] Team-shared rules
554
+
555
+ ---
556
+
557
+ ## Development
558
+
559
+ ```bash
560
+ # Install from source
561
+ git clone https://github.com/rangerchaz/aimem.git
562
+ cd aimem
563
+ npm install
564
+ npm run build
565
+ npm link # Install globally from source
566
+
567
+ # Development commands
568
+ npm run dev # Watch mode
569
+ npm test # Run tests
570
+ ```
571
+
572
+ ---
573
+
574
+ ## Why "aimem"?
575
+
576
+ AI + Memory. Simple.
577
+
578
+ But also: it's the system that remembers, so you don't have to repeat yourself. And eventually, it remembers when it warned you and you didn't listen.
579
+
580
+ ---
581
+
582
+ ## License
583
+
584
+ MIT
585
+
586
+ ---
587
+
588
+ *Built by [@rangerchaz](https://github.com/rangerchaz) because LLMs need to learn to say no.*