@triedotdev/mcp 1.0.86 → 1.0.88
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 +108 -29
- package/dist/{chunk-4UVTFL2T.js → chunk-4CYQGEWE.js} +2 -2
- package/dist/{chunk-KERQ4JXR.js → chunk-HNDHVFA3.js} +35 -3
- package/dist/chunk-HNDHVFA3.js.map +1 -0
- package/dist/{chunk-4U3DNRUA.js → chunk-YSES743V.js} +203 -3
- package/dist/chunk-YSES743V.js.map +1 -0
- package/dist/cli/main.js +227 -5
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +2 -2
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-4U3DNRUA.js.map +0 -1
- package/dist/chunk-KERQ4JXR.js.map +0 -1
- /package/dist/{chunk-4UVTFL2T.js.map → chunk-4CYQGEWE.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# Trie: Trainable AI Agent for Maintaining AI-Generated Codebases
|
|
2
2
|
|
|
3
|
-
A trainable AI agent that watches all of your codebases, learns from your incidents, and prevents repeat bugs before they ship
|
|
3
|
+
**A trainable AI agent that watches all of your codebases, learns from your incidents, and prevents repeat bugs before they ship.**
|
|
4
4
|
|
|
5
|
-
[Download Workspace](https://www.trie.dev)
|
|
5
|
+
[](https://www.trie.dev) [](https://x.com/louiskishfy)
|
|
6
6
|
|
|
7
7
|
## What Trie Does
|
|
8
8
|
|
|
9
|
-
Central skill repository
|
|
10
|
-
Sets and tracks goals
|
|
11
|
-
Tests your theories
|
|
12
|
-
Learns from your incidents
|
|
13
|
-
Predicts "Gotchas" proactively
|
|
9
|
+
- **Central skill repository**: One place for all your skills — carry context and rules across Cursor, Claude, VS Code, CLI, and CI/CD. Unlike running skills with Claude Code, Trie will check for anything malicious before you run them.
|
|
10
|
+
- **Sets and tracks goals**: "Reduce login bugs by 50%" then actually measures progress and celebrates wins
|
|
11
|
+
- **Tests your theories**: "Mondays have more bugs" — Trie validates with real data and builds confidence over time
|
|
12
|
+
- **Learns from your incidents**: Train it on your specific patterns, not generic rules that don't fit your prompting
|
|
13
|
+
- **Predicts "Gotchas" proactively**: Ingests Linear tickets and correlates them with past failures to warn you before you even push code
|
|
14
14
|
|
|
15
15
|
## Goal
|
|
16
16
|
|
|
17
|
-
Trie exists so you can maintain multiple codebases as one person without losing your mind.
|
|
17
|
+
Trie exists so you can maintain multiple codebases as one person without losing your mind.
|
|
18
18
|
|
|
19
19
|
Every bug you fix teaches Trie a pattern that protects all your projects. Every incident you report becomes institutional knowledge that travels with your code. Every decision you make—and the tradeoffs you considered—gets remembered across Cursor, Claude, VS Code, CLI, and CI/CD.
|
|
20
20
|
|
|
21
21
|
Instead of burning tokens on the same questions across different repos or forgetting why you architected something a certain way six months ago, Trie remembers for you. Instead of losing track of edge cases and tradeoffs as you switch between tools, Trie maintains system coherence. The result is faster development with fewer production fires, because your personal AI agent gets smarter every time something breaks instead of starting from zero in every conversation.
|
|
22
22
|
|
|
23
|
-
Your thinking and planning keep up with code generation. Your decisions persist across tools. Your edge cases don't get forgotten
|
|
23
|
+
**Your thinking and planning keep up with code generation. Your decisions persist across tools. Your edge cases don't get forgotten.**
|
|
24
24
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
|
@@ -77,31 +77,31 @@ Trie remembers your decisions across tools, tracks the tradeoffs you've made, an
|
|
|
77
77
|
|
|
78
78
|
### Smart Memory
|
|
79
79
|
|
|
80
|
-
Git-based storage - Your project's memory travels with your code in
|
|
81
|
-
Cross-project learning - Patterns discovered in one project help prevent bugs in others
|
|
82
|
-
Incident tracking - Build a searchable history of what went wrong and why
|
|
83
|
-
Decision memory - Remembers architectural choices and tradeoffs across Cursor, Claude, VS Code, CLI, and CI/CD
|
|
84
|
-
Context that travels - Your thinking and planning keep up with code generation across all your tools
|
|
80
|
+
- Git-based storage - Your project's memory travels with your code in `.trie/` folder.
|
|
81
|
+
- Cross-project learning - Patterns discovered in one project help prevent bugs in others.
|
|
82
|
+
- Incident tracking - Build a searchable history of what went wrong and why.
|
|
83
|
+
- Decision memory - Remembers architectural choices and tradeoffs across Cursor, Claude, VS Code, CLI, and CI/CD.
|
|
84
|
+
- Context that travels - Your thinking and planning keep up with code generation across all your tools.
|
|
85
85
|
|
|
86
86
|
### Intelligent Analysis
|
|
87
87
|
|
|
88
|
-
26 built-in scouts - Automated analyzers for security, performance, accessibility, and more
|
|
89
|
-
Custom skills - Add external analyzers from the community
|
|
90
|
-
Risk scoring - Intelligent priority ranking based on your actual incident history
|
|
91
|
-
Edge case detection - Identifies recurring issues and patterns you've hit before
|
|
92
|
-
System coherence - Tracks relationships between files, changes, incidents, fixes, and decisions
|
|
88
|
+
- 26 built-in scouts - Automated analyzers for security, performance, accessibility, and more.
|
|
89
|
+
- Custom skills - Add external analyzers from the community.
|
|
90
|
+
- Risk scoring - Intelligent priority ranking based on your actual incident history.
|
|
91
|
+
- Edge case detection - Identifies recurring issues and patterns you've hit before.
|
|
92
|
+
- System coherence - Tracks relationships between files, changes, incidents, fixes, and decisions.
|
|
93
93
|
|
|
94
94
|
### Development Integration
|
|
95
95
|
|
|
96
|
-
Git hooks - Automatic checks before commits and pushes
|
|
97
|
-
Watch mode - Real-time monitoring while you code
|
|
98
|
-
Fast performance - Sub-500ms checks, won't slow down your workflow
|
|
96
|
+
- Git hooks - Automatic checks before commits and pushes.
|
|
97
|
+
- Watch mode - Real-time monitoring while you code.
|
|
98
|
+
- Fast performance - Sub-500ms checks, won't slow down your workflow.
|
|
99
99
|
|
|
100
100
|
### Developer Experience
|
|
101
101
|
|
|
102
|
-
Plain English warnings - "This auth change broke twice before" instead of cryptic codes
|
|
103
|
-
Multiple interfaces - CLI, MCP tools for Claude/Cursor, visual dashboards
|
|
104
|
-
Flexible workflow - Works with any editor, any git workflow, any deployment setup
|
|
102
|
+
- Plain English warnings - "This auth change broke twice before" instead of cryptic codes.
|
|
103
|
+
- Multiple interfaces - CLI, MCP tools for Claude/Cursor, visual dashboards.
|
|
104
|
+
- Flexible workflow - Works with any editor, any git workflow, any deployment setup.
|
|
105
105
|
|
|
106
106
|
## How It Works
|
|
107
107
|
|
|
@@ -109,10 +109,10 @@ Flexible workflow - Works with any editor, any git workflow, any deployment setu
|
|
|
109
109
|
|
|
110
110
|
Trie uses a "Guardian Agent" architecture:
|
|
111
111
|
|
|
112
|
-
Scouts continuously analyze your code for potential issues
|
|
113
|
-
Guardian receives scout reports and decides what matters based on your history
|
|
114
|
-
Memory Tree stores incident patterns using a trie data structure for fast lookups
|
|
115
|
-
Learning Loop improves predictions based on your feedback
|
|
112
|
+
- Scouts continuously analyze your code for potential issues.
|
|
113
|
+
- Guardian receives scout reports and decides what matters based on your history.
|
|
114
|
+
- Memory Tree stores incident patterns using a trie data structure for fast lookups.
|
|
115
|
+
- Learning Loop improves predictions based on your feedback.
|
|
116
116
|
|
|
117
117
|
### Memory That Travels
|
|
118
118
|
|
|
@@ -148,6 +148,22 @@ When you switch from Cursor to Claude Code to terminal, Trie remembers. Your thi
|
|
|
148
148
|
|
|
149
149
|
## Core Workflow
|
|
150
150
|
|
|
151
|
+
### 0. Planning Phase
|
|
152
|
+
|
|
153
|
+
**Start every complex task by checking Trie first.** Just like starting in plan mode helps Claude 1-shot implementation, checking Trie before coding helps you avoid known pitfalls:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Before starting work on a feature, check what broke before
|
|
157
|
+
trie gotcha # Predict risks for current changes
|
|
158
|
+
trie memory search "auth" # See past incidents in this area
|
|
159
|
+
trie status # Check overall project health
|
|
160
|
+
|
|
161
|
+
# Review past decisions and tradeoffs
|
|
162
|
+
# Trie's Context Graph remembers why you made choices and what happened
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Pro tip:** The moment something goes sideways, check Trie again. Don't keep pushing—re-plan with historical context. Trie shows you what broke before, what decisions were made, and what edge cases caused issues. Use that knowledge to inform your plan, then let your AI tools implement it.
|
|
166
|
+
|
|
151
167
|
### 1. Teaching Phase
|
|
152
168
|
|
|
153
169
|
```bash
|
|
@@ -482,6 +498,38 @@ git push --no-verify # Skip all hooks
|
|
|
482
498
|
TRIE_BYPASS=1 git push # Skip Trie but log bypass
|
|
483
499
|
```
|
|
484
500
|
|
|
501
|
+
### Slack Integration
|
|
502
|
+
|
|
503
|
+
Trie sends notifications to Slack for team collaboration:
|
|
504
|
+
|
|
505
|
+
**Setup:**
|
|
506
|
+
1. Create a Slack webhook: https://api.slack.com/apps
|
|
507
|
+
2. Add to `.trie/config.json`:
|
|
508
|
+
|
|
509
|
+
```json
|
|
510
|
+
{
|
|
511
|
+
"integrations": {
|
|
512
|
+
"slack": {
|
|
513
|
+
"enabled": true,
|
|
514
|
+
"webhook": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
|
|
515
|
+
"channel": "#security" // Optional: default channel
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"autoEscalation": {
|
|
519
|
+
"enabled": true,
|
|
520
|
+
"webhookUrl": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
|
|
521
|
+
"quietHours": { "start": "21:00", "end": "08:00" }
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
**What Trie sends to Slack:**
|
|
527
|
+
- Scan completion notifications with issue counts
|
|
528
|
+
- Critical security alerts (immediate)
|
|
529
|
+
- Daily/weekly team summaries
|
|
530
|
+
- Escalation notifications for overdue issues
|
|
531
|
+
- Bulk fix notifications
|
|
532
|
+
|
|
485
533
|
## CI/CD Integration
|
|
486
534
|
|
|
487
535
|
### GitHub Actions
|
|
@@ -1034,6 +1082,37 @@ trie learn # Learn from your git history
|
|
|
1034
1082
|
trie pause # Disable warnings for 1 hour
|
|
1035
1083
|
```
|
|
1036
1084
|
|
|
1085
|
+
### Pattern Sharing
|
|
1086
|
+
Save, validate, and share patterns that worked well across projects:
|
|
1087
|
+
|
|
1088
|
+
```bash
|
|
1089
|
+
# Save patterns (auto-detects type: file structure, code pattern, or detection rule)
|
|
1090
|
+
trie patterns save "path/to/file.ts" "This error handling prevented bugs"
|
|
1091
|
+
trie patterns save "path/*" "This folder structure worked well"
|
|
1092
|
+
trie patterns save security "This scout caught issues early"
|
|
1093
|
+
|
|
1094
|
+
# List saved patterns
|
|
1095
|
+
trie patterns list
|
|
1096
|
+
trie patterns list --validated # Only validated patterns
|
|
1097
|
+
|
|
1098
|
+
# Validate a pattern (mark as "worked great")
|
|
1099
|
+
trie patterns validate pattern-abc123 "Worked great in production"
|
|
1100
|
+
|
|
1101
|
+
# Export patterns to share
|
|
1102
|
+
trie patterns export patterns.json --validated
|
|
1103
|
+
|
|
1104
|
+
# Import patterns into another project
|
|
1105
|
+
cd ../another-project
|
|
1106
|
+
trie patterns import ../source-project/patterns.json
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
**Smart Pattern Detection:**
|
|
1110
|
+
- **File structure patterns** - Architecture decisions (`path/*`, `*.ts`)
|
|
1111
|
+
- **Code patterns** - Specific fixes/approaches that worked (`path/to/file.ts`)
|
|
1112
|
+
- **Detection rules** - Scout configurations that caught issues (`security`, `privacy`)
|
|
1113
|
+
|
|
1114
|
+
Saved patterns are automatically applied during `trie scan` and `trie watch` runs.
|
|
1115
|
+
|
|
1037
1116
|
### Watch Mode
|
|
1038
1117
|
```bash
|
|
1039
1118
|
trie watch # Start interactive monitoring dashboard
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getUncommittedChanges,
|
|
9
9
|
getWorkingTreeDiff,
|
|
10
10
|
loadConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YSES743V.js";
|
|
12
12
|
import {
|
|
13
13
|
ContextGraph
|
|
14
14
|
} from "./chunk-THJKXIMJ.js";
|
|
@@ -1687,4 +1687,4 @@ export {
|
|
|
1687
1687
|
LearningEngine,
|
|
1688
1688
|
LinearIngester
|
|
1689
1689
|
};
|
|
1690
|
-
//# sourceMappingURL=chunk-
|
|
1690
|
+
//# sourceMappingURL=chunk-4CYQGEWE.js.map
|
|
@@ -5,14 +5,17 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
Executor,
|
|
7
7
|
Triager,
|
|
8
|
+
buildSavedPatternIssues,
|
|
8
9
|
detectStack,
|
|
9
10
|
getChangedFilesSinceTimestamp,
|
|
11
|
+
getDetectionRuleAgents,
|
|
10
12
|
getSkillCategories,
|
|
11
13
|
getSkillsByCategory,
|
|
12
14
|
isGitRepo,
|
|
13
15
|
isTrieInitialized,
|
|
14
|
-
loadConfig
|
|
15
|
-
|
|
16
|
+
loadConfig,
|
|
17
|
+
loadSavedPatterns
|
|
18
|
+
} from "./chunk-YSES743V.js";
|
|
16
19
|
import {
|
|
17
20
|
getVulnerabilityStats,
|
|
18
21
|
getVulnerabilityTrie,
|
|
@@ -9285,6 +9288,7 @@ var TrieScanTool = class {
|
|
|
9285
9288
|
this.logRiskAssessment(context, riskLevel);
|
|
9286
9289
|
this.progress.startPhase("ai-review", "Selecting AI agents...");
|
|
9287
9290
|
await this.ensureCustomSkillsLoaded();
|
|
9291
|
+
const savedPatterns = await loadSavedPatterns(workDir);
|
|
9288
9292
|
let selectedAgents = forceAgents ? this.agentRegistry.getAgentsByNames(forceAgents) : await this.triager.selectAgents(context, riskLevel);
|
|
9289
9293
|
if (excludeAgents.size > 0) {
|
|
9290
9294
|
const before = selectedAgents.length;
|
|
@@ -9294,6 +9298,17 @@ var TrieScanTool = class {
|
|
|
9294
9298
|
console.error(` Excluding ${removed} agent(s): ${Array.from(excludeAgents).join(", ")}`);
|
|
9295
9299
|
}
|
|
9296
9300
|
}
|
|
9301
|
+
const savedDetectionAgents = getDetectionRuleAgents(savedPatterns).filter((agent) => !excludeAgents.has(agent));
|
|
9302
|
+
if (savedDetectionAgents.length > 0) {
|
|
9303
|
+
const selectedNames = new Set(selectedAgents.map((a) => a.name));
|
|
9304
|
+
const extraAgents = this.agentRegistry.getAgentsByNames(savedDetectionAgents).filter((a) => !selectedNames.has(a.name));
|
|
9305
|
+
if (extraAgents.length > 0) {
|
|
9306
|
+
selectedAgents.push(...extraAgents);
|
|
9307
|
+
if (!isInteractiveMode()) {
|
|
9308
|
+
console.error(` Added ${extraAgents.length} saved scout(s): ${extraAgents.map((a) => a.name).join(", ")}`);
|
|
9309
|
+
}
|
|
9310
|
+
}
|
|
9311
|
+
}
|
|
9297
9312
|
const allAgentNames = this.agentRegistry.getSkillNames();
|
|
9298
9313
|
this.logTriaging(selectedAgents.map((a) => a.name), allAgentNames, context, riskLevel);
|
|
9299
9314
|
this.progress.update(`${selectedAgents.length} agents selected for ${riskLevel} risk code`);
|
|
@@ -9343,6 +9358,23 @@ var TrieScanTool = class {
|
|
|
9343
9358
|
timeoutMs
|
|
9344
9359
|
}
|
|
9345
9360
|
);
|
|
9361
|
+
const savedPatternIssues = await buildSavedPatternIssues(
|
|
9362
|
+
savedPatterns,
|
|
9363
|
+
validFiles,
|
|
9364
|
+
async (filePath) => readFile7(filePath, "utf-8")
|
|
9365
|
+
);
|
|
9366
|
+
if (savedPatternIssues.length > 0) {
|
|
9367
|
+
agentResults.push({
|
|
9368
|
+
agent: "saved-patterns",
|
|
9369
|
+
issues: savedPatternIssues,
|
|
9370
|
+
executionTime: 0,
|
|
9371
|
+
success: true,
|
|
9372
|
+
metadata: {
|
|
9373
|
+
filesAnalyzed: validFiles.length,
|
|
9374
|
+
linesAnalyzed: 0
|
|
9375
|
+
}
|
|
9376
|
+
});
|
|
9377
|
+
}
|
|
9346
9378
|
const allIssues = agentResults.flatMap((result2) => result2.issues);
|
|
9347
9379
|
const issueAnalyzer = new IssueAnalyzer();
|
|
9348
9380
|
const priorityReport = issueAnalyzer.analyzeIssues(allIssues);
|
|
@@ -9983,4 +10015,4 @@ export {
|
|
|
9983
10015
|
InteractiveDashboard,
|
|
9984
10016
|
TrieScanTool
|
|
9985
10017
|
};
|
|
9986
|
-
//# sourceMappingURL=chunk-
|
|
10018
|
+
//# sourceMappingURL=chunk-HNDHVFA3.js.map
|