@triedotdev/mcp 1.0.87 → 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 CHANGED
@@ -1,29 +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
- <p align="left">
6
- <a href="https://www.trie.dev"><img alt="Download Workspace" src="https://img.shields.io/badge/Download_Workspace-0b0f14?style=for-the-badge&logo=vercel&logoColor=white"></a>
7
- <a href="https://x.com/louiskishfy"><img alt="Follow on X" src="https://img.shields.io/badge/Follow_on_X-000000?style=for-the-badge&logo=x&logoColor=white"></a>
8
- </p>
5
+ [![Download Workspace](https://img.shields.io/badge/Download-Trie%20Workspace-blue)](https://www.trie.dev) [![Follow on X](https://img.shields.io/badge/Follow-@louiskishfy-1DA1F2?logo=x)](https://x.com/louiskishfy)
9
6
 
10
7
  ## What Trie Does
11
8
 
12
- - 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.
13
- - Sets and tracks goals: "Reduce login bugs by 50%" then actually measures progress and celebrates wins.
14
- - Tests your theories: "Mondays have more bugs" — Trie validates with real data and builds confidence over time.
15
- - Learns from your incidents: Train it on your specific patterns, not generic rules that don't fit your prompting.
16
- - Predicts "Gotchas" proactively: Ingests Linear tickets and correlates them with past failures to warn you before you even push code.
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
17
14
 
18
15
  ## Goal
19
16
 
20
- 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.
21
18
 
22
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.
23
20
 
24
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.
25
22
 
26
- 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.**
27
24
 
28
25
  ## Quick Start
29
26
 
@@ -151,6 +148,22 @@ When you switch from Cursor to Claude Code to terminal, Trie remembers. Your thi
151
148
 
152
149
  ## Core Workflow
153
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
+
154
167
  ### 1. Teaching Phase
155
168
 
156
169
  ```bash
@@ -485,6 +498,38 @@ git push --no-verify # Skip all hooks
485
498
  TRIE_BYPASS=1 git push # Skip Trie but log bypass
486
499
  ```
487
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
+
488
533
  ## CI/CD Integration
489
534
 
490
535
  ### GitHub Actions
@@ -1037,6 +1082,37 @@ trie learn # Learn from your git history
1037
1082
  trie pause # Disable warnings for 1 hour
1038
1083
  ```
1039
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
+
1040
1116
  ### Watch Mode
1041
1117
  ```bash
1042
1118
  trie watch # Start interactive monitoring dashboard
@@ -8,7 +8,7 @@ import {
8
8
  getUncommittedChanges,
9
9
  getWorkingTreeDiff,
10
10
  loadConfig
11
- } from "./chunk-4U3DNRUA.js";
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-4UVTFL2T.js.map
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
- } from "./chunk-4U3DNRUA.js";
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-KERQ4JXR.js.map
10018
+ //# sourceMappingURL=chunk-HNDHVFA3.js.map