@sashabogi/argus-mcp 1.2.3 → 2.0.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.
package/README.md CHANGED
@@ -4,131 +4,376 @@
4
4
 
5
5
  **Codebase Intelligence Beyond Context Limits**
6
6
 
7
- Argus is an AI-powered codebase analysis tool that understands your entire project, regardless of size. It provides intelligent answers about code architecture, patterns, and relationships that would be impossible with traditional context-limited approaches.
7
+ Argus is an AI-powered codebase analysis tool that understands your entire project, regardless of size. Using a hybrid approach of zero-cost structural queries and AI-powered reasoning, Argus provides intelligent answers about code architecture, patterns, and relationships that would be impossible with traditional context-limited approaches.
8
8
 
9
- ## Acknowledgments
9
+ ## Key Features
10
10
 
11
- Argus builds upon and extends the innovative work of [Matryoshka RLM](https://github.com/yogthos/Matryoshka) by [Dmitri Sotnikov (yogthos)](https://github.com/yogthos).
11
+ | Feature | Description |
12
+ |---------|-------------|
13
+ | **Zero-Cost Dependency Queries** | Find importers, symbols, and file dependencies instantly with pre-computed metadata |
14
+ | **Progressive Disclosure Search** | 3-tier search architecture: `find_files` -> `search_codebase` -> `get_context` |
15
+ | **Enhanced Snapshots** | Import graphs, export indexes, and symbol lookups built into every snapshot |
16
+ | **Worker Service** | Persistent LRU caching for repeated queries (port 37778) |
17
+ | **Web UI** | Interactive D3.js dependency graph visualization |
18
+ | **Multi-Provider AI** | ZAI, Anthropic, OpenAI, DeepSeek, and Ollama support |
19
+ | **Claude Code Integration** | Native MCP server with global instructions for all agents |
12
20
 
13
- The Matryoshka project introduced the brilliant concept of **Recursive Language Models (RLM)** - using an LLM to generate symbolic commands (via the [Nucleus DSL](https://github.com/michaelwhitford/nucleus)) that are executed against documents, enabling analysis of files far exceeding context window limits. This approach achieves **93% token savings** compared to traditional methods.
21
+ ## Quick Start
14
22
 
15
- **What Argus adds:**
23
+ ```bash
24
+ # 1. Install globally via npm
25
+ npm install -g @sashabogi/argus-mcp
16
26
 
17
- | Matryoshka | Argus |
18
- |------------|-------|
19
- | Single file analysis | Full codebase analysis |
20
- | CLI-only | CLI + MCP Server for Claude Code |
21
- | Ollama/DeepSeek providers | Multi-provider (ZAI, Anthropic, OpenAI, Ollama, DeepSeek) |
22
- | Manual configuration | Interactive setup wizard |
23
- | Document-focused | Code-aware with snapshot generation |
27
+ # 2. Interactive setup (configures API keys and preferences)
28
+ argus init
24
29
 
25
- We encourage you to explore the original [Matryoshka](https://github.com/yogthos/Matryoshka) project and the [RLM research paper](https://arxiv.org/abs/2512.24601) that inspired this approach.
30
+ # 3. Add to Claude Code (installs MCP + global instructions)
31
+ argus mcp install
32
+
33
+ # 4. Set up any project
34
+ argus setup .
35
+ ```
36
+
37
+ That's it! Argus is now integrated into Claude Code and will automatically be used for codebase exploration.
38
+
39
+ ## Installation
40
+
41
+ ### npm (Recommended)
42
+
43
+ ```bash
44
+ npm install -g @sashabogi/argus-mcp
45
+ ```
46
+
47
+ ### Manual Installation
48
+
49
+ ```bash
50
+ git clone https://github.com/sashabogi/argus.git
51
+ cd argus
52
+ npm install
53
+ npm run build
54
+ npm link
55
+ ```
56
+
57
+ ### Update
58
+
59
+ ```bash
60
+ argus update
61
+ ```
26
62
 
27
63
  ---
28
64
 
29
65
  ## Features
30
66
 
31
- - 🔍 **Codebase-Wide Analysis** - Analyze entire projects, not just single files
32
- - 🧠 **AI-Powered Understanding** - Uses LLMs to reason about code structure and patterns
33
- - 🔌 **MCP Integration** - Works seamlessly with Claude Code
34
- - 🌐 **Multi-Provider Support** - ZAI GLM-4.7, Claude, GPT-4, DeepSeek, Ollama
35
- - 📸 **Smart Snapshots** - Intelligent codebase snapshots optimized for analysis
36
- - ⚡ **Hybrid Search** - Fast grep + AI reasoning for optimal results
37
- - 🔧 **Easy Setup** - Interactive configuration wizard
67
+ ### 1. Progressive Disclosure MCP Tools
38
68
 
39
- ## Quick Start
69
+ Argus provides 6 MCP tools with a tiered cost structure, optimized for token efficiency:
40
70
 
41
- ### Installation
71
+ | Tool | Cost | Use Case |
72
+ |------|------|----------|
73
+ | `search_codebase` | **FREE** | Fast regex search across the entire snapshot |
74
+ | `find_files` | **FREE** | Glob pattern matching for file discovery |
75
+ | `get_context` | **FREE** | Extract N lines around a specific location |
76
+ | `find_importers` | **FREE** | Find all files that import a given module |
77
+ | `find_symbol` | **FREE** | Locate where a symbol is exported from |
78
+ | `get_file_deps` | **FREE** | Get all imports of a specific file |
79
+ | `analyze_codebase` | ~500 tokens | AI-powered deep analysis for complex questions |
80
+ | `semantic_search` | ~100 tokens | Natural language code search using FTS5 |
81
+ | `create_snapshot` | ~100 tokens | Create or refresh a codebase snapshot |
82
+
83
+ **Workflow Example:**
42
84
 
43
85
  ```bash
44
- # Install globally via npm
45
- npm install -g @sashabogi/argus-mcp
86
+ # Step 1: Find files (FREE)
87
+ find_files(".argus/snapshot.txt", "**/*auth*")
46
88
 
47
- # Interactive setup (configures API keys and preferences)
48
- argus init
89
+ # Step 2: Search for patterns (FREE)
90
+ search_codebase(".argus/snapshot.txt", "handleAuth")
49
91
 
50
- # Add to Claude Code (installs MCP + global instructions)
51
- argus mcp install
92
+ # Step 3: Get context around a match (FREE)
93
+ get_context(".argus/snapshot.txt", "src/auth.ts", 42, 10, 20)
52
94
 
53
- # Set up any project
54
- argus setup .
95
+ # Step 4: Only if needed - AI analysis (~500 tokens)
96
+ analyze_codebase(".argus/snapshot.txt", "How does the authentication flow work?")
55
97
  ```
56
98
 
57
- **To update Argus:**
99
+ ### 2. Enhanced Snapshots
100
+
101
+ Every snapshot includes structural metadata that enables zero-cost dependency queries:
102
+
58
103
  ```bash
59
- argus update
104
+ # Create an enhanced snapshot (default)
105
+ argus snapshot . -o .argus/snapshot.txt
106
+
107
+ # Create a basic snapshot (faster, smaller, no metadata)
108
+ argus snapshot . -o .argus/snapshot.txt --basic
60
109
  ```
61
110
 
62
- ### How It Works
111
+ **Metadata Included:**
63
112
 
64
- The `argus mcp install` command does two things:
113
+ - **Import Graph** - Which files import which other files
114
+ - **Export Index** - Symbol -> files that export it
115
+ - **Who Imports Whom** - Reverse dependency graph for impact analysis
116
+ - **Function Signatures** - With line numbers for precise navigation
117
+
118
+ **Example Zero-Cost Queries:**
119
+
120
+ ```typescript
121
+ // Find where useAuth is exported from
122
+ find_symbol(".argus/snapshot.txt", "useAuth")
123
+ // -> { file: "contexts/auth-context.tsx", line: 42 }
65
124
 
66
- 1. **Installs the MCP server** - Makes Argus tools available in Claude Code
67
- 2. **Injects global instructions** - Adds Argus awareness to `~/.claude/CLAUDE.md`
125
+ // Find all files that depend on auth-context
126
+ find_importers(".argus/snapshot.txt", "auth-context")
127
+ // -> ["app.tsx", "dashboard.tsx", "settings.tsx"]
68
128
 
69
- The global instructions apply to **ALL projects** and **ALL sub-agents** (coders, testers, reviewers, debuggers, etc.) regardless of their specific configuration. This means:
129
+ // Get dependencies of a specific file
130
+ get_file_deps(".argus/snapshot.txt", "src/app.tsx")
131
+ // -> ["./auth", "./theme", "@/components/ui"]
132
+ ```
70
133
 
71
- - You don't need to modify individual agent files
72
- - New agents you install automatically inherit Argus awareness
73
- - Works with any skill or agent ecosystem
134
+ ### 3. Worker Service
74
135
 
75
- ### Per-Project Setup
136
+ For optimal performance, Argus includes a persistent worker service that caches parsed snapshots in memory:
76
137
 
77
138
  ```bash
78
- # In any project directory
79
- argus setup .
139
+ # Start the worker service
140
+ argus worker start
141
+
142
+ # Check worker status
143
+ argus worker status
144
+
145
+ # Stop the worker
146
+ argus worker stop
80
147
  ```
81
148
 
82
- This creates `.argus/snapshot.txt` - a compressed representation of your codebase that Argus uses for efficient analysis.
149
+ **Worker Features:**
150
+
151
+ - **LRU Cache** - Keeps up to 5 parsed snapshots in memory
152
+ - **File Watching** - Detects changes and invalidates cache automatically
153
+ - **REST API** - Available on port 37778
154
+
155
+ **API Endpoints:**
83
156
 
84
- ### Basic Usage
157
+ | Endpoint | Method | Description |
158
+ |----------|--------|-------------|
159
+ | `/health` | GET | Health check and cache stats |
160
+ | `/snapshot/load` | POST | Load a snapshot into cache |
161
+ | `/search` | POST | Search using cached snapshot |
162
+ | `/context` | POST | Get context from cached snapshot |
163
+ | `/watch` | POST | Start watching a project |
164
+ | `/watch` | DELETE | Stop watching a project |
165
+
166
+ ### 4. Web UI - Codebase Explorer
167
+
168
+ Argus includes a visual codebase explorer for understanding your project structure:
85
169
 
86
170
  ```bash
87
- # Analyze a codebase
88
- argus analyze ./my-project "What are the main architectural patterns?"
171
+ # Open the web UI
172
+ argus ui
89
173
 
90
- # Create a snapshot for repeated analysis
174
+ # Specify a custom port
175
+ argus ui --port 4000
176
+ ```
177
+
178
+ ![Codebase Explorer](docs/images/codebase-explorer.png)
179
+
180
+ **Web UI Features:**
181
+
182
+ - **Dependency Graph** - D3.js force-directed visualization of file relationships
183
+ - **File Tree Explorer** - Navigate your codebase with line counts
184
+ - **Full-Text Search** - Search across all files with highlighting
185
+ - **Code Viewer** - View file contents with syntax highlighting
186
+ - **Stats Dashboard** - Overview of files, imports, and exports
187
+
188
+ ### 5. Claude Lifecycle Hooks
189
+
190
+ Argus can automatically update snapshots using Claude Code's lifecycle hooks:
191
+
192
+ **Session Start Hook:**
193
+ - Checks for `.argus/snapshot.txt` on session start
194
+ - Warns if snapshot is stale (>1 hour old)
195
+
196
+ **Post-Tool Hook:**
197
+ - Fires after Write/Edit operations
198
+ - Notifies worker service of file changes for cache invalidation
199
+
200
+ ---
201
+
202
+ ## CLI Commands
203
+
204
+ | Command | Description |
205
+ |---------|-------------|
206
+ | `argus init` | Interactive setup wizard for API keys and preferences |
207
+ | `argus setup [path]` | One-command project setup (snapshot + CLAUDE.md + .gitignore) |
208
+ | `argus snapshot <path>` | Create a codebase snapshot |
209
+ | `argus analyze <path> <query>` | Analyze codebase with AI |
210
+ | `argus query <snapshot> <query>` | Query an existing snapshot |
211
+ | `argus search <snapshot> <pattern>` | Fast grep search (no AI) |
212
+ | `argus status [path]` | Check if snapshot is up to date |
213
+ | `argus mcp install` | Install MCP server for Claude Code |
214
+ | `argus mcp uninstall` | Remove from Claude Code |
215
+ | `argus context generate <path>` | Generate architecture summary |
216
+ | `argus context inject <path>` | Add architecture section to CLAUDE.md |
217
+ | `argus config [key] [value]` | View or modify configuration |
218
+ | `argus ui` | Open the web UI for visualization |
219
+ | `argus update` | Update Argus to the latest version |
220
+
221
+ ### Command Options
222
+
223
+ **`argus snapshot`**
224
+ ```bash
91
225
  argus snapshot ./my-project -o .argus/snapshot.txt
226
+ --extensions, -e File extensions to include (comma-separated)
227
+ --exclude Patterns to exclude (comma-separated)
228
+ --output, -o Output file path
229
+ --basic Skip structural metadata (faster, smaller)
230
+ ```
92
231
 
93
- # Query an existing snapshot
94
- argus query .argus/snapshot.txt "Find all API endpoints"
232
+ **`argus analyze`**
233
+ ```bash
234
+ argus analyze ./my-project "What are the main modules?"
235
+ --provider, -p Override default provider
236
+ --max-turns, -t Maximum reasoning turns (default: 15)
237
+ --verbose, -v Show detailed execution logs
238
+ ```
95
239
 
96
- # Fast grep search (no AI, instant results)
240
+ **`argus search`**
241
+ ```bash
97
242
  argus search .argus/snapshot.txt "authentication"
243
+ --ignore-case, -i Case-insensitive search
244
+ --max-results, -n Maximum results (default: 50)
245
+ ```
246
+
247
+ **`argus ui`**
248
+ ```bash
249
+ argus ui
250
+ --port, -p Port to serve on (default: 3333)
251
+ --no-open Do not open browser automatically
252
+ ```
253
+
254
+ ---
255
+
256
+ ## MCP Server Setup
257
+
258
+ ### Automatic Installation
259
+
260
+ ```bash
261
+ argus mcp install
262
+ ```
263
+
264
+ This command:
265
+ 1. Creates a wrapper script at `~/.argus/argus-mcp-wrapper`
266
+ 2. Registers the MCP server with Claude Code
267
+ 3. Injects Argus instructions into `~/.claude/CLAUDE.md` (global for all projects)
268
+
269
+ ### Manual Installation
270
+
271
+ If automatic installation fails, add manually:
272
+
273
+ ```bash
274
+ claude mcp add argus -s user -- ~/.argus/argus-mcp-wrapper
275
+ ```
98
276
 
99
- # Check if snapshot needs refresh
100
- argus status .
277
+ ### MCP Tool Reference
278
+
279
+ Once installed, Claude Code has access to these tools:
280
+
281
+ **`search_codebase`** - Zero-cost regex search
282
+ ```typescript
283
+ search_codebase({
284
+ path: ".argus/snapshot.txt",
285
+ pattern: "handleAuth",
286
+ caseInsensitive: true, // default: true
287
+ maxResults: 50, // default: 50, max: 200
288
+ offset: 0, // for pagination
289
+ contextChars: 80 // truncate context
290
+ })
291
+ ```
292
+
293
+ **`find_files`** - Zero-cost glob matching
294
+ ```typescript
295
+ find_files({
296
+ path: ".argus/snapshot.txt",
297
+ pattern: "**/*.test.ts",
298
+ caseInsensitive: true, // default: true
299
+ limit: 100 // default: 100, max: 500
300
+ })
301
+ ```
302
+
303
+ **`get_context`** - Zero-cost context extraction
304
+ ```typescript
305
+ get_context({
306
+ path: ".argus/snapshot.txt",
307
+ file: "src/auth.ts",
308
+ line: 42,
309
+ before: 10, // lines before
310
+ after: 20 // lines after
311
+ })
101
312
  ```
102
313
 
103
- ### In Claude Code
314
+ **`find_importers`** - Zero-cost dependency query
315
+ ```typescript
316
+ find_importers({
317
+ path: ".argus/snapshot.txt",
318
+ target: "src/auth.ts"
319
+ })
320
+ ```
321
+
322
+ **`find_symbol`** - Zero-cost symbol lookup
323
+ ```typescript
324
+ find_symbol({
325
+ path: ".argus/snapshot.txt",
326
+ symbol: "useAuth"
327
+ })
328
+ ```
104
329
 
105
- After running `argus mcp install`, you can use Argus directly:
330
+ **`get_file_deps`** - Zero-cost import list
331
+ ```typescript
332
+ get_file_deps({
333
+ path: ".argus/snapshot.txt",
334
+ file: "src/app.tsx"
335
+ })
336
+ ```
106
337
 
338
+ **`analyze_codebase`** - AI-powered analysis (~500 tokens)
339
+ ```typescript
340
+ analyze_codebase({
341
+ path: ".argus/snapshot.txt",
342
+ query: "How does authentication work?",
343
+ maxTurns: 15 // default: 15
344
+ })
107
345
  ```
108
- @argus What are the main modules in this codebase?
109
- @argus Find all error handling patterns
110
- @argus How does the authentication flow work?
346
+
347
+ **`semantic_search`** - Natural language search
348
+ ```typescript
349
+ semantic_search({
350
+ path: "/path/to/project",
351
+ query: "authentication middleware",
352
+ limit: 20 // default: 20
353
+ })
111
354
  ```
112
355
 
356
+ ---
357
+
113
358
  ## Configuration
114
359
 
115
- Argus stores configuration in `~/.argus/config.json`. Run `argus init` for interactive setup, or configure manually:
360
+ Argus stores configuration in `~/.argus/config.json`. Run `argus init` for interactive setup.
116
361
 
117
362
  ```json
118
363
  {
119
- "provider": "zai",
364
+ "provider": "anthropic",
120
365
  "providers": {
366
+ "anthropic": {
367
+ "apiKey": "sk-ant-...",
368
+ "model": "claude-sonnet-4-20250514"
369
+ },
121
370
  "zai": {
122
371
  "apiKey": "your-api-key",
123
372
  "model": "glm-4.7",
124
373
  "endpoint": "https://api.z.ai/api/coding/paas/v4"
125
374
  },
126
- "anthropic": {
127
- "apiKey": "your-api-key",
128
- "model": "claude-sonnet-4-20250514"
129
- },
130
375
  "openai": {
131
- "apiKey": "your-api-key",
376
+ "apiKey": "sk-...",
132
377
  "model": "gpt-4o"
133
378
  },
134
379
  "deepseek": {
@@ -143,103 +388,80 @@ Argus stores configuration in `~/.argus/config.json`. Run `argus init` for inter
143
388
  "defaults": {
144
389
  "maxTurns": 15,
145
390
  "turnTimeoutMs": 60000,
146
- "snapshotExtensions": ["ts", "tsx", "js", "jsx", "rs", "py", "go", "java"]
391
+ "snapshotExtensions": ["ts", "tsx", "js", "jsx", "rs", "py", "go", "java"],
392
+ "excludePatterns": ["node_modules", ".git", "dist", "build"]
147
393
  }
148
394
  }
149
395
  ```
150
396
 
151
- ## Commands
397
+ ### Supported Providers
152
398
 
153
- ### `argus init`
154
- Interactive setup wizard. Configures your preferred AI provider and API keys.
155
-
156
- ### `argus analyze <path> <query>`
157
- Analyze a codebase or file with an AI-powered query.
399
+ | Provider | Models | Best For |
400
+ |----------|--------|----------|
401
+ | **ZAI** | GLM-4.7, GLM-4.6 | Best value, excellent coding |
402
+ | **Anthropic** | Claude Sonnet/Opus | Highest quality reasoning |
403
+ | **OpenAI** | GPT-4o, GPT-4 | General purpose |
404
+ | **DeepSeek** | DeepSeek Chat/Coder | Budget-friendly |
405
+ | **Ollama** | Qwen, CodeLlama, etc. | Free, local, private |
158
406
 
159
- Options:
160
- - `--provider, -p` - Override default provider
161
- - `--max-turns, -t` - Maximum reasoning turns (default: 15)
162
- - `--verbose, -v` - Show detailed execution logs
407
+ ---
163
408
 
164
- ### `argus snapshot <path> [output]`
165
- Create an optimized snapshot of a codebase for analysis.
409
+ ## API Reference
166
410
 
167
- Options:
168
- - `--extensions, -e` - File extensions to include (comma-separated)
169
- - `--exclude` - Patterns to exclude
170
- - `--output, -o` - Output file path
171
- - `--basic` - Skip structural metadata (faster, smaller snapshot)
411
+ ### Worker Service (Port 37778)
172
412
 
173
- **Snapshots are enhanced by default**, including structural metadata that enables zero-cost queries:
413
+ **Health Check**
174
414
  ```bash
175
- argus snapshot . -o .argus/snapshot.txt
176
- ```
177
-
178
- Enhanced snapshots include:
179
- - **Import Graph** - Which files import which other files
180
- - **Export Index** - Symbol → files that export it
181
- - **Who Imports Whom** - Reverse dependency graph
182
- - **Function Signatures** - With line numbers
183
-
184
- ### `argus query <snapshot> <query>`
185
- Query an existing snapshot file.
186
-
187
- ### `argus search <snapshot> <pattern>`
188
- Fast grep search without AI (instant results).
189
-
190
- ## MCP Tools (for Claude Code)
191
-
192
- When installed via `argus mcp install`, Claude Code gets access to these tools:
193
-
194
- | Tool | Cost | Description |
195
- |------|------|-------------|
196
- | `search_codebase` | **FREE** | Fast regex search across snapshot |
197
- | `analyze_codebase` | ~500 tokens | AI-powered architecture analysis |
198
- | `find_importers` | **FREE** | Find all files that import a given file |
199
- | `find_symbol` | **FREE** | Find where a symbol is exported from |
200
- | `get_file_deps` | **FREE** | Get all imports of a specific file |
201
- | `create_snapshot` | ~100 tokens | Create/refresh a snapshot |
202
-
203
- ### Zero-Cost Tools
204
-
205
- Since snapshots are enhanced by default, Claude Code can answer dependency questions instantly:
206
-
415
+ curl http://localhost:37778/health
207
416
  ```
208
- # Instead of reading 15 files to understand a flow:
209
- find_symbol("useAuth") → "contexts/auth-context.tsx:42"
210
- find_importers("auth-context") → ["app.tsx", "dashboard.tsx", ...]
211
- get_file_deps("app.tsx") → ["./auth", "./theme", "@/components/ui"]
417
+ Response:
418
+ ```json
419
+ {
420
+ "status": "ok",
421
+ "version": "2.0.0",
422
+ "cached": 2,
423
+ "watching": 1
424
+ }
212
425
  ```
213
426
 
214
- These tools use the structural metadata included in all snapshots by default.
215
-
216
- ### `argus setup [path]`
217
- One-command project setup. Creates snapshot, updates .gitignore, optionally injects into project CLAUDE.md.
218
-
219
- Options:
220
- - `--no-claude-md` - Skip CLAUDE.md injection
221
- - `--no-gitignore` - Skip .gitignore update
222
-
223
- ### `argus status [path]`
224
- Check if snapshot is up to date. Shows age and files changed since last snapshot.
225
-
226
- ### `argus mcp install`
227
- Install Argus as an MCP server for Claude Code. Also injects global instructions into `~/.claude/CLAUDE.md`.
427
+ **Load Snapshot**
428
+ ```bash
429
+ curl -X POST http://localhost:37778/snapshot/load \
430
+ -H "Content-Type: application/json" \
431
+ -d '{"path": "/path/to/.argus/snapshot.txt"}'
432
+ ```
228
433
 
229
- Options:
230
- - `--no-claude-md` - Skip global CLAUDE.md injection
434
+ **Search**
435
+ ```bash
436
+ curl -X POST http://localhost:37778/search \
437
+ -H "Content-Type: application/json" \
438
+ -d '{
439
+ "path": "/path/to/.argus/snapshot.txt",
440
+ "pattern": "handleAuth",
441
+ "options": {"caseInsensitive": true, "maxResults": 50}
442
+ }'
443
+ ```
231
444
 
232
- ### `argus mcp uninstall`
233
- Remove Argus from Claude Code.
445
+ **Get Context**
446
+ ```bash
447
+ curl -X POST http://localhost:37778/context \
448
+ -H "Content-Type: application/json" \
449
+ -d '{
450
+ "path": "/path/to/.argus/snapshot.txt",
451
+ "file": "src/auth.ts",
452
+ "line": 42,
453
+ "before": 10,
454
+ "after": 20
455
+ }'
456
+ ```
234
457
 
235
- ### `argus config [key] [value]`
236
- View or modify configuration.
458
+ ---
237
459
 
238
460
  ## How It Works
239
461
 
240
462
  Argus uses a **Recursive Language Model (RLM)** approach:
241
463
 
242
- 1. **Snapshot Creation** - Your codebase is compiled into an optimized text snapshot
464
+ 1. **Snapshot Creation** - Your codebase is compiled into an optimized text snapshot with structural metadata
243
465
  2. **Query Analysis** - The LLM receives your question and the Nucleus DSL reference
244
466
  3. **Iterative Exploration** - The LLM generates symbolic commands (grep, filter, map, etc.)
245
467
  4. **Command Execution** - Commands run against the full snapshot in a sandbox
@@ -248,7 +470,7 @@ Argus uses a **Recursive Language Model (RLM)** approach:
248
470
 
249
471
  This allows analysis of codebases **far exceeding** typical context limits (2M+ characters) while using minimal tokens per query.
250
472
 
251
- ## Nucleus DSL Reference
473
+ ### Nucleus DSL Reference
252
474
 
253
475
  Argus uses the [Nucleus DSL](https://github.com/michaelwhitford/nucleus) for document operations:
254
476
 
@@ -276,15 +498,7 @@ Argus uses the [Nucleus DSL](https://github.com/michaelwhitford/nucleus) for doc
276
498
  <<<FINAL>>>your answer here<<<END>>>
277
499
  ```
278
500
 
279
- ## Supported Providers
280
-
281
- | Provider | Models | Best For |
282
- |----------|--------|----------|
283
- | **ZAI** | GLM-4.7, GLM-4.6 | Best value, excellent coding |
284
- | **Anthropic** | Claude Sonnet/Opus | Highest quality reasoning |
285
- | **OpenAI** | GPT-4o, GPT-4 | General purpose |
286
- | **DeepSeek** | DeepSeek Chat/Coder | Budget-friendly |
287
- | **Ollama** | Qwen, CodeLlama, etc. | Free, local, private |
501
+ ---
288
502
 
289
503
  ## Requirements
290
504
 
@@ -292,6 +506,8 @@ Argus uses the [Nucleus DSL](https://github.com/michaelwhitford/nucleus) for doc
292
506
  - npm or pnpm
293
507
  - API key for your chosen provider (or Ollama for free local usage)
294
508
 
509
+ ---
510
+
295
511
  ## FAQ & Documentation
296
512
 
297
513
  - **[FAQ](./docs/FAQ.md)** - Common questions about costs, workflow, and troubleshooting
@@ -299,14 +515,44 @@ Argus uses the [Nucleus DSL](https://github.com/michaelwhitford/nucleus) for doc
299
515
 
300
516
  ### Quick Answers
301
517
 
302
- **"Do I need to pay for another API?"**
303
- No! Use Ollama (free, local) or `argus search` (no AI at all).
518
+ **"Do I need to pay for another API?"**
519
+ No! Use Ollama (free, local) or zero-cost tools like `search_codebase` (no AI at all).
304
520
 
305
- **"I'm starting a fresh project - how does Argus help?"**
521
+ **"I'm starting a fresh project - how does Argus help?"**
306
522
  Argus works from Day 0. Snapshot your PRD/TDD, then refresh as you build. See [FAQ](./docs/FAQ.md#im-starting-a-brand-new-project---theres-nothing-to-scan-yet).
307
523
 
308
- **"How do I keep the snapshot updated?"**
309
- Run `argus status .` to check, then `argus snapshot .` to refresh. See [FAQ](./docs/FAQ.md#how-do-i-keep-the-snapshot-up-to-date).
524
+ **"How do I keep the snapshot updated?"**
525
+ Run `argus status .` to check freshness, then `argus snapshot .` to refresh. See [FAQ](./docs/FAQ.md#how-do-i-keep-the-snapshot-up-to-date).
526
+
527
+ **"What's the difference between basic and enhanced snapshots?"**
528
+ Enhanced snapshots (default) include import graphs and export indexes that enable zero-cost dependency queries. Basic snapshots are faster to create but only support regex search.
529
+
530
+ ---
531
+
532
+ ## Acknowledgments
533
+
534
+ Argus builds upon and extends the innovative work of [Matryoshka RLM](https://github.com/yogthos/Matryoshka) by [Dmitri Sotnikov (yogthos)](https://github.com/yogthos).
535
+
536
+ The Matryoshka project introduced the brilliant concept of **Recursive Language Models (RLM)** - using an LLM to generate symbolic commands (via the [Nucleus DSL](https://github.com/michaelwhitford/nucleus)) that are executed against documents, enabling analysis of files far exceeding context window limits. This approach achieves **93% token savings** compared to traditional methods.
537
+
538
+ **What Argus adds:**
539
+
540
+ | Matryoshka | Argus |
541
+ |------------|-------|
542
+ | Single file analysis | Full codebase analysis |
543
+ | CLI-only | CLI + MCP Server + Web UI |
544
+ | Ollama/DeepSeek providers | Multi-provider (ZAI, Anthropic, OpenAI, Ollama, DeepSeek) |
545
+ | Manual configuration | Interactive setup wizard |
546
+ | Document-focused | Code-aware with structural metadata |
547
+ | No caching | Worker service with LRU cache |
548
+
549
+ We encourage you to explore the original [Matryoshka](https://github.com/yogthos/Matryoshka) project and the [RLM research paper](https://arxiv.org/abs/2512.24601) that inspired this approach.
550
+
551
+ ### claude-mem
552
+
553
+ The Argus 2.0 upgrade was heavily inspired by [claude-mem](https://github.com/thedotmack/claude-mem) by [thedotmack](https://github.com/thedotmack). The progressive disclosure architecture, self-documenting MCP tools, and Claude Code integration patterns were adapted from claude-mem's innovative approach to context management.
554
+
555
+ ---
310
556
 
311
557
  ## License
312
558
 
@@ -319,5 +565,6 @@ Contributions are welcome! Please read our contributing guidelines before submit
319
565
  ## Related Projects
320
566
 
321
567
  - [Matryoshka RLM](https://github.com/yogthos/Matryoshka) - The original RLM implementation that inspired Argus
568
+ - [claude-mem](https://github.com/thedotmack/claude-mem) - Progressive disclosure and MCP patterns that inspired Argus 2.0
322
569
  - [Nucleus DSL](https://github.com/michaelwhitford/nucleus) - The symbolic language used for document operations
323
570
  - [RLM Paper](https://arxiv.org/abs/2512.24601) - Academic research on Recursive Language Models