@triedotdev/mcp 1.0.28 โ 1.0.30
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/QUICK_START.md +10 -12
- package/README.md +50 -456
- package/dist/{chunk-BICD36UW.js โ chunk-B6MTR6IG.js} +7 -1277
- package/dist/chunk-B6MTR6IG.js.map +1 -0
- package/dist/cli/main.js +5 -24
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +9 -62
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/index.js +1359 -215
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-BICD36UW.js.map +0 -1
package/QUICK_START.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Quick Start Guide
|
|
2
2
|
|
|
3
|
-
Get Trie Agent up and running in minutes to start scanning and
|
|
3
|
+
Get Trie Agent up and running in minutes to start scanning and reviewing AI-generated code.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
@@ -104,11 +104,11 @@ Use trie_scan to analyze the current file
|
|
|
104
104
|
3. **Review results** - Trie will show:
|
|
105
105
|
- Risk level and activated agents
|
|
106
106
|
- Critical issues requiring review
|
|
107
|
-
-
|
|
107
|
+
- Suggested fix prompts for AI
|
|
108
108
|
- Plain-language explanations
|
|
109
|
-
4. **
|
|
109
|
+
4. **Fix issues:**
|
|
110
110
|
```
|
|
111
|
-
|
|
111
|
+
Apply the suggested fixes for the critical issues
|
|
112
112
|
```
|
|
113
113
|
5. **Generate tests:**
|
|
114
114
|
```
|
|
@@ -118,10 +118,10 @@ Use trie_scan to analyze the current file
|
|
|
118
118
|
## Available Tools
|
|
119
119
|
|
|
120
120
|
- **`trie_scan`** - Scan code with intelligent agent selection
|
|
121
|
-
- **`trie_fix`** -
|
|
121
|
+
- **`trie_fix`** - Generate high-confidence fix prompts
|
|
122
122
|
- **`trie_explain`** - Get plain-language explanations of code/issues
|
|
123
123
|
- **`trie_test`** - Generate tests or check coverage
|
|
124
|
-
- **`
|
|
124
|
+
- **`trie_watch`** - Monitor files for changes and report issues
|
|
125
125
|
- **`trie_register_agent`** - Add custom agents
|
|
126
126
|
|
|
127
127
|
## Example Output
|
|
@@ -140,8 +140,8 @@ Results:
|
|
|
140
140
|
Score: 72/100 (needs work)
|
|
141
141
|
|
|
142
142
|
๐ด 2 Critical Issues (require your review)
|
|
143
|
-
๐ก 3 Serious Issues
|
|
144
|
-
๐ต 2 Moderate Issues
|
|
143
|
+
๐ก 3 Serious Issues
|
|
144
|
+
๐ต 2 Moderate Issues
|
|
145
145
|
|
|
146
146
|
Critical Issues Preview:
|
|
147
147
|
1. Password stored without hashing (auth/signup.ts:23)
|
|
@@ -163,8 +163,7 @@ Create `.trie/config.json` in your project root to customize behavior:
|
|
|
163
163
|
"critical": 70,
|
|
164
164
|
"high": 40,
|
|
165
165
|
"medium": 20
|
|
166
|
-
}
|
|
167
|
-
"autoFixConfidence": 0.95
|
|
166
|
+
}
|
|
168
167
|
},
|
|
169
168
|
"agents": {
|
|
170
169
|
"builtin": {
|
|
@@ -215,14 +214,13 @@ Update your MCP config with the correct path.
|
|
|
215
214
|
|
|
216
215
|
- **Try different code patterns** - Test with auth, payments, UI components
|
|
217
216
|
- **Explore agents** - See which agents activate for different code types
|
|
218
|
-
- **Use auto-fix** - Let Trie fix high-confidence issues automatically
|
|
219
217
|
- **Generate tests** - Create comprehensive test suites
|
|
220
218
|
- **Add custom agents** - Extend Trie with your own review logic
|
|
221
219
|
|
|
222
220
|
## Support
|
|
223
221
|
|
|
224
222
|
- ๐ **Documentation**: [trie.dev/docs](https://trie.dev/docs)
|
|
225
|
-
- ๐ **Issues**: [GitHub Issues](https://github.com/Trie-OS/
|
|
223
|
+
- ๐ **Issues**: [GitHub Issues](https://github.com/Trie-OS/Trie-Agent/issues)
|
|
226
224
|
- ๐ฌ **Community**: [Discord](https://discord.gg/trie-ai)
|
|
227
225
|
|
|
228
226
|
---
|
package/README.md
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
- [Special Agents](#special-agents)
|
|
19
19
|
- [Custom Agents](#custom-agents)
|
|
20
20
|
- [Configuration](#configuration)
|
|
21
|
-
- [Docker](#docker)
|
|
22
21
|
- [Team Collaboration](#team-collaboration)
|
|
23
22
|
- [License](#license)
|
|
24
23
|
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
|
|
42
41
|
| Feature | Description |
|
|
43
42
|
|---------|-------------|
|
|
44
|
-
| **
|
|
43
|
+
| **Watch Mode** | Automatically scan files as you code |
|
|
45
44
|
| **Custom Agents** | Create agents from PDFs, docs, or style guides |
|
|
46
45
|
| **Works Everywhere** | Auto-detects Cursor, Claude Code, OpenCode, VS Codeโadapts output automatically |
|
|
47
46
|
| **AI-Enhanced Mode** | Optional deeper analysis with `ANTHROPIC_API_KEY` |
|
|
@@ -53,7 +52,6 @@
|
|
|
53
52
|
| **CI/CD Integration** | GitHub Actions, pre-commit hooks, SARIF output |
|
|
54
53
|
| **Team Collaboration** | Issue assignment, Slack notifications, expertise-based routing |
|
|
55
54
|
| **VS Code Extension** | Inline diagnostics, quick-fix code actions, scan on save |
|
|
56
|
-
| **Docker Support** | Optimized multi-stage builds for containers |
|
|
57
55
|
|
|
58
56
|
---
|
|
59
57
|
|
|
@@ -132,14 +130,11 @@ Trie works in two modes:
|
|
|
132
130
|
|
|
133
131
|
**Enable AI mode:**
|
|
134
132
|
|
|
135
|
-
|
|
136
|
-
# Environment variable
|
|
137
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
133
|
+
**For MCP usage (Cursor/Claude Code):**
|
|
138
134
|
|
|
139
|
-
|
|
140
|
-
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
135
|
+
Add the API key to your MCP configuration:
|
|
141
136
|
|
|
142
|
-
|
|
137
|
+
```json
|
|
143
138
|
{
|
|
144
139
|
"mcpServers": {
|
|
145
140
|
"Trie": {
|
|
@@ -153,8 +148,28 @@ echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
|
153
148
|
}
|
|
154
149
|
```
|
|
155
150
|
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
**For CLI usage (terminal/CI):**
|
|
152
|
+
|
|
153
|
+
Add the API key to your project's `.env.local` file (in your project root):
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Then load it before running CLI commands:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Load environment variables
|
|
163
|
+
set -a; source .env.local; set +a
|
|
164
|
+
|
|
165
|
+
# Now run CLI commands
|
|
166
|
+
trie-agent scan
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
> **Important:**
|
|
170
|
+
> - **MCP config** (`env` in mcp.json) only applies to the MCP server process launched by Cursor/Claude Code
|
|
171
|
+
> - **CLI commands** (`trie-agent scan`, `trie-agent watch`) need the key in your shell environment (via `.env.local` or `export`)
|
|
172
|
+
> - The MCP server and CLI are separate processes with separate environments
|
|
158
173
|
|
|
159
174
|
When AI is enabled, you'll see:
|
|
160
175
|
- `AI-powered analysis enabled` in output
|
|
@@ -165,16 +180,21 @@ When AI is enabled, you'll see:
|
|
|
165
180
|
|
|
166
181
|
## CLI
|
|
167
182
|
|
|
168
|
-
Trie includes a
|
|
183
|
+
Trie includes a CLI for terminal-based scanning and CI/CD integration. The CLI generates reports with actionable issuesโit does not auto-fix code. Use Cursor or Claude Code to apply fixes based on the reports.
|
|
184
|
+
|
|
185
|
+
> **Note:** The CLI is separate from MCP tools. Use MCP tools (`trie_scan`, `trie_watch`) when working inside Cursor/Claude Code. Use the CLI (`trie-agent scan`, `trie-agent watch`) for terminal/CI usage.
|
|
169
186
|
|
|
170
187
|
### Commands
|
|
171
188
|
|
|
172
189
|
```bash
|
|
173
|
-
# Basic scan
|
|
190
|
+
# Basic scan (generates report and exits)
|
|
174
191
|
trie-agent scan
|
|
175
192
|
|
|
193
|
+
# Watch for changes (continuously scans and reports)
|
|
194
|
+
trie-agent watch
|
|
195
|
+
|
|
176
196
|
# Scan specific directory
|
|
177
|
-
trie-agent scan --
|
|
197
|
+
trie-agent scan --dir ./src
|
|
178
198
|
|
|
179
199
|
# Scan specific files
|
|
180
200
|
trie-agent scan --files "src/api.ts,src/auth.ts"
|
|
@@ -182,66 +202,31 @@ trie-agent scan --files "src/api.ts,src/auth.ts"
|
|
|
182
202
|
# Run specific agents
|
|
183
203
|
trie-agent scan --agents security,privacy,bugs
|
|
184
204
|
|
|
185
|
-
# Output
|
|
186
|
-
trie-agent scan --format json --output
|
|
187
|
-
trie-agent scan --format sarif --output results.sarif
|
|
205
|
+
# Output JSON report
|
|
206
|
+
trie-agent scan --format json --output report.json
|
|
188
207
|
```
|
|
189
208
|
|
|
190
|
-
###
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
# Parallel execution (default: on)
|
|
194
|
-
trie-agent scan --parallel
|
|
195
|
-
|
|
196
|
-
# Enable caching (default: on)
|
|
197
|
-
trie-agent scan --cache
|
|
209
|
+
### CLI vs MCP Tools
|
|
198
210
|
|
|
199
|
-
|
|
200
|
-
|
|
211
|
+
| Use Case | Tool | When to Use |
|
|
212
|
+
|----------|------|-------------|
|
|
213
|
+
| **Interactive coding** | MCP tools (`trie_scan`, `trie_watch`) | Working inside Cursor/Claude Code |
|
|
214
|
+
| **Terminal/CI** | CLI (`trie-agent scan`, `trie-agent watch`) | Running from terminal, CI pipelines, scripts |
|
|
215
|
+
| **VS Code** | VS Code extension | Using VS Code (not Cursor/Claude Code) |
|
|
201
216
|
|
|
202
|
-
|
|
203
|
-
trie-agent scan --workers
|
|
217
|
+
Both generate the same reportsโthey're just different interfaces to the same scanning engine.
|
|
204
218
|
|
|
205
|
-
|
|
206
|
-
trie-agent scan --timeout 120000
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### Interactive Mode
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
# Terminal UI with real-time progress
|
|
213
|
-
trie-agent scan --interactive
|
|
214
|
-
```
|
|
219
|
+
---
|
|
215
220
|
|
|
216
|
-
|
|
217
|
-
- **Real-time progress bars** per agent
|
|
218
|
-
- **Issue browser** with keyboard navigation
|
|
219
|
-
- **Filters** by severity, agent, search
|
|
220
|
-
- **Multiple views**: overview, issues, agents, files
|
|
221
|
-
|
|
222
|
-
**Keyboard shortcuts:**
|
|
223
|
-
| Key | Action |
|
|
224
|
-
|-----|--------|
|
|
225
|
-
| `Tab` | Switch views |
|
|
226
|
-
| `โ/โ` | Navigate issues |
|
|
227
|
-
| `Enter` | View issue details |
|
|
228
|
-
| `f` | Filter issues |
|
|
229
|
-
| `s` | Toggle sort |
|
|
230
|
-
| `?` | Show help |
|
|
231
|
-
| `q` | Quit |
|
|
232
|
-
|
|
233
|
-
### Watch Mode (YOLO)
|
|
221
|
+
## How It Works
|
|
234
222
|
|
|
235
|
-
|
|
236
|
-
# Start daemon with auto-fixing
|
|
237
|
-
trie-yolo
|
|
223
|
+
Trie generates **actionable reports** with high-confidence issues. It does not auto-fix code. Instead:
|
|
238
224
|
|
|
239
|
-
|
|
240
|
-
|
|
225
|
+
1. **Trie scans** your code and generates a report with prioritized issues
|
|
226
|
+
2. **You review** the issues in the report (or share with Cursor/Claude Code)
|
|
227
|
+
3. **You (or Cursor/Claude Code)** apply fixes based on Trie's recommendations
|
|
241
228
|
|
|
242
|
-
|
|
243
|
-
trie-yolo --once
|
|
244
|
-
```
|
|
229
|
+
This keeps you in control while providing comprehensive issue detection. Trie focuses on **finding and reporting** issuesโyou decide how to fix them.
|
|
245
230
|
|
|
246
231
|
---
|
|
247
232
|
|
|
@@ -274,114 +259,12 @@ Runs on push to `main`/`develop`, PRs, and daily schedule (2 AM UTC).
|
|
|
274
259
|
|
|
275
260
|
Runs on every PRโfast, incremental scanning.
|
|
276
261
|
|
|
277
|
-
**Features:**
|
|
278
|
-
- Only scans changed files (efficient for large codebases)
|
|
279
|
-
- 5-minute timeout for quick feedback
|
|
280
|
-
- Agent Smith pattern detection
|
|
281
|
-
- Comments on PR if issues found
|
|
282
|
-
|
|
283
|
-
### Reusable Action
|
|
284
|
-
|
|
285
|
-
Use the action in any workflow:
|
|
286
|
-
|
|
287
|
-
```yaml
|
|
288
|
-
name: Security Check
|
|
289
|
-
on: [push, pull_request]
|
|
290
|
-
|
|
291
|
-
jobs:
|
|
292
|
-
scan:
|
|
293
|
-
runs-on: ubuntu-latest
|
|
294
|
-
steps:
|
|
295
|
-
- uses: actions/checkout@v4
|
|
296
|
-
|
|
297
|
-
- name: Trie Security Scan
|
|
298
|
-
uses: trie-dev/security-action@v1
|
|
299
|
-
with:
|
|
300
|
-
agents: security,privacy,bugs
|
|
301
|
-
fail-on: critical
|
|
302
|
-
format: sarif
|
|
303
|
-
upload-sarif: true
|
|
304
|
-
comment-pr: true
|
|
305
|
-
parallel: true
|
|
306
|
-
cache: true
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
**Inputs:**
|
|
310
|
-
|
|
311
|
-
| Input | Default | Description |
|
|
312
|
-
|-------|---------|-------------|
|
|
313
|
-
| `agents` | `security,privacy,bugs` | Comma-separated agent list |
|
|
314
|
-
| `fail-on` | `critical` | Fail threshold: `critical`, `serious`, `moderate`, `low` |
|
|
315
|
-
| `format` | `sarif` | Output format: `json`, `sarif`, `console` |
|
|
316
|
-
| `upload-sarif` | `true` | Upload to GitHub Security tab |
|
|
317
|
-
| `comment-pr` | `true` | Comment results on PRs |
|
|
318
|
-
| `parallel` | `true` | Run agents in parallel |
|
|
319
|
-
| `cache` | `true` | Enable result caching |
|
|
320
|
-
|
|
321
|
-
**Outputs:**
|
|
322
|
-
|
|
323
|
-
| Output | Description |
|
|
324
|
-
|--------|-------------|
|
|
325
|
-
| `results-file` | Path to scan results |
|
|
326
|
-
| `critical-count` | Number of critical issues |
|
|
327
|
-
| `serious-count` | Number of serious issues |
|
|
328
|
-
| `total-count` | Total issues found |
|
|
329
|
-
| `passed` | Whether scan passed |
|
|
330
|
-
|
|
331
|
-
### Required Secrets
|
|
332
|
-
|
|
333
|
-
| Secret | Required | Description |
|
|
334
|
-
|--------|----------|-------------|
|
|
335
|
-
| `ANTHROPIC_API_KEY` | Optional | Enables AI-enhanced scanning |
|
|
336
|
-
|
|
337
262
|
---
|
|
338
263
|
|
|
339
264
|
## VS Code Extension
|
|
340
265
|
|
|
341
266
|
Native VS Code extension with inline diagnostics and quick fixes.
|
|
342
267
|
|
|
343
|
-
### Features
|
|
344
|
-
|
|
345
|
-
- **Inline Diagnostics** โ Issues appear as squiggly underlines in editor
|
|
346
|
-
- **Quick-fix Code Actions** โ "Copy suggested fix" for each issue
|
|
347
|
-
- **Scan on Save** โ Automatically scan files when saved
|
|
348
|
-
- **Workspace Scanning** โ Scan entire workspace with one command
|
|
349
|
-
|
|
350
|
-
### Installation
|
|
351
|
-
|
|
352
|
-
```bash
|
|
353
|
-
cd vscode-extension
|
|
354
|
-
npm install
|
|
355
|
-
npm run compile
|
|
356
|
-
# Then "Run Extension" from VS Code debugger
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
Or package for distribution:
|
|
360
|
-
|
|
361
|
-
```bash
|
|
362
|
-
npx vsce package
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
### Commands
|
|
366
|
-
|
|
367
|
-
| Command | Description |
|
|
368
|
-
|---------|-------------|
|
|
369
|
-
| `Trie: Scan Workspace` | Scan all files in workspace |
|
|
370
|
-
| `Trie: Scan Current File` | Scan active file only |
|
|
371
|
-
| `Trie: Copy Fix` | Copy suggested fix to clipboard |
|
|
372
|
-
|
|
373
|
-
### Settings
|
|
374
|
-
|
|
375
|
-
| Setting | Default | Description |
|
|
376
|
-
|---------|---------|-------------|
|
|
377
|
-
| `trie.executablePath` | `trie-agent` | Path to CLI executable |
|
|
378
|
-
| `trie.scanOnSave` | `true` | Scan files on save |
|
|
379
|
-
| `trie.parallel` | `true` | Run agents in parallel |
|
|
380
|
-
| `trie.cache` | `true` | Enable caching |
|
|
381
|
-
| `trie.useWorkers` | `false` | Use worker threads |
|
|
382
|
-
| `trie.maxConcurrency` | `4` | Max parallel agents |
|
|
383
|
-
| `trie.timeoutMs` | `120000` | Scan timeout |
|
|
384
|
-
|
|
385
268
|
---
|
|
386
269
|
|
|
387
270
|
## Built-in Agents
|
|
@@ -395,35 +278,6 @@ npx vsce package
|
|
|
395
278
|
| **SOC 2** | `trie_soc2` | Access control gaps, missing audit logs, encryption issues |
|
|
396
279
|
| **Legal** | `trie_legal` | HIPAA/COPPA compliance, consent patterns, data retention |
|
|
397
280
|
|
|
398
|
-
### Code Quality
|
|
399
|
-
|
|
400
|
-
| Agent | Command | What It Catches |
|
|
401
|
-
|-------|---------|-----------------|
|
|
402
|
-
| **Architecture** | `trie_architecture` | N+1 queries, circular deps, SOLID violations, god classes |
|
|
403
|
-
| **Bugs** | `trie_bugs` | Null dereference, race conditions, off-by-one, async bugs |
|
|
404
|
-
| **Types** | `trie_types` | Missing annotations, unsafe casts, implicit `any` |
|
|
405
|
-
| **Clean** | `trie_clean` | AI code smells: huge files, console.logs, useEffect abuse |
|
|
406
|
-
| **Data Flow** | `trie_data_flow` | Schema mismatches, hardcoded IDs, type coercion bugs |
|
|
407
|
-
| **Performance** | `trie_performance` | Memory leaks, N+1 queries, unnecessary re-renders |
|
|
408
|
-
|
|
409
|
-
### Design & UX
|
|
410
|
-
|
|
411
|
-
| Agent | Command | What It Catches |
|
|
412
|
-
|-------|---------|-----------------|
|
|
413
|
-
| **Design Engineer** | `trie_design` | Design systems, motion design, Awwwards-level polish |
|
|
414
|
-
| **Accessibility** | `trie_accessibility` | Missing ARIA, color contrast, keyboard nav (WCAG 2.1) |
|
|
415
|
-
| **UX** | `trie_ux` | Missing loading states, poor error handling, broken flows |
|
|
416
|
-
| **Visual QA** | `trie_visual_qa` | Layout shifts, z-index wars, responsive gaps |
|
|
417
|
-
| **Visual QA Browser** | `trie_visual_qa_browser` | Screenshots at 3 viewports for vision analysis |
|
|
418
|
-
|
|
419
|
-
### DevOps & Testing
|
|
420
|
-
|
|
421
|
-
| Agent | Command | What It Catches |
|
|
422
|
-
|-------|---------|-----------------|
|
|
423
|
-
| **DevOps** | `trie_devops` | Missing env vars, config issues, no health checks |
|
|
424
|
-
| **Test** | `trie_test` | Missing coverage, untested edge cases, weak assertions |
|
|
425
|
-
| **E2E** | `trie_e2e` | Flaky tests, hardcoded waits, brittle selectors |
|
|
426
|
-
|
|
427
281
|
---
|
|
428
282
|
|
|
429
283
|
## Special Agents
|
|
@@ -434,270 +288,10 @@ These agents are **manually invoked**โthey don't run during `trie_scan`.
|
|
|
434
288
|
|
|
435
289
|
Interactive PR reviews: walks through changes file-by-file with AI guidance.
|
|
436
290
|
|
|
437
|
-
```
|
|
438
|
-
Use trie_pr_review
|
|
439
|
-
Use trie_pr_review with pr:"12345"
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
**What it does:**
|
|
443
|
-
- Orders files for comprehension (schemas โ core โ implementation โ tests)
|
|
444
|
-
- Explains what changed and why
|
|
445
|
-
- Hunts for state bugs, race conditions, missing error handling
|
|
446
|
-
- Pauses after each file for your input
|
|
447
|
-
|
|
448
|
-
**Requirements:** [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated
|
|
449
|
-
|
|
450
291
|
### Agent Smith
|
|
451
292
|
|
|
452
|
-
*"I'm going to be honest with you... I hate this AI code."*
|
|
453
|
-
|
|
454
293
|
The ultimate AI code enforcerโ43 specialized hunters targeting AI-generated anti-patterns.
|
|
455
294
|
|
|
456
|
-
```
|
|
457
|
-
Use trie_agent_smith
|
|
458
|
-
Use trie_smith
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
**43 Hunters across 9 categories:**
|
|
462
|
-
|
|
463
|
-
| Category | Hunters |
|
|
464
|
-
|----------|---------|
|
|
465
|
-
| **Security** | exposed-secret, frontend-env, hardcoded-localhost, sql-injection, dangeroushtml |
|
|
466
|
-
| **AI Code Smells** | console, any, ts-ignore, eslint-disable, debugger, force-flag |
|
|
467
|
-
| **Async/Promise Bugs** | async-useeffect, async-foreach, missing-await, empty-catch, floating-promise |
|
|
468
|
-
| **React Anti-patterns** | useeffect-abuse, usestate-explosion, index-key, inline-object, prop-drilling |
|
|
469
|
-
| **Missing UX** | missing-loading, missing-error, missing-empty, page-reload |
|
|
470
|
-
| **Backend Issues** | no-validation, raw-error, n-plus-one |
|
|
471
|
-
| **Incomplete Code** | todo, vibe-comment, placeholder, sleep-hack, fallback |
|
|
472
|
-
| **Dead Code** | commented-code, unreachable-code, unused-import, empty-function, dead-branch |
|
|
473
|
-
| **AI Slop Aesthetic** | purple-gradient, star-icon, generic-hero, emoji-overflow, inter-font |
|
|
474
|
-
|
|
475
|
-
**Memory commands:**
|
|
476
|
-
```
|
|
477
|
-
trie_agent_smith show_stats:true # Show memory statistics
|
|
478
|
-
trie_agent_smith clear_memory:true # Clear all memory
|
|
479
|
-
```
|
|
480
|
-
|
|
481
|
-
### Visual QA Browser
|
|
482
|
-
|
|
483
|
-
Screenshot-based visual testing with AI vision analysis.
|
|
484
|
-
|
|
485
|
-
```
|
|
486
|
-
Use trie_visual_qa_browser
|
|
487
|
-
Use trie_visual_qa_browser url:"http://localhost:3000"
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
**What it does:**
|
|
491
|
-
1. Auto-detects running dev server
|
|
492
|
-
2. Captures screenshots at mobile (375px), tablet (768px), desktop (1440px)
|
|
493
|
-
3. Returns images for AI vision analysis
|
|
494
|
-
|
|
495
|
-
**Requirements:** Playwright (`npx playwright install chromium`) and a vision-capable model
|
|
496
|
-
|
|
497
|
-
---
|
|
498
|
-
|
|
499
|
-
## Custom Agents
|
|
500
|
-
|
|
501
|
-
Create specialized agents from any document:
|
|
502
|
-
|
|
503
|
-
```
|
|
504
|
-
Use trie_create_agent with filePath:"./style-guide.pdf" agentName:"my-style"
|
|
505
|
-
```
|
|
506
|
-
|
|
507
|
-
Supported formats: PDF, Markdown, text files.
|
|
508
|
-
|
|
509
|
-
Custom agents automatically activate during scans based on their rules.
|
|
510
|
-
|
|
511
|
-
---
|
|
512
|
-
|
|
513
|
-
## Configuration
|
|
514
|
-
|
|
515
|
-
### Config File
|
|
516
|
-
|
|
517
|
-
Create `.trie/config.json` in your project root:
|
|
518
|
-
|
|
519
|
-
```json
|
|
520
|
-
{
|
|
521
|
-
"version": "1.0.0",
|
|
522
|
-
"agents": {
|
|
523
|
-
"enabled": ["security", "privacy", "bugs", "types"],
|
|
524
|
-
"disabled": [],
|
|
525
|
-
"parallel": true,
|
|
526
|
-
"maxConcurrency": 4,
|
|
527
|
-
"timeout": 120000,
|
|
528
|
-
"cache": true
|
|
529
|
-
},
|
|
530
|
-
"compliance": {
|
|
531
|
-
"standards": ["SOC2", "GDPR"],
|
|
532
|
-
"enforceCompliance": false,
|
|
533
|
-
"reportFormat": "json"
|
|
534
|
-
},
|
|
535
|
-
"output": {
|
|
536
|
-
"format": "console",
|
|
537
|
-
"level": "all",
|
|
538
|
-
"interactive": false,
|
|
539
|
-
"streaming": true,
|
|
540
|
-
"colors": true
|
|
541
|
-
},
|
|
542
|
-
"paths": {
|
|
543
|
-
"include": [],
|
|
544
|
-
"exclude": ["node_modules", "dist", "build", ".git"],
|
|
545
|
-
"configDir": ".trie",
|
|
546
|
-
"outputDir": "trie-reports"
|
|
547
|
-
},
|
|
548
|
-
"integrations": {
|
|
549
|
-
"slack": {
|
|
550
|
-
"enabled": false,
|
|
551
|
-
"webhook": "",
|
|
552
|
-
"channel": "#security-alerts"
|
|
553
|
-
},
|
|
554
|
-
"github": {
|
|
555
|
-
"enabled": true
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
### Configuration Validation
|
|
562
|
-
|
|
563
|
-
Trie validates configuration on startup using Zod schemas:
|
|
564
|
-
- Invalid configurations log errors and fall back to defaults
|
|
565
|
-
- Missing API keys show warnings
|
|
566
|
-
- File paths are verified to exist
|
|
567
|
-
|
|
568
|
-
---
|
|
569
|
-
|
|
570
|
-
## Docker
|
|
571
|
-
|
|
572
|
-
Optimized multi-stage Docker builds for CI/CD or isolated environments.
|
|
573
|
-
|
|
574
|
-
### Build
|
|
575
|
-
|
|
576
|
-
```bash
|
|
577
|
-
docker build -t trie-agent .
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
### Run
|
|
581
|
-
|
|
582
|
-
```bash
|
|
583
|
-
# YOLO mode (auto-fix)
|
|
584
|
-
docker run -v $(pwd):/app trie-agent --yolo
|
|
585
|
-
|
|
586
|
-
# Watch mode (scan only)
|
|
587
|
-
docker run -v $(pwd):/app trie-agent
|
|
588
|
-
|
|
589
|
-
# CI mode (one-shot scan)
|
|
590
|
-
docker run -v $(pwd):/app trie-agent --once
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
### Docker Compose
|
|
594
|
-
|
|
595
|
-
```bash
|
|
596
|
-
docker-compose up
|
|
597
|
-
```
|
|
598
|
-
|
|
599
|
-
### Modes
|
|
600
|
-
|
|
601
|
-
| Mode | Flag | Description |
|
|
602
|
-
|------|------|-------------|
|
|
603
|
-
| YOLO | `--yolo` | Auto-fix high-confidence issues |
|
|
604
|
-
| Watch | (default) | Scan on file changes |
|
|
605
|
-
| CI | `--once` | One-shot scan, exit with code |
|
|
606
|
-
|
|
607
|
-
---
|
|
608
|
-
|
|
609
|
-
## Team Collaboration
|
|
610
|
-
|
|
611
|
-
Coordinate security scanning across your team with automatic issue assignment and notifications.
|
|
612
|
-
|
|
613
|
-
### Team Configuration
|
|
614
|
-
|
|
615
|
-
Create `.trie/team.json`:
|
|
616
|
-
|
|
617
|
-
```json
|
|
618
|
-
{
|
|
619
|
-
"members": [
|
|
620
|
-
{
|
|
621
|
-
"id": "alice",
|
|
622
|
-
"name": "Alice Smith",
|
|
623
|
-
"email": "alice@example.com",
|
|
624
|
-
"slack": "@alice",
|
|
625
|
-
"expertise": ["security", "privacy"],
|
|
626
|
-
"maxIssues": 10
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
"id": "bob",
|
|
630
|
-
"name": "Bob Jones",
|
|
631
|
-
"email": "bob@example.com",
|
|
632
|
-
"slack": "@bob",
|
|
633
|
-
"expertise": ["bugs", "performance"],
|
|
634
|
-
"maxIssues": 15
|
|
635
|
-
}
|
|
636
|
-
]
|
|
637
|
-
}
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
### Automatic Issue Assignment
|
|
641
|
-
|
|
642
|
-
Trie automatically assigns issues based on:
|
|
643
|
-
- **Expertise matching** โ Security issues go to security experts
|
|
644
|
-
- **Workload balancing** โ Respects `maxIssues` limits
|
|
645
|
-
- **Priority weighting** โ Critical issues assigned first
|
|
646
|
-
|
|
647
|
-
### Slack Integration
|
|
648
|
-
|
|
649
|
-
Uses Slack's [Incoming Webhooks](https://api.slack.com/messaging/webhooks) โ no OAuth or bot tokens required.
|
|
650
|
-
|
|
651
|
-
**Setup:**
|
|
652
|
-
1. Go to your Slack workspace โ Apps โ Incoming Webhooks
|
|
653
|
-
2. Create a webhook for your channel
|
|
654
|
-
3. Add to `.trie/config.json`:
|
|
655
|
-
|
|
656
|
-
```json
|
|
657
|
-
{
|
|
658
|
-
"integrations": {
|
|
659
|
-
"slack": {
|
|
660
|
-
"enabled": true,
|
|
661
|
-
"webhook": "https://hooks.slack.com/services/...",
|
|
662
|
-
"channel": "#security-alerts"
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
```
|
|
667
|
-
|
|
668
|
-
**Notifications sent for:**
|
|
669
|
-
- Scan completion summaries with issue counts
|
|
670
|
-
- Critical issue alerts (immediate)
|
|
671
|
-
- Issue assignments to team members
|
|
672
|
-
- Escalations for overdue items
|
|
673
|
-
- Daily/weekly team summaries
|
|
674
|
-
|
|
675
|
-
### Smart Issue Grouping
|
|
676
|
-
|
|
677
|
-
Issues are automatically:
|
|
678
|
-
- **Grouped** by pattern (same issue across files)
|
|
679
|
-
- **Prioritized** by risk score (0-100)
|
|
680
|
-
- **Categorized**: security, performance, maintainability, correctness, style
|
|
681
|
-
- **Bulk-fix detected** for trivial issues
|
|
682
|
-
|
|
683
|
-
---
|
|
684
|
-
|
|
685
|
-
## Available Tools
|
|
686
|
-
|
|
687
|
-
| Tool | Description |
|
|
688
|
-
|------|-------------|
|
|
689
|
-
| `trie_scan` | Intelligent scan with automatic agent selection |
|
|
690
|
-
| `trie_pr_review` | Interactive PR review |
|
|
691
|
-
| `trie_agent_smith` | AI code enforcerโ43 hunters |
|
|
692
|
-
| `trie_fix` | Apply high-confidence fixes |
|
|
693
|
-
| `trie_explain` | Plain-language explanations |
|
|
694
|
-
| `trie_watch` | Continuous scanning mode |
|
|
695
|
-
| `trie_create_agent` | Create custom agent from document |
|
|
696
|
-
| `trie_list_agents` | List all available agents |
|
|
697
|
-
| `trie_visual_qa_browser` | Screenshot for vision analysis |
|
|
698
|
-
|
|
699
|
-
Plus individual agent tools: `trie_security`, `trie_privacy`, `trie_soc2`, `trie_bugs`, etc.
|
|
700
|
-
|
|
701
295
|
---
|
|
702
296
|
|
|
703
297
|
## License
|