@brutalist/mcp 0.6.12 → 0.6.14

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,263 +1,231 @@
1
- # Brutalist MCP 💀
1
+ # Brutalist MCP
2
2
 
3
- Your startup will fail. Your architecture will collapse. Your code is a security nightmare.
3
+ Multi-perspective code analysis using Claude Code, Codex, and Gemini CLI agents.
4
4
 
5
- But this time, you'll know *why* before users do.
5
+ Get direct, honest technical feedback on your code, architecture, and ideas before they reach production.
6
6
 
7
- ## Deploy AI Critics That Don't Lie
7
+ ## What It Does
8
8
 
9
- Every AI tells you what you want to hear. This one tells you what you need to know.
9
+ The Brutalist MCP connects your AI coding assistant to three different CLI agents (Claude, Codex, Gemini), each providing independent analysis. This gives you multiple perspectives on:
10
10
 
11
- Three brutal CLI agents. Zero sugar-coating. Maximum carnage.
11
+ - Code quality and security vulnerabilities
12
+ - Architecture decisions and scalability
13
+ - Product ideas and technical feasibility
14
+ - Research methodology and design flaws
12
15
 
13
- Three brutal CLI agents that can analyze anything. Each agent brings different perspectives to demolish your work from every angle.
16
+ Real file-system access. Straightforward analysis. No sugar-coating.
14
17
 
15
- Real file-system analysis. Actual brutal prompts. Intelligent pagination for enterprise codebases. No participation trophies.
18
+ ## Quick Start
16
19
 
17
- ## Setup
20
+ ### Step 1: Install a CLI Agent
18
21
 
19
- ### Prerequisites
20
-
21
- Install at least one CLI agent:
22
- - **Claude Code**: `npm install -g claude` (or via Claude desktop app)
23
- - **Codex**: Install from [OpenAI Codex](https://github.com/openai/codex-cli)
24
- - **Gemini**: `npm install -g @google/gemini-cli` or authenticate via `gemini auth`
25
-
26
- ### Installation
27
-
28
- <details>
29
- <summary><strong>Claude Code</strong> — One-liner</summary>
22
+ You need at least one of these installed:
30
23
 
31
24
  ```bash
32
- claude mcp add brutalist --scope user -- npx -y @brutalist/mcp
33
- ```
34
- </details>
25
+ # Option 1: Claude Code (recommended)
26
+ npm install -g claude
35
27
 
36
- <details>
37
- <summary><strong>VS Code / Cline</strong> — Manual config</summary>
28
+ # Option 2: Codex
29
+ # Install from https://github.com/openai/codex-cli
38
30
 
39
- ```bash
40
- code --add-mcp '{"name":"brutalist","command":"npx","args":["-y","@brutalist/mcp"]}'
31
+ # Option 3: Gemini
32
+ npm install -g @google/gemini-cli
41
33
  ```
42
- </details>
43
34
 
44
- <details>
45
- <summary><strong>Gemini CLI</strong> — One-liner</summary>
35
+ ### Step 2: Install the MCP Server
36
+
37
+ Choose your IDE:
46
38
 
39
+ **Claude Code:**
47
40
  ```bash
48
- gemini mcp add brutalist -- npx -y @brutalist/mcp
41
+ claude mcp add brutalist --scope user -- npx -y @brutalist/mcp@latest
49
42
  ```
50
- </details>
51
-
52
- <details>
53
- <summary><strong>Cursor</strong> — Manual config</summary>
54
-
55
- Add to `~/.cursor/mcp.json` or use **Settings → MCP & Integrations**
56
43
 
44
+ **Cursor:**
45
+ Add to `~/.cursor/mcp.json`:
57
46
  ```json
58
47
  {
59
48
  "brutalist": {
60
49
  "command": "npx",
61
- "args": ["-y", "@brutalist/mcp"]
50
+ "args": ["-y", "@brutalist/mcp@latest"]
62
51
  }
63
52
  }
64
53
  ```
65
- </details>
66
-
67
- <details>
68
- <summary><strong>Windsurf</strong> — Manual config</summary>
69
54
 
70
- Add to `~/.codeium/windsurf/mcp_config.json` or use **Plugin Store**
55
+ **VS Code / Cline:**
56
+ ```bash
57
+ code --add-mcp '{"name":"brutalist","command":"npx","args":["-y","@brutalist/mcp@latest"]}'
58
+ ```
71
59
 
60
+ **Windsurf:**
61
+ Add to `~/.codeium/windsurf/mcp_config.json`:
72
62
  ```json
73
63
  {
74
64
  "brutalist": {
75
65
  "command": "npx",
76
- "args": ["-y", "@brutalist/mcp"]
66
+ "args": ["-y", "@brutalist/mcp@latest"]
77
67
  }
78
68
  }
79
69
  ```
80
- </details>
81
70
 
82
- ## Brutalist Workflows
71
+ ### Step 3: Verify Installation
83
72
 
84
- ### 🔍 **Codebase Destruction**
73
+ ```bash
74
+ # Check which CLI agents are available
75
+ cli_agent_roster()
76
+ ```
85
77
 
86
- > Analyze actual files in your repository for security holes, performance disasters, and architectural nightmares.
78
+ ## Usage Examples
79
+
80
+ ### Analyze Your Codebase
87
81
 
88
82
  ```bash
89
- # Demolish your entire codebase
83
+ # Analyze entire project
90
84
  roast_codebase "/path/to/your/project"
91
85
 
92
- # Target specific modules for focused brutality
93
- roast_codebase "/src/auth" # Authentication vulnerabilities
94
- roast_codebase "/src/api/handlers" # API endpoint disasters
95
- roast_codebase "/components" # React component chaos
86
+ # Analyze specific modules
87
+ roast_codebase "/src/auth"
88
+ roast_codebase "/src/api/handlers"
96
89
  ```
97
90
 
98
- ---
99
-
100
- ### 💡 **Idea Obliteration**
101
-
102
- > Reality-check your startup dreams, product concepts, and technical decisions.
91
+ ### Validate Ideas
103
92
 
104
93
  ```bash
105
- # Startup idea destruction
94
+ # Evaluate a product concept
106
95
  roast_idea "A social network for developers to share code snippets"
107
96
 
108
- # Technical decision analysis
97
+ # Review technical decisions
109
98
  roast_idea "Migrating our monolith to microservices with Kubernetes"
110
-
111
- # Product feature validation
112
- roast_idea "Adding AI-powered code suggestions to our IDE"
113
99
  ```
114
100
 
115
- ---
116
-
117
- ### 🏗️ **Architecture Annihilation**
118
-
119
- > Find every scaling bottleneck, cost explosion, and operational nightmare in your system design.
101
+ ### Review Architecture
120
102
 
121
103
  ```bash
122
- # System architecture review
104
+ # System architecture analysis
123
105
  roast_architecture "Microservices with event sourcing and CQRS"
124
106
 
125
- # Infrastructure design analysis
107
+ # Infrastructure design review
126
108
  roast_architecture """
127
109
  API Gateway → Load Balancer → 3 Node.js services → PostgreSQL
128
110
  Redis for caching, Docker containers on AWS ECS
129
111
  """
130
112
  ```
131
113
 
132
- ---
133
-
134
- ### 🔒 **Security Demolition**
135
-
136
- > Expose authentication bypasses, injection vulnerabilities, and data leak opportunities.
114
+ ### Security Analysis
137
115
 
138
116
  ```bash
139
- # Authentication system analysis
117
+ # Authentication review
140
118
  roast_security "JWT tokens with user roles in localStorage"
141
119
 
142
- # API security review
120
+ # API security check
143
121
  roast_security "GraphQL API with dynamic queries and no rate limiting"
144
122
  ```
145
123
 
146
- ---
147
-
148
- ### 🤺 **Multi-Agent Warfare**
149
-
150
- > Deploy multiple CLI agents in adversarial combat for maximum destruction.
124
+ ### Compare Perspectives
151
125
 
152
126
  ```bash
153
- # Technical decision debate
127
+ # Get multiple viewpoints on technical decisions
154
128
  roast_cli_debate "Should we use TypeScript or Go for this API?"
155
129
 
156
- # Architecture comparison battle
130
+ # Compare architecture approaches
157
131
  roast_cli_debate "Microservices vs Monolith for our e-commerce platform"
158
132
  ```
159
133
 
160
- ---
161
-
162
- ### 🛠️ **Meta Commands**
163
-
164
- ```bash
165
- # Check which CLI agents are available
166
- cli_agent_roster()
167
- ```
168
-
169
134
  ## How It Works
170
135
 
171
- This MCP server orchestrates brutal feedback from locally installed CLI agents:
172
- - **Claude Code CLI** - Anthropic's code assistant with brutal system prompts
173
- - **Codex CLI** - OpenAI's code-focused model for technical criticism
174
- - **Gemini CLI** - Google's model for architectural and system analysis
136
+ This MCP server coordinates analysis from locally installed CLI agents:
137
+ - **Claude Code CLI** - Code review and architectural analysis
138
+ - **Codex CLI** - Security and technical implementation review
139
+ - **Gemini CLI** - System design and scalability analysis
175
140
 
176
- Each agent runs locally on your machine with custom brutal prompts to find real problems before production fails.
141
+ Each agent runs locally with direct file-system access, providing independent perspectives on your code and design decisions.
177
142
 
178
- **⏱️ Analysis Timeout:** 25 minutes default - thorough analysis takes time to find real issues. Complex codebases and architectural reviews need deep analysis to catch subtle problems that quick scans miss.
143
+ **Analysis time:** Up to 25 minutes for complex projects. Thorough analysis requires time to examine code patterns, dependencies, and architectural decisions.
179
144
 
180
- ## 📄 Pagination Support (v0.5.0+)
145
+ ## Pagination for Large Results
181
146
 
182
- Handle enterprise-scale analyses that exceed Claude Code's 25K token limit:
147
+ For analyses that exceed your IDE's token limit:
183
148
 
184
149
  ```bash
185
- # Enable pagination for large codebases
150
+ # Set chunk size for large codebases
186
151
  roast_codebase({targetPath: "/monorepo", limit: 20000})
187
152
 
188
- # Continue reading from where you left off
153
+ # Continue from where you left off
189
154
  roast_codebase({targetPath: "/monorepo", offset: 20000, limit: 20000})
190
155
 
191
- # Smart chunking preserves readability
156
+ # Use cursor-based navigation
192
157
  roast_codebase({targetPath: "/complex-system", cursor: "offset:25000"})
193
158
  ```
194
159
 
195
- **Features:**
196
- - **Smart Boundary Detection** - Preserves paragraphs and sentences
197
- - **Token Estimation** - Real-time cost awareness (~4 chars = 1 token)
198
- - **Rich Metadata** - Progress indicators and continuation instructions
199
- - **Configurable Chunks** - 1K to 100K characters per response
160
+ Features:
161
+ - Smart boundary detection (preserves paragraphs and sentences)
162
+ - Token estimation (~4 chars = 1 token)
163
+ - Progress indicators
164
+ - Configurable chunk size (1K to 100K characters)
200
165
 
201
166
  ## Tools
202
167
 
203
- ### Code & Architecture Analysis
204
- | Tool | What gets destroyed | CLI Agents Used |
205
- |------|-------------------|-----------------|
206
- | `roast_codebase` | Security holes, performance disasters, maintainability nightmares in actual files | All available |
207
- | `roast_file_structure` | Directory chaos, naming disasters, structural nightmares | All available |
208
- | `roast_dependencies` | Version conflicts, security vulns, dependency hell | All available |
209
- | `roast_git_history` | Commit disasters, branching chaos, collaboration failures | All available |
210
- | `roast_test_coverage` | Testing gaps, quality blind spots, coverage lies | All available |
211
-
212
- ### Conceptual Analysis
213
- | Tool | What gets destroyed | CLI Agents Used |
214
- |------|-------------------|-----------------|
215
- | `roast_idea` | Why imagination fails to become reality | All available |
216
- | `roast_architecture` | Scaling failures, cost explosions, operational complexity | All available |
217
- | `roast_research` | Methodological flaws, irreproducible results, statistical crimes | All available |
218
- | `roast_security` | Attack vectors, authentication bypasses, data leaks | All available |
219
- | `roast_product` | UX disasters, adoption barriers, user abandonment | All available |
220
- | `roast_infrastructure` | Single points of failure, hidden costs, 3AM outages | All available |
221
-
222
- ### Meta Tools
223
- | Tool | What it does |
224
- |------|--------------|
225
- | `roast_cli_debate` | Multiple CLI agents argue until truth emerges |
226
- | `cli_agent_roster` | Shows which CLI agents are available on your system |
227
-
228
- ## CLI Agent Selection
229
-
230
- The system automatically detects and uses available CLI agents:
168
+ ### Code & Architecture
169
+
170
+ | Tool | Analyzes |
171
+ |------|----------|
172
+ | `roast_codebase` | Security vulnerabilities, performance issues, code quality |
173
+ | `roast_file_structure` | Directory organization, naming conventions, structure |
174
+ | `roast_dependencies` | Version conflicts, security vulnerabilities, compatibility |
175
+ | `roast_git_history` | Commit quality, branching strategy, collaboration patterns |
176
+ | `roast_test_coverage` | Test coverage, quality gaps, testing strategy |
177
+
178
+ ### Design & Planning
179
+
180
+ | Tool | Analyzes |
181
+ |------|----------|
182
+ | `roast_idea` | Feasibility, market fit, implementation challenges |
183
+ | `roast_architecture` | Scalability, cost, operational complexity |
184
+ | `roast_research` | Methodology, reproducibility, statistical validity |
185
+ | `roast_security` | Attack vectors, authentication, authorization |
186
+ | `roast_product` | UX, adoption barriers, user needs |
187
+ | `roast_infrastructure` | Reliability, scaling, operational overhead |
188
+
189
+ ### Utilities
190
+
191
+ | Tool | Purpose |
192
+ |------|---------|
193
+ | `roast_cli_debate` | Multi-agent discussion from different perspectives |
194
+ | `cli_agent_roster` | Show available CLI agents on your system |
195
+
196
+ ## Advanced Usage
197
+
198
+ ### Choose Specific CLI Agents
231
199
 
232
200
  ```bash
233
- # Use specific CLI agent
201
+ # Use a specific agent
234
202
  roast_codebase(targetPath="/src", preferredCLI="claude")
235
203
 
236
- # Let system choose based on analysis type
237
- roast_security "/auth/module" # Prefers Codex for security
204
+ # System automatically selects best agent for task
205
+ roast_security "/auth/module" # Typically uses Codex
238
206
 
239
- # Force multi-agent analysis (default)
240
- roast_idea "..." # All available agents analyze in parallel
207
+ # Multi-agent analysis (default)
208
+ roast_idea "..." # All available agents provide perspectives
241
209
  ```
242
210
 
243
- ### Smart Selection Rules
244
-
245
- Different CLI agents excel at different analysis types:
246
- - **Code review**: Claude > Codex > Gemini
247
- - **Architecture**: Gemini > Claude > Codex
248
- - **Security**: Codex > Claude > Gemini
249
- - **Research**: Claude > Gemini > Codex
211
+ ### Agent Strengths
250
212
 
251
- ## Why This Works
213
+ Different agents have different strengths:
214
+ - **Code review**: Claude, Codex, Gemini
215
+ - **Architecture**: Gemini, Claude, Codex
216
+ - **Security**: Codex, Claude, Gemini
217
+ - **Research**: Claude, Gemini, Codex
252
218
 
253
- **Problem:** AI optimizes for engagement, not truth.
254
- **Solution:** Deploy multiple local CLI agents with adversarial perspectives.
255
- **Result:** Brutal honesty through systematic destruction before expensive failures.
219
+ ## Why Multiple Perspectives
256
220
 
257
- Your code will fail. Your startup will struggle. Better to learn this from brutal CLI agents than from production outages at 3AM.
221
+ Each CLI agent brings a different approach to analysis:
222
+ - Different training data and focus areas
223
+ - Independent evaluation of the same code
224
+ - Varied perspectives on technical tradeoffs
258
225
 
259
- The only AI that prevents disasters instead of causing them.
226
+ Getting multiple viewpoints helps identify issues that a single perspective might miss.
260
227
 
261
228
  ---
262
229
 
263
- Local CLI agents → Brutal system prompts → Parallel execution → Adversarial synthesis → Production survival
230
+ **License:** MIT
231
+ **Issues:** https://github.com/ejmockler/brutalist-mcp/issues
@@ -12,7 +12,7 @@ import { TOOL_CONFIGS } from './tool-definitions.js';
12
12
  import { extractPaginationParams, parseCursor, PAGINATION_DEFAULTS, ResponseChunker, createPaginationMetadata, formatPaginationStatus, estimateTokenCount } from './utils/pagination.js';
13
13
  import { ResponseCache } from './utils/response-cache.js';
14
14
  // Use environment variable or fallback to manual version
15
- const PACKAGE_VERSION = process.env.npm_package_version || "0.4.4";
15
+ const PACKAGE_VERSION = process.env.npm_package_version || "0.6.12";
16
16
  export class BrutalistServer {
17
17
  server;
18
18
  config;
@@ -373,9 +373,9 @@ export class BrutalistServer {
373
373
  roster += "## Pagination Support (NEW in v0.5.2)\n";
374
374
  roster += "**All tools now support intelligent pagination:**\n";
375
375
  roster += "- Analysis results are cached with 2-hour TTL\n";
376
- roster += "- Use `analysis_id` from response to paginate without re-running\n";
376
+ roster += "- Use `context_id` from response to resume conversation\n";
377
377
  roster += "- Smart text chunking preserves readability\n";
378
- roster += "- Example: `roast_codebase(analysis_id: 'a3f5c2d8', offset: 25000)`\n\n";
378
+ roster += "- Example: `roast_codebase(context_id: 'a3f5c2d8', offset: 25000)`\n\n";
379
379
  roster += "## Brutalist Philosophy\n";
380
380
  roster += "*All tools use CLI agents with brutal system prompts for maximum reality-based criticism.*\n";
381
381
  return {
@@ -445,13 +445,13 @@ export class BrutalistServer {
445
445
  const explicitPaginationRequested = args.offset !== undefined ||
446
446
  args.limit !== undefined ||
447
447
  args.cursor !== undefined ||
448
- args.analysis_id !== undefined;
449
- logger.info(`🔧 DEBUG: explicitPaginationRequested=${explicitPaginationRequested}, offset=${args.offset}, limit=${args.limit}, cursor=${args.cursor}, analysis_id=${args.analysis_id}`);
450
- // Check cache if analysis_id provided
451
- if (args.analysis_id && !args.force_refresh) {
452
- const cachedContent = await this.responseCache.get(args.analysis_id, sessionId);
448
+ args.context_id !== undefined;
449
+ logger.info(`🔧 DEBUG: explicitPaginationRequested=${explicitPaginationRequested}, offset=${args.offset}, limit=${args.limit}, cursor=${args.cursor}, context_id=${args.context_id}`);
450
+ // Check cache if context_id provided
451
+ if (args.context_id && !args.force_refresh) {
452
+ const cachedContent = await this.responseCache.get(args.context_id, sessionId);
453
453
  if (cachedContent) {
454
- logger.info(`🎯 Cache HIT for analysis_id: ${args.analysis_id}`);
454
+ logger.info(`🎯 Cache HIT for context_id: ${args.context_id}`);
455
455
  const cachedResult = {
456
456
  success: true,
457
457
  responses: [{
@@ -461,14 +461,14 @@ export class BrutalistServer {
461
461
  executionTime: 0
462
462
  }]
463
463
  };
464
- return this.formatToolResponse(cachedResult, args.verbose, paginationParams, args.analysis_id, explicitPaginationRequested);
464
+ return this.formatToolResponse(cachedResult, args.verbose, paginationParams, args.context_id, explicitPaginationRequested);
465
465
  }
466
466
  else {
467
- logger.warn(`❌ Cache MISS for analysis_id: ${args.analysis_id}, session: ${sessionId}`);
468
- // Don't silently re-run - analysis_id should always hit cache or error
469
- throw new Error(`Analysis ID "${args.analysis_id}" not found in cache. ` +
467
+ logger.warn(`❌ Cache MISS for context_id: ${args.context_id}, session: ${sessionId}`);
468
+ // Don't silently re-run - context_id should always hit cache or error
469
+ throw new Error(`Context ID "${args.context_id}" not found in cache. ` +
470
470
  `It may have expired (2 hour TTL) or belong to a different session. ` +
471
- `Remove analysis_id parameter to run a new analysis.`);
471
+ `Remove context_id parameter to run a new analysis.`);
472
472
  }
473
473
  }
474
474
  // Generate cache key for this request
@@ -482,12 +482,12 @@ export class BrutalistServer {
482
482
  if (!args.force_refresh) {
483
483
  const cachedContent = await this.responseCache.get(cacheKey, sessionId);
484
484
  if (cachedContent) {
485
- // Get existing analysis_id or create new alias
486
- const existingAnalysisId = this.responseCache.findAnalysisIdForKey(cacheKey);
487
- const analysisId = existingAnalysisId
488
- ? this.responseCache.createAlias(existingAnalysisId, cacheKey)
489
- : this.responseCache.generateAnalysisId(cacheKey);
490
- logger.info(`🎯 Cache hit for new request, using analysis_id: ${analysisId}`);
485
+ // Get existing context_id or create new alias
486
+ const existingContextId = this.responseCache.findContextIdForKey(cacheKey);
487
+ const contextId = existingContextId
488
+ ? this.responseCache.createAlias(existingContextId, cacheKey)
489
+ : this.responseCache.generateContextId(cacheKey);
490
+ logger.info(`🎯 Cache hit for new request, using context_id: ${contextId}`);
491
491
  const cachedResult = {
492
492
  success: true,
493
493
  responses: [{
@@ -497,7 +497,7 @@ export class BrutalistServer {
497
497
  executionTime: 0
498
498
  }]
499
499
  };
500
- return this.formatToolResponse(cachedResult, args.verbose, paginationParams, analysisId, explicitPaginationRequested);
500
+ return this.formatToolResponse(cachedResult, args.verbose, paginationParams, contextId, explicitPaginationRequested);
501
501
  }
502
502
  }
503
503
  // Build context with custom builder if available
@@ -509,7 +509,7 @@ export class BrutalistServer {
509
509
  // Run the analysis
510
510
  const result = await this.executeBrutalistAnalysis(config.analysisType, primaryArg, config.systemPrompt, context, args.workingDirectory, args.preferredCLI, args.verbose, args.models, progressToken, sessionId, requestId);
511
511
  // Cache the result if successful
512
- let analysisId;
512
+ let contextId;
513
513
  if (result.success && result.responses.length > 0) {
514
514
  const fullContent = this.extractFullContent(result);
515
515
  if (fullContent) {
@@ -519,14 +519,14 @@ export class BrutalistServer {
519
519
  acc[field] = args[field];
520
520
  return acc;
521
521
  }, {});
522
- const { analysisId: newId } = await this.responseCache.set(cacheData, fullContent, cacheKey, sessionId, // NEW: Bind to session
523
- requestId // NEW: Track request
522
+ const { contextId: newId } = await this.responseCache.set(cacheData, fullContent, cacheKey, sessionId, // Bind to session
523
+ requestId // Track request
524
524
  );
525
- analysisId = newId;
526
- logger.info(`✅ Cached analysis result with ID: ${analysisId} for session: ${sessionId?.substring(0, 8)}`);
525
+ contextId = newId;
526
+ logger.info(`✅ Cached analysis result with context ID: ${contextId} for session: ${sessionId?.substring(0, 8)}`);
527
527
  }
528
528
  }
529
- return this.formatToolResponse(result, args.verbose, paginationParams, analysisId, explicitPaginationRequested);
529
+ return this.formatToolResponse(result, args.verbose, paginationParams, contextId, explicitPaginationRequested);
530
530
  }
531
531
  catch (error) {
532
532
  return this.formatErrorResponse(error);
@@ -814,7 +814,7 @@ Remember: You are ${currentAgent.toUpperCase()}, passionate advocate for ${assig
814
814
  }
815
815
  return null;
816
816
  }
817
- formatToolResponse(result, verbose = false, paginationParams, analysisId, explicitPaginationRequested = false) {
817
+ formatToolResponse(result, verbose = false, paginationParams, contextId, explicitPaginationRequested = false) {
818
818
  logger.info(`🔧 DEBUG: formatToolResponse called with synthesis length: ${result.synthesis?.length || 0}`);
819
819
  logger.info(`🔧 DEBUG: result.success=${result.success}, responses.length=${result.responses?.length || 0}`);
820
820
  logger.info(`🔧 DEBUG: pagination params:`, paginationParams);
@@ -846,21 +846,21 @@ Remember: You are ${currentAgent.toUpperCase()}, passionate advocate for ${assig
846
846
  offset: 0,
847
847
  limit: PAGINATION_DEFAULTS.DEFAULT_LIMIT_TOKENS // Use token-based limit
848
848
  };
849
- return this.formatPaginatedResponse(primaryContent, forcedParams, result, verbose, analysisId);
849
+ return this.formatPaginatedResponse(primaryContent, forcedParams, result, verbose, contextId);
850
850
  }
851
851
  else if (paginationParams) {
852
852
  logger.info(`🔧 DEBUG: Applying pagination (explicitly requested)`);
853
- return this.formatPaginatedResponse(primaryContent, paginationParams, result, verbose, analysisId);
853
+ return this.formatPaginatedResponse(primaryContent, paginationParams, result, verbose, contextId);
854
854
  }
855
855
  }
856
856
  // Non-paginated response (only for content that fits within token limit)
857
857
  if (primaryContent) {
858
858
  logger.info(`🔧 DEBUG: Returning full response (${estimatedTokens} tokens < ${maxTokensWithoutPagination} limit)`);
859
- // Include analysis_id even for non-paginated responses (for future pagination/caching)
859
+ // Include context_id even for non-paginated responses (for future pagination/caching)
860
860
  let responseText = '';
861
- if (analysisId) {
861
+ if (contextId) {
862
862
  responseText += `# Brutalist Analysis Results\n\n`;
863
- responseText += `**🔑 Analysis ID:** ${analysisId}\n\n`;
863
+ responseText += `**🔑 Context ID:** ${contextId}\n\n`;
864
864
  responseText += `---\n\n`;
865
865
  responseText += primaryContent;
866
866
  }
@@ -896,7 +896,7 @@ Remember: You are ${currentAgent.toUpperCase()}, passionate advocate for ${assig
896
896
  }]
897
897
  };
898
898
  }
899
- formatPaginatedResponse(content, paginationParams, result, verbose, analysisId) {
899
+ formatPaginatedResponse(content, paginationParams, result, verbose, contextId) {
900
900
  // Using imported pagination utilities
901
901
  const offset = paginationParams.offset || 0;
902
902
  // Convert character-based limit to token-based limit (1 token ≈ 4 chars)
@@ -935,20 +935,20 @@ Remember: You are ${currentAgent.toUpperCase()}, passionate advocate for ${assig
935
935
  // Show pagination metadata
936
936
  const needsPagination = pagination.totalChunks > 1 || pagination.hasMore;
937
937
  const isFirstRequest = offset === 0;
938
- // Always show analysis_id on first request for future pagination
939
- if (isFirstRequest && analysisId) {
940
- paginatedText += `**🔑 Analysis ID:** ${analysisId}\n`;
938
+ // Always show context_id on first request for future pagination
939
+ if (isFirstRequest && contextId) {
940
+ paginatedText += `**🔑 Context ID:** ${contextId}\n`;
941
941
  paginatedText += `**🔢 Token Estimate:** ~${totalTokens.toLocaleString()} tokens (total)\n\n`;
942
942
  }
943
943
  if (needsPagination) {
944
944
  paginatedText += `**📊 Pagination Status:** ${statusLine}\n`;
945
- if (!isFirstRequest && analysisId) {
946
- paginatedText += `**🔑 Analysis ID:** ${analysisId}\n`;
945
+ if (!isFirstRequest && contextId) {
946
+ paginatedText += `**🔑 Context ID:** ${contextId}\n`;
947
947
  }
948
948
  paginatedText += `**🔢 Token Estimate:** ~${chunkTokens.toLocaleString()} tokens (chunk) / ~${totalTokens.toLocaleString()} tokens (total)\n\n`;
949
949
  if (pagination.hasMore) {
950
- if (analysisId) {
951
- paginatedText += `**⏭️ Continue Reading:** Use \`analysis_id: "${analysisId}", offset: ${endOffset}\`\n\n`;
950
+ if (contextId) {
951
+ paginatedText += `**⏭️ Continue Reading:** Use \`context_id: "${contextId}", offset: ${endOffset}\`\n\n`;
952
952
  }
953
953
  else {
954
954
  paginatedText += `**⏭️ Continue Reading:** Use \`offset: ${endOffset}\` for next chunk\n\n`;
@@ -963,8 +963,8 @@ Remember: You are ${currentAgent.toUpperCase()}, passionate advocate for ${assig
963
963
  paginatedText += `\n\n---\n\n`;
964
964
  if (pagination.hasMore) {
965
965
  paginatedText += `📖 **End of chunk ${pagination.chunkIndex}/${pagination.totalChunks}**\n`;
966
- if (analysisId) {
967
- paginatedText += `🔄 To continue: Include \`analysis_id: "${analysisId}"\` with \`offset: ${endOffset}\` in next request`;
966
+ if (contextId) {
967
+ paginatedText += `🔄 To continue: Include \`context_id: "${contextId}"\` with \`offset: ${endOffset}\` in next request`;
968
968
  }
969
969
  else {
970
970
  paginatedText += `🔄 To continue: Use same tool with \`offset: ${endOffset}\``;