@triedotdev/mcp 1.0.37 → 1.0.38
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 +434 -32
- package/dist/{chunk-QFTSX2BX.js → chunk-HRNBSXN2.js} +995 -2
- package/dist/chunk-HRNBSXN2.js.map +1 -0
- package/dist/{chunk-VSCPOIWS.js → chunk-TGEI55FP.js} +536 -61
- package/dist/chunk-TGEI55FP.js.map +1 -0
- package/dist/cli/main.js +5 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +9 -2
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/index.js +62 -6
- package/dist/index.js.map +1 -1
- package/dist/workers/agent-worker.js +1 -1
- package/package.json +2 -3
- package/QUICK_START.md +0 -228
- package/dist/chunk-QFTSX2BX.js.map +0 -1
- package/dist/chunk-VSCPOIWS.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,16 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
**Customizable Parallel Agents for AI Code Review**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Specialized agents scan your code for security, privacy, compliance, and bugs—all running in parallel with intelligent caching and real-time streaming.
|
|
6
6
|
|
|
7
7
|
## Why Trie
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Trie is purpose-built for the last mile of shipping AI-generated code.
|
|
10
|
+
|
|
11
|
+
The last mile of shipping is where things break—not because your code doesn't work, but because the context you captured while building doesn't travel with you. Trie fixes that. One registry and triager runs identically in Cursor, Claude Code, the CLI, and GitHub Actions—master files that every surface can see, not scattered configs you forget to sync. Ingest your compliance docs, style guides, or internal policies (PDF/TXT/MD/RTF) and Trie compresses them into enforceable agents saved to `.trie/agents/`. Version them in TypeScript, test them locally, deploy them to CI with identical behavior. Triager logs show exactly which agents fired and why—no black-box routing. Built for people who need signal that their AI-generated code is reliable and right for the context they've captured, while they're still building.
|
|
10
12
|
|
|
11
13
|
## What's New (latest updates)
|
|
12
|
-
- **Legal Agent v2.0**: Complete rewrite, now the most comprehensive legal compliance agent for app development. Covers 21 categories: open source licensing (GPL/AGPL/MIT), Terms of Service, API terms compliance, intellectual property, ADA/WCAG accessibility, GDPR/CCPA data protection, e-commerce/PCI, CAN-SPAM/TCPA marketing, COPPA child safety, export controls, DMCA, and more.
|
|
13
14
|
|
|
14
|
-
- **
|
|
15
|
+
- **Health Score Triaging**: Your health score (0-100) now actively controls what agents run. Below 50%? All agents run automatically. Agents that found issues before get boosted priority in future scans.
|
|
16
|
+
|
|
17
|
+
- **Moneybags Agent**: Estimates dollar cost of bugs using IBM/NIST research. Costs scale with your user count—use `--users 10000` to match your scale (default: 250 users).
|
|
18
|
+
|
|
19
|
+
- **Production Ready Agent**: Production gate that checks for health endpoints, graceful shutdown, connection pooling, security headers, rate limiting, and monitoring. Get a ship/no-ship verdict before every deploy.
|
|
15
20
|
|
|
16
21
|
---
|
|
17
22
|
|
|
@@ -23,6 +28,7 @@ I like Claude Code Skills, but I found myself wanting more control. Trie keeps o
|
|
|
23
28
|
- [MCP Tools](#mcp-tools)
|
|
24
29
|
- [CLI](#cli)
|
|
25
30
|
- [Built-in Agents](#built-in-agents)
|
|
31
|
+
- [Moneybags Agent (v1.1)](#moneybags-agent-v11)
|
|
26
32
|
- [Legal Agent (v2.0)](#legal-agent-v20)
|
|
27
33
|
- [Design Engineer (v2.0)](#design-engineer-v20)
|
|
28
34
|
- [Special Agents](#special-agents)
|
|
@@ -30,6 +36,8 @@ I like Claude Code Skills, but I found myself wanting more control. Trie keeps o
|
|
|
30
36
|
- [AI-Enhanced Mode](#ai-enhanced-mode)
|
|
31
37
|
- [CI/CD Integration](#cicd-integration)
|
|
32
38
|
- [VS Code Extension](#vs-code-extension)
|
|
39
|
+
- [Agent Context System](#agent-context-system)
|
|
40
|
+
- [Production Shipping](#production-shipping)
|
|
33
41
|
- [Configuration](#configuration)
|
|
34
42
|
- [License](#license)
|
|
35
43
|
|
|
@@ -41,7 +49,7 @@ I like Claude Code Skills, but I found myself wanting more control. Trie keeps o
|
|
|
41
49
|
|
|
42
50
|
| Feature | Description |
|
|
43
51
|
|---------|-------------|
|
|
44
|
-
| **
|
|
52
|
+
| **22 Built-in Agents** | Security, Privacy, SOC 2, Legal, Architecture, Performance, E2E, Visual QA, Data Flow, Moneybags, Production Ready, and more |
|
|
45
53
|
| **Parallel Execution** | True parallel execution with worker threads—3-5x faster scans |
|
|
46
54
|
| **Result Caching** | File-based caching with SHA256 hashing—70% faster repeated scans |
|
|
47
55
|
| **Smart Triaging** | Only activates relevant agents based on code context |
|
|
@@ -67,15 +75,31 @@ I like Claude Code Skills, but I found myself wanting more control. Trie keeps o
|
|
|
67
75
|
|
|
68
76
|
## Quick Start
|
|
69
77
|
|
|
70
|
-
### Install
|
|
78
|
+
### Step 1: Install Node.js (if you don't have it)
|
|
79
|
+
|
|
80
|
+
Trie requires Node.js. Check if you have it by opening Terminal (Mac) or Command Prompt (Windows):
|
|
71
81
|
|
|
72
82
|
```bash
|
|
73
|
-
|
|
83
|
+
node --version
|
|
74
84
|
```
|
|
75
85
|
|
|
76
|
-
|
|
86
|
+
If you see a version number (like `v18.0.0`), skip to Step 2. If not:
|
|
87
|
+
- **Mac**: Download from [nodejs.org](https://nodejs.org) or run `brew install node`
|
|
88
|
+
- **Windows**: Download from [nodejs.org](https://nodejs.org)
|
|
89
|
+
|
|
90
|
+
### Step 2: Set Up Trie in Your AI Coding Tool
|
|
77
91
|
|
|
78
|
-
|
|
92
|
+
Pick the tool you use:
|
|
93
|
+
|
|
94
|
+
<details>
|
|
95
|
+
<summary><strong>Cursor (click to expand)</strong></summary>
|
|
96
|
+
|
|
97
|
+
1. Open Cursor
|
|
98
|
+
2. Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows)
|
|
99
|
+
3. Type "settings" and select **Cursor Settings**
|
|
100
|
+
4. Click **MCP** in the left sidebar
|
|
101
|
+
5. Click **Add MCP Server**
|
|
102
|
+
6. Paste this configuration:
|
|
79
103
|
|
|
80
104
|
```json
|
|
81
105
|
{
|
|
@@ -88,54 +112,262 @@ Settings → MCP Servers → Add:
|
|
|
88
112
|
}
|
|
89
113
|
```
|
|
90
114
|
|
|
91
|
-
**Restart Cursor
|
|
115
|
+
7. **Restart Cursor** (Cmd+Q and reopen, or Ctrl+Q on Windows)
|
|
116
|
+
|
|
117
|
+
**That's it!** Trie is now connected.
|
|
118
|
+
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
<details>
|
|
122
|
+
<summary><strong>Claude Code (click to expand)</strong></summary>
|
|
92
123
|
|
|
93
|
-
|
|
124
|
+
1. Open Claude Code
|
|
125
|
+
2. Open the terminal inside Claude Code
|
|
126
|
+
3. Run this command:
|
|
94
127
|
|
|
95
128
|
```bash
|
|
96
129
|
claude mcp add Trie --scope user -- npx @triedotdev/mcp
|
|
97
130
|
```
|
|
98
131
|
|
|
99
|
-
**Restart Claude Code
|
|
132
|
+
4. **Restart Claude Code**
|
|
100
133
|
|
|
101
|
-
|
|
134
|
+
**That's it!** Trie is now connected.
|
|
102
135
|
|
|
103
|
-
|
|
136
|
+
</details>
|
|
104
137
|
|
|
105
|
-
|
|
106
|
-
|
|
138
|
+
<details>
|
|
139
|
+
<summary><strong>Other AI Tools (Windsurf, OpenCode, etc.)</strong></summary>
|
|
140
|
+
|
|
141
|
+
Most MCP-compatible tools have a settings page for MCP servers. Add:
|
|
142
|
+
|
|
143
|
+
- **Command**: `npx`
|
|
144
|
+
- **Arguments**: `@triedotdev/mcp`
|
|
145
|
+
|
|
146
|
+
Or in JSON format:
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"command": "npx",
|
|
150
|
+
"args": ["@triedotdev/mcp"]
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
</details>
|
|
155
|
+
|
|
156
|
+
### Step 3: Run Your First Scan
|
|
157
|
+
|
|
158
|
+
Open your project in Cursor or Claude Code and type in the chat:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Scan my code with Trie
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Trie will:
|
|
165
|
+
1. Analyze your entire codebase
|
|
166
|
+
2. Pick the right checks based on what your code does (payments, auth, user data, etc.)
|
|
167
|
+
3. Show you a prioritized list of issues
|
|
168
|
+
|
|
169
|
+
**Example output:**
|
|
107
170
|
```
|
|
171
|
+
🔺 Trie Agent Scan Complete
|
|
172
|
+
|
|
173
|
+
Scanned: 5 agents | Time: 12.3s | Risk: MEDIUM
|
|
108
174
|
|
|
175
|
+
🎯 3 Issues Found
|
|
176
|
+
|
|
177
|
+
🔴 Critical (1)
|
|
109
178
|
---
|
|
179
|
+
Missing authentication on payment endpoint
|
|
110
180
|
|
|
111
|
-
|
|
181
|
+
📍 src/api/checkout.ts:47
|
|
112
182
|
|
|
113
|
-
|
|
183
|
+
Fix: Add auth middleware before processing payment
|
|
184
|
+
```
|
|
114
185
|
|
|
186
|
+
### Step 4: Fix Issues
|
|
187
|
+
|
|
188
|
+
For each issue, you can:
|
|
189
|
+
|
|
190
|
+
**Option A: Ask your AI to fix it**
|
|
115
191
|
```
|
|
116
|
-
|
|
192
|
+
Fix the authentication issue in checkout.ts that Trie found
|
|
117
193
|
```
|
|
118
194
|
|
|
119
|
-
|
|
195
|
+
**Option B: Use Trie's auto-fix** (for high-confidence fixes)
|
|
196
|
+
```
|
|
197
|
+
Run trie_fix to apply safe fixes
|
|
198
|
+
```
|
|
120
199
|
|
|
200
|
+
**Option C: Get more details first**
|
|
121
201
|
```
|
|
122
|
-
|
|
123
|
-
Run trie_soc2 to check compliance
|
|
202
|
+
Explain the checkout.ts security issue
|
|
124
203
|
```
|
|
125
204
|
|
|
126
|
-
|
|
205
|
+
---
|
|
127
206
|
|
|
128
|
-
|
|
129
|
-
- `trie` / `/trie` with `{ action: "scan", files?: [], directory?: "" }` runs a full triaged scan.
|
|
130
|
-
- `trie` / `/trie` with `{ action: "<agent>", files?: [] }` runs one agent (e.g., `security`, `ux`, `soc2`, `agent_smith`).
|
|
207
|
+
## Your Ongoing Workflow
|
|
131
208
|
|
|
132
|
-
|
|
209
|
+
Once set up, here's how to use Trie day-to-day.
|
|
210
|
+
|
|
211
|
+
### How Trie Remembers Your Project
|
|
212
|
+
|
|
213
|
+
**You don't have to remember anything.** Trie automatically tracks:
|
|
214
|
+
|
|
215
|
+
| What Trie Remembers | Why It Matters |
|
|
216
|
+
|---------------------|----------------|
|
|
217
|
+
| Last scan results | AI knows what issues exist without re-scanning |
|
|
218
|
+
| **Health score (0-100)** | Controls what agents run (see below) |
|
|
219
|
+
| Which files have issues | AI focuses on problem areas first |
|
|
220
|
+
| What type of code you have | Runs the right checks (payments, auth, etc.) automatically |
|
|
221
|
+
| Scan history | See if issues are getting better or worse |
|
|
133
222
|
|
|
134
|
-
|
|
223
|
+
**This works everywhere automatically:**
|
|
224
|
+
- ✅ Cursor remembers between sessions
|
|
225
|
+
- ✅ Claude Code picks up where you left off
|
|
226
|
+
- ✅ CLI shows the same status
|
|
227
|
+
- ✅ GitHub Actions uses the same context
|
|
135
228
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
229
|
+
**Where it's stored:** A file called `.trie/AGENTS.md` in your project. You can look at it anytime to see your project's health status.
|
|
230
|
+
|
|
231
|
+
### Health Score: The Priority System
|
|
232
|
+
|
|
233
|
+
Your **health score** isn't just a number—it actively controls how Trie works across all your tools:
|
|
234
|
+
|
|
235
|
+
| Health Score | What Happens |
|
|
236
|
+
|--------------|--------------|
|
|
237
|
+
| **80-100** | Normal mode: Trie runs targeted checks based on your code |
|
|
238
|
+
| **50-79** | Cautious mode: Agents that found issues before run again automatically |
|
|
239
|
+
| **Below 50** | Full scan mode: ALL agents run regardless of context |
|
|
240
|
+
|
|
241
|
+
**How it works across tools:**
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
Cursor: Scan finds 14 issues → Health drops to 56%
|
|
245
|
+
↓
|
|
246
|
+
Claude Code: Opens same project → Sees 56% health
|
|
247
|
+
↓
|
|
248
|
+
Trie automatically runs more thorough checks
|
|
249
|
+
↓
|
|
250
|
+
GitHub Actions: Same health score → Stricter CI gates
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Why this matters:**
|
|
254
|
+
|
|
255
|
+
| Scenario | Without Health Score | With Health Score |
|
|
256
|
+
|----------|---------------------|-------------------|
|
|
257
|
+
| Quick fix in Cursor | Might skip security check | Knows security found issues → runs it |
|
|
258
|
+
| Switch to Claude Code | Starts fresh, no context | Picks up your 56% health, stays vigilant |
|
|
259
|
+
| Push to GitHub | Generic checks | Focused on your known problem areas |
|
|
260
|
+
|
|
261
|
+
The health score ensures your project's context **travels with you** across every tool.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### Before Pushing Code
|
|
266
|
+
|
|
267
|
+
Ask Trie:
|
|
268
|
+
```
|
|
269
|
+
Scan my changes before I push
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Before Launching to Users
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
Run a full Trie scan - I'm about to launch
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
This runs security, privacy, performance, and architecture checks.
|
|
279
|
+
|
|
280
|
+
### When Something Breaks
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
Trie, check this file for bugs: src/api/orders.ts
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Weekly Maintenance
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
Give me a Trie health report
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
This reads from `.trie/AGENTS.md` which tracks your project state over time.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## What Each Check Does (Plain English)
|
|
297
|
+
|
|
298
|
+
| When You Ask | What It Checks | Why It Matters |
|
|
299
|
+
|--------------|----------------|----------------|
|
|
300
|
+
| "Run security scan" | Login/password handling, data exposure, hack vulnerabilities | Prevents your app from being hacked |
|
|
301
|
+
| "Run privacy scan" | User data handling, GDPR/CCPA compliance | Avoids fines up to $10,000+ per violation |
|
|
302
|
+
| "Run bugs scan" | Logic errors, edge cases, crash points | Prevents app crashes for users |
|
|
303
|
+
| "Run performance scan" | Slow queries, memory leaks, scaling issues | App stays fast with 1000+ users |
|
|
304
|
+
| "Run legal scan" | Terms of service, license compliance, regulations | Avoids lawsuits |
|
|
305
|
+
| "Run design scan" | UI patterns, accessibility, UX issues | Better user experience |
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Common Questions
|
|
310
|
+
|
|
311
|
+
<details>
|
|
312
|
+
<summary><strong>Do I need to pay for an API key?</strong></summary>
|
|
313
|
+
|
|
314
|
+
No. Trie works without any API keys using pattern matching.
|
|
315
|
+
|
|
316
|
+
For deeper AI analysis, you can optionally add an Anthropic API key:
|
|
317
|
+
1. Get a key from [console.anthropic.com](https://console.anthropic.com)
|
|
318
|
+
2. Add to your environment: `export ANTHROPIC_API_KEY=your-key-here`
|
|
319
|
+
|
|
320
|
+
This enables AI-enhanced scanning with better accuracy.
|
|
321
|
+
|
|
322
|
+
</details>
|
|
323
|
+
|
|
324
|
+
<details>
|
|
325
|
+
<summary><strong>Will Trie change my code automatically?</strong></summary>
|
|
326
|
+
|
|
327
|
+
No. Trie only scans and reports. It never modifies code without you asking. When you want fixes:
|
|
328
|
+
- Ask your AI assistant to apply specific fixes
|
|
329
|
+
- Or run `trie_fix` which only applies high-confidence, safe fixes
|
|
330
|
+
|
|
331
|
+
</details>
|
|
332
|
+
|
|
333
|
+
<details>
|
|
334
|
+
<summary><strong>What if I don't understand an issue?</strong></summary>
|
|
335
|
+
|
|
336
|
+
Ask for an explanation:
|
|
337
|
+
```
|
|
338
|
+
Explain the issue Trie found in checkout.ts in simple terms
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Or ask what could go wrong:
|
|
342
|
+
```
|
|
343
|
+
What's the worst case if I don't fix this security issue?
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
</details>
|
|
347
|
+
|
|
348
|
+
<details>
|
|
349
|
+
<summary><strong>How do I set up automatic checks on GitHub?</strong></summary>
|
|
350
|
+
|
|
351
|
+
Add this file to your repo at `.github/workflows/trie.yml`:
|
|
352
|
+
|
|
353
|
+
```yaml
|
|
354
|
+
name: Trie Check
|
|
355
|
+
on: [push, pull_request]
|
|
356
|
+
|
|
357
|
+
jobs:
|
|
358
|
+
scan:
|
|
359
|
+
runs-on: ubuntu-latest
|
|
360
|
+
steps:
|
|
361
|
+
- uses: actions/checkout@v4
|
|
362
|
+
- uses: triedotdev/trie-action@v1
|
|
363
|
+
with:
|
|
364
|
+
agents: security,privacy,bugs
|
|
365
|
+
fail-on: critical
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Now every push is automatically checked.
|
|
369
|
+
|
|
370
|
+
</details>
|
|
139
371
|
|
|
140
372
|
---
|
|
141
373
|
|
|
@@ -257,13 +489,100 @@ trie-agent agents
|
|
|
257
489
|
| **Visual QA** | Visual regression, responsive design, cross-browser issues |
|
|
258
490
|
| **E2E** | End-to-end test coverage, user flow validation |
|
|
259
491
|
|
|
260
|
-
### Operations (
|
|
492
|
+
### Operations (5 agents)
|
|
261
493
|
|
|
262
494
|
| Agent | Description |
|
|
263
495
|
|-------|-------------|
|
|
264
496
|
| **DevOps** | Config issues, logging, environment variables, deployment patterns |
|
|
265
497
|
| **Data Flow** | Data flow analysis, state management, API contracts |
|
|
266
498
|
| **Comprehension** | Plain language explanations for non-technical stakeholders |
|
|
499
|
+
| **Moneybags** | 💰 Estimates dollar cost of bugs scaled to your user count (default: 250). Use `--users` to configure |
|
|
500
|
+
| **Production Ready** | 🚀 Production gate: health endpoints, graceful shutdown, connection pooling, security headers, rate limiting, monitoring |
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## Moneybags Agent
|
|
505
|
+
|
|
506
|
+
The Moneybags agent answers the question every CFO asks: **"How much will this bug cost us?"**
|
|
507
|
+
|
|
508
|
+
Built on industry research from IBM, NIST, Ponemon Institute, and Gartner, it calculates the actual dollar cost of each issue—both the cost to fix now and the cost if it reaches production. **Costs scale based on your user count.**
|
|
509
|
+
|
|
510
|
+
### User Count Scaling
|
|
511
|
+
|
|
512
|
+
Costs are scaled based on your app's user count (default: 250 users). Use the `--users` flag to match your scale:
|
|
513
|
+
|
|
514
|
+
```bash
|
|
515
|
+
# Default (250 users - early stage app)
|
|
516
|
+
trie scan
|
|
517
|
+
|
|
518
|
+
# Scale for your app size
|
|
519
|
+
trie scan --users 1000 # Growing app
|
|
520
|
+
trie scan --users 10000 # Traction
|
|
521
|
+
trie scan --users 100000 # Growth stage
|
|
522
|
+
trie scan -u 1000000 # Enterprise
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
| User Count | Multiplier | Stage |
|
|
526
|
+
|------------|------------|-------|
|
|
527
|
+
| 50 | 0.3x | MVP |
|
|
528
|
+
| **250** | **1x** | **Early stage (default)** |
|
|
529
|
+
| 1,000 | 2x | Growing |
|
|
530
|
+
| 5,000 | 4x | Traction |
|
|
531
|
+
| 25,000 | 8x | Scale-up |
|
|
532
|
+
| 100,000 | 15x | Growth |
|
|
533
|
+
| 1,000,000+ | 40x | Enterprise |
|
|
534
|
+
|
|
535
|
+
### Cost Model
|
|
536
|
+
|
|
537
|
+
| Severity | Fix Now | If Production | Multiplier |
|
|
538
|
+
|----------|---------|---------------|------------|
|
|
539
|
+
| **Critical** | $5,000 | $150,000+ | 30x |
|
|
540
|
+
| **Serious** | $2,000 | $40,000+ | 20x |
|
|
541
|
+
| **Moderate** | $500 | $5,000+ | 10x |
|
|
542
|
+
| **Low** | $100 | $500+ | 5x |
|
|
543
|
+
|
|
544
|
+
### Category Multipliers
|
|
545
|
+
|
|
546
|
+
| Category | Multiplier | Why |
|
|
547
|
+
|----------|------------|-----|
|
|
548
|
+
| **Payment Bugs** | 25x | Direct financial loss, fraud exposure |
|
|
549
|
+
| **Data Loss** | 20x | Irrecoverable, legally actionable |
|
|
550
|
+
| **Secrets Exposed** | 15x | Immediate rotation + audit required |
|
|
551
|
+
| **SQL Injection** | 12x | Full system compromise possible |
|
|
552
|
+
| **Privacy Violations** | 10x | GDPR fines up to 4% of revenue |
|
|
553
|
+
| **Auth Bypass** | 10x | Complete security failure |
|
|
554
|
+
| **Crashes** | 8x | $5,600/minute average downtime |
|
|
555
|
+
|
|
556
|
+
### What It Detects
|
|
557
|
+
|
|
558
|
+
- Floating-point arithmetic for money (use integer cents!)
|
|
559
|
+
- Rounding errors in financial calculations
|
|
560
|
+
- Dangerous DELETE/TRUNCATE statements
|
|
561
|
+
- Empty catch blocks swallowing errors
|
|
562
|
+
- Assignment in conditions (= instead of ===)
|
|
563
|
+
|
|
564
|
+
### Example Output
|
|
565
|
+
|
|
566
|
+
```
|
|
567
|
+
💰 COST ANALYSIS REPORT
|
|
568
|
+
═══════════════════════════════════════
|
|
569
|
+
👥 User Scale: 250 users (Early stage)
|
|
570
|
+
└─ Costs scaled 1x from 250 baseline
|
|
571
|
+
|
|
572
|
+
💵 COST IMPACT
|
|
573
|
+
├─ Fix now: $3.2k
|
|
574
|
+
├─ If production: $28k
|
|
575
|
+
└─ Savings by fixing now: $24.8k ⚡
|
|
576
|
+
|
|
577
|
+
💡 Default: 250 users. Scale with: trie scan --users 10000
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
### Research Sources
|
|
581
|
+
|
|
582
|
+
- **IBM Systems Sciences Institute**: Production bugs cost 30x more to fix
|
|
583
|
+
- **NIST**: $15k average production bug fix vs $500 in development
|
|
584
|
+
- **Ponemon Institute 2023**: $4.45M average data breach cost
|
|
585
|
+
- **Gartner**: $5,600/minute average downtime cost
|
|
267
586
|
|
|
268
587
|
---
|
|
269
588
|
|
|
@@ -589,6 +908,89 @@ Native VS Code extension with inline diagnostics and quick fixes.
|
|
|
589
908
|
|
|
590
909
|
---
|
|
591
910
|
|
|
911
|
+
## Agent Context System
|
|
912
|
+
|
|
913
|
+
> **Simple version:** Trie remembers your project state automatically. See [How Trie Remembers Your Project](#how-trie-remembers-your-project) for the plain-English explanation.
|
|
914
|
+
|
|
915
|
+
### What Gets Saved
|
|
916
|
+
|
|
917
|
+
Every time you scan, Trie updates a file in your project (`.trie/AGENTS.md`) with:
|
|
918
|
+
|
|
919
|
+
| Tracked | Example |
|
|
920
|
+
|---------|---------|
|
|
921
|
+
| Health score | "Your project is at 85/100" |
|
|
922
|
+
| Critical issues | "2 security issues need fixing" |
|
|
923
|
+
| Hot files | "checkout.ts has 3 issues" |
|
|
924
|
+
| Priorities | "Fix payment auth before launching" |
|
|
925
|
+
| Last scan | "Scanned yesterday, 47 files checked" |
|
|
926
|
+
|
|
927
|
+
### What This Means For You
|
|
928
|
+
|
|
929
|
+
| Scenario | What Happens |
|
|
930
|
+
|----------|--------------|
|
|
931
|
+
| Open Cursor tomorrow | AI already knows your project state |
|
|
932
|
+
| Switch to Claude Code | Same context, no re-scanning needed |
|
|
933
|
+
| Push to GitHub | CI/CD knows what to focus on |
|
|
934
|
+
| Ask Trie "what should I fix?" | Gives prioritized answer based on your history |
|
|
935
|
+
|
|
936
|
+
### For Developers: Technical Details
|
|
937
|
+
|
|
938
|
+
<details>
|
|
939
|
+
<summary>MCP Resources (click to expand)</summary>
|
|
940
|
+
|
|
941
|
+
```
|
|
942
|
+
trie://context # AGENTS.md content (read this first)
|
|
943
|
+
trie://context/state # Detailed JSON state
|
|
944
|
+
trie://agents # Available agents
|
|
945
|
+
trie://config # Current configuration
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
Files stored:
|
|
949
|
+
- `.trie/AGENTS.md` - Human-readable context
|
|
950
|
+
- `.trie/state.json` - Machine-readable state for programmatic access
|
|
951
|
+
|
|
952
|
+
</details>
|
|
953
|
+
|
|
954
|
+
---
|
|
955
|
+
|
|
956
|
+
## Production Shipping
|
|
957
|
+
|
|
958
|
+
Trie solves the "last mile" of shipping to production. See [PRODUCTION_SHIPPING.md](./PRODUCTION_SHIPPING.md) for the complete guide.
|
|
959
|
+
|
|
960
|
+
### Quick Production Check
|
|
961
|
+
|
|
962
|
+
```bash
|
|
963
|
+
# Full production readiness scan
|
|
964
|
+
trie scan --agents security,privacy,bugs,performance --fail-on serious
|
|
965
|
+
|
|
966
|
+
# Or via MCP
|
|
967
|
+
trie_scan with agents: ["security", "privacy", "bugs", "performance"]
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
### What It Covers
|
|
971
|
+
|
|
972
|
+
| Area | What's Checked |
|
|
973
|
+
|------|----------------|
|
|
974
|
+
| **Security Hardening** | SQL injection, XSS, auth bypass, secrets, dependencies |
|
|
975
|
+
| **Scalability** | Connection pooling, stateless design, N+1 queries |
|
|
976
|
+
| **Architecture** | Circular dependencies, god classes, coupling |
|
|
977
|
+
| **Reliability** | Error handling, health checks, timeouts |
|
|
978
|
+
| **Revenue Protection** | Payment security, data compliance, business logic |
|
|
979
|
+
|
|
980
|
+
### CI/CD Gate
|
|
981
|
+
|
|
982
|
+
Add to your workflow:
|
|
983
|
+
|
|
984
|
+
```yaml
|
|
985
|
+
- uses: triedotdev/trie-action@v1
|
|
986
|
+
with:
|
|
987
|
+
agents: security,privacy,bugs,performance,architecture
|
|
988
|
+
fail-on: serious
|
|
989
|
+
upload-sarif: true
|
|
990
|
+
```
|
|
991
|
+
|
|
992
|
+
---
|
|
993
|
+
|
|
592
994
|
## Configuration
|
|
593
995
|
|
|
594
996
|
### Scan Options
|