@triedotdev/mcp 1.0.18 → 1.0.20

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
@@ -8,11 +8,12 @@
8
8
 
9
9
  - **20 Built-in Agents** - Security, Privacy, SOC 2, Legal, Architecture, Performance, E2E, Visual QA, Data Flow, Agent Smith, and more
10
10
  - **Super Reviewer** - Interactive PR reviews: walks through changes file-by-file with AI guidance
11
- - **Agent Smith v2.0** - Ultimate vibe code enforcer: 38 hunters targeting AI-generated anti-patterns, file-level analysis, cross-file detection, persistent memory
11
+ - **Agent Smith** - Ultimate AI code enforcer: 38 hunters targeting AI-generated anti-patterns, file-level analysis, cross-file detection, persistent memory
12
12
  - **Parallel Execution** - All agents run simultaneously for fast scans
13
13
  - **YOLO Mode** - Autonomous auto-fixing as you code
14
14
  - **Custom Agents** - Create agents from PDFs, docs, or style guides
15
- - **No API Key Required** - Works with any MCP-compatible AI tool (Cursor, Claude Code, VS Code)
15
+ - **Works Everywhere** - Works with any MCP-compatible AI tool (Cursor, Claude Code, VS Code)
16
+ - **AI-Enhanced Mode** - Optional: Set `ANTHROPIC_API_KEY` for deeper AI analysis
16
17
  - **Smart Triaging** - Only activates relevant agents based on code context
17
18
  - **Docker Support** - Run in containers for CI/CD or isolated environments
18
19
 
@@ -47,6 +48,54 @@ claude mcp add Trie --scope user -- npx @triedotdev/mcp
47
48
 
48
49
  **Restart Claude Code after adding the MCP server** for changes to take effect.
49
50
 
51
+ ## AI-Enhanced Mode (Optional)
52
+
53
+ Trie agents work in two modes:
54
+
55
+ ### Pattern-Only Mode (Default)
56
+ - Fast pattern detection using regex and static analysis
57
+ - No API key required
58
+ - Still finds many issues
59
+
60
+ ### AI-Enhanced Mode
61
+ - Pattern detection + AI validation and expansion
62
+ - Validates findings (reduces false positives)
63
+ - Finds deeper issues (logic bugs, race conditions)
64
+ - Provides intelligent, contextual fixes
65
+ - Requires `ANTHROPIC_API_KEY`
66
+
67
+ ### Setup API Key
68
+
69
+ **Option 1: Environment Variable**
70
+ ```bash
71
+ export ANTHROPIC_API_KEY=sk-ant-...
72
+ ```
73
+
74
+ **Option 2: MCP Server Config (Cursor)**
75
+ ```json
76
+ {
77
+ "mcpServers": {
78
+ "Trie": {
79
+ "command": "npx",
80
+ "args": ["@triedotdev/mcp"],
81
+ "env": {
82
+ "ANTHROPIC_API_KEY": "sk-ant-..."
83
+ }
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ **Option 3: MCP Server Config (Claude Code)**
90
+ ```bash
91
+ claude mcp add Trie --scope user -e ANTHROPIC_API_KEY=sk-ant-... -- npx @triedotdev/mcp
92
+ ```
93
+
94
+ When AI is enabled, you'll see:
95
+ - `🤖 AI-powered analysis enabled` in the output
96
+ - `[AI VALIDATED]` and `[AI FOUND]` tags on issues
97
+ - Richer fix recommendations
98
+
50
99
  ## Usage
51
100
 
52
101
  Once configured, just ask your AI assistant:
@@ -90,9 +139,9 @@ Use trie_pr_review with pr:"12345"
90
139
 
91
140
  **Manually invoked** - Use `trie_agent_smith` directly. Not included in `trie_scan`.
92
141
 
93
- *"I'm going to be honest with you... I hate this vibe code."*
142
+ *"I'm going to be honest with you... I hate this AI code."*
94
143
 
95
- Agent Smith v2.0 is the **ultimate vibe code enforcer** — specifically designed to hunt down AI-generated code anti-patterns from Cursor, v0, Lovable, Bolt, and other AI tools.
144
+ Agent Smith v2.0 is the **ultimate AI code enforcer** — specifically designed to hunt down AI-generated code anti-patterns from Cursor, v0, Lovable, Bolt, and other AI tools.
96
145
 
97
146
  ```
98
147
  Use trie_agent_smith
@@ -184,23 +233,28 @@ Use trie_smith
184
233
  | `emoji-overflow-hunter` | Any emoji usage | Use proper icons (Lucide, Heroicons) |
185
234
  | `inter-font-hunter` | Inter/system-ui font | Try Space Grotesk, DM Sans, Outfit |
186
235
 
187
- ### 3-Phase Analysis
236
+ ### How Agent Smith Works
237
+
238
+ Agent Smith uses a **hybrid pattern + AI architecture**:
239
+
240
+ **Phase 1: Pattern Detection (Fast, ~0.1s)**
241
+ - 38 specialized regex hunters scan files in parallel
242
+ - File-level metrics (giant files, hook counts, import chaos)
243
+ - Cross-file pattern detection (issues appearing in 5+ files)
188
244
 
189
- 1. **Pattern Hunting** - 38 sub-agents scan every file in parallel
190
- 2. **File-Level Analysis** - Detects structural issues:
191
- - Giant files (500+ lines)
192
- - State explosion (10+ useState)
193
- - Effect hell (5+ useEffect)
194
- - Any explosion (5+ `any` types)
195
- - Console flood (10+ console.log)
196
- - Import chaos (30+ imports)
197
- 3. **Cross-File Detection** - Patterns appearing in 5+ files flagged as codebase-wide issues
245
+ **Phase 2: AI Enhancement (If API key is set, ~5-10s)**
246
+ - Validates pattern findings (TRUE_POSITIVE vs FALSE_POSITIVE)
247
+ - Finds deeper issues that patterns miss (logic bugs, race conditions)
248
+ - Provides "inevitability scores" (0-100) for prioritization
249
+ - Generates specific, copy-paste-ready fixes
250
+ - Adds Agent Smith philosophical commentary
198
251
 
199
252
  ### What Makes Agent Smith Different
200
253
 
201
254
  | Feature | Description |
202
255
  |---------|-------------|
203
- | **Vibe Code Focus** | Specifically targets patterns AI tools commonly get wrong |
256
+ | **Hybrid AI** | Fast regex detection + deep AI reasoning on findings |
257
+ | **AI Code Focus** | Specifically targets patterns AI tools commonly get wrong |
204
258
  | **Multiplier Effect** | Finds one issue → searches for EVERY similar instance |
205
259
  | **Persistent Memory** | Remembers dismissed issues, brings them back if they multiply |
206
260
  | **Inevitability Score** | 0-100 rating of how likely to cause production problems |
@@ -393,7 +447,7 @@ docker-compose up
393
447
  | Agent | Command | What It Does |
394
448
  |-------|---------|--------------|
395
449
  | **Super Reviewer** | `trie_pr_review` | Interactive PR review: walks through changes, explains code, finds issues |
396
- | **Agent Smith** | `trie_agent_smith` | Ultimate vibe code enforcer: 38 hunters, file analysis, cross-file detection |
450
+ | **Agent Smith** | `trie_agent_smith` | Ultimate AI code enforcer: 38 hunters, file analysis, cross-file detection |
397
451
  | **Comprehension** | `trie_explain` | Plain-language explanations of code, issues, or risks |
398
452
 
399
453
  **Note:** Super Reviewer and Agent Smith are manually invoked agents. They don't run during `trie_scan`; use their dedicated commands directly.
@@ -414,7 +468,7 @@ Custom agents automatically activate during scans based on their rules.
414
468
  |------|-------------|
415
469
  | `trie_scan` | Intelligent scan with automatic agent selection |
416
470
  | `trie_pr_review` | Interactive PR review - walks through changes file-by-file |
417
- | `trie_agent_smith` | Ultimate vibe code enforcer - 38 hunters, file analysis, cross-file detection |
471
+ | `trie_agent_smith` | Ultimate AI code enforcer - 38 hunters, file analysis, cross-file detection |
418
472
  | `trie_fix` | Apply high-confidence fixes |
419
473
  | `trie_explain` | Plain-language explanations |
420
474
  | `trie_watch` | Continuous scanning mode |
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  AgentSmithAgent,
3
3
  SUB_AGENT_PATTERNS
4
- } from "./chunk-WSBTQJMH.js";
4
+ } from "./chunk-EEVALBHC.js";
5
5
  import "./chunk-DGUM43GV.js";
6
6
  export {
7
7
  AgentSmithAgent,
8
8
  SUB_AGENT_PATTERNS
9
9
  };
10
- //# sourceMappingURL=agent-smith-PRK7TYEI.js.map
10
+ //# sourceMappingURL=agent-smith-BKHHC4G6.js.map