@triedotdev/mcp 1.0.83 → 1.0.84

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.
Files changed (36) hide show
  1. package/README.md +622 -0
  2. package/dist/{chunk-W4SQE6F7.js → chunk-4U3DNRUA.js} +4 -4
  3. package/dist/{chunk-YHQYOD6M.js → chunk-4UVTFL2T.js} +7 -8
  4. package/dist/{chunk-YHQYOD6M.js.map → chunk-4UVTFL2T.js.map} +1 -1
  5. package/dist/{chunk-WGECLUDQ.js → chunk-7UPNCM66.js} +111 -23
  6. package/dist/chunk-7UPNCM66.js.map +1 -0
  7. package/dist/{chunk-7OVM6KEY.js → chunk-DXBYHIA7.js} +7 -7
  8. package/dist/{chunk-EWIEXQES.js → chunk-KGVKUMFO.js} +2 -2
  9. package/dist/{chunk-U5P3O5G5.js → chunk-TDWPEV3N.js} +3 -3
  10. package/dist/{chunk-B7CLAOEK.js → chunk-THJKXIMJ.js} +5 -4
  11. package/dist/chunk-THJKXIMJ.js.map +1 -0
  12. package/dist/{chunk-75J4HQTD.js → chunk-X3E6ISEG.js} +2 -2
  13. package/dist/{chunk-IDDEVC3M.js → chunk-Y23VXKHO.js} +8 -8
  14. package/dist/{chunk-CGALCUZE.js → chunk-Z6JP2QQU.js} +3 -3
  15. package/dist/cli/main.js +9 -10
  16. package/dist/cli/main.js.map +1 -1
  17. package/dist/cli/yolo-daemon.js +9 -9
  18. package/dist/{goal-manager-NHPEUWFY.js → goal-manager-JTM6MOZG.js} +4 -4
  19. package/dist/{guardian-agent-GWYDNLWC.js → guardian-agent-RIF7XBFL.js} +7 -7
  20. package/dist/index.js +18 -18
  21. package/dist/index.js.map +1 -1
  22. package/dist/{issue-store-RKJVOKSJ.js → issue-store-AZ3D4LOG.js} +2 -2
  23. package/dist/workers/agent-worker.js +3 -3
  24. package/package.json +1 -1
  25. package/dist/chunk-B7CLAOEK.js.map +0 -1
  26. package/dist/chunk-WGECLUDQ.js.map +0 -1
  27. /package/dist/{chunk-W4SQE6F7.js.map → chunk-4U3DNRUA.js.map} +0 -0
  28. /package/dist/{chunk-7OVM6KEY.js.map → chunk-DXBYHIA7.js.map} +0 -0
  29. /package/dist/{chunk-EWIEXQES.js.map → chunk-KGVKUMFO.js.map} +0 -0
  30. /package/dist/{chunk-U5P3O5G5.js.map → chunk-TDWPEV3N.js.map} +0 -0
  31. /package/dist/{chunk-75J4HQTD.js.map → chunk-X3E6ISEG.js.map} +0 -0
  32. /package/dist/{chunk-IDDEVC3M.js.map → chunk-Y23VXKHO.js.map} +0 -0
  33. /package/dist/{chunk-CGALCUZE.js.map → chunk-Z6JP2QQU.js.map} +0 -0
  34. /package/dist/{goal-manager-NHPEUWFY.js.map → goal-manager-JTM6MOZG.js.map} +0 -0
  35. /package/dist/{guardian-agent-GWYDNLWC.js.map → guardian-agent-RIF7XBFL.js.map} +0 -0
  36. /package/dist/{issue-store-RKJVOKSJ.js.map → issue-store-AZ3D4LOG.js.map} +0 -0
package/README.md CHANGED
@@ -1,5 +1,627 @@
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.
4
+
5
+ Download Workspace Follow on X
6
+
7
+ ## What Trie Does
8
+
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
+
15
+ ## Goal
16
+
17
+ Trie exists so you can maintain multiple codebases as one person without losing your mind.
18
+
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
+
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
+
23
+ Your thinking and planning keep up with code generation. Your decisions persist across tools. Your edge cases don't get forgotten.
24
+
25
+ ## Quick Start
26
+
27
+ ### 1. Install Trie
28
+
29
+ Make sure you have Node.js installed, then:
30
+
31
+ ```bash
32
+ # Install Trie globally
33
+ npm install -g trie
34
+
35
+ # Set up in your project
36
+ cd your-project
37
+ trie init
38
+ ```
39
+
40
+ ### 2. Run Your First Scan
41
+
42
+ ```bash
43
+ # Scan your entire codebase
44
+ trie scan
45
+
46
+ # Quick health check
47
+ trie status
48
+ ```
49
+
50
+ ### 3. Start Teaching Trie
51
+
52
+ When bugs happen, tell Trie about them:
53
+
54
+ ```bash
55
+ # Report a specific incident
56
+ trie tell "Users can't log in after password reset"
57
+
58
+ # Train Trie from your history (reverts/bugfixes)
59
+ trie learn
60
+
61
+ # Give feedback on patterns (staged files)
62
+ trie ok # Pattern is good
63
+ trie bad # Pattern is bad
64
+ ```
65
+
66
+ ## Why Trie Exists
67
+
68
+ Building apps with AI tools like Cursor and Claude Code is incredibly fast - but maintaining them alone is a nightmare. You fix a bug and forget why it happened. The same issues keep coming back. Your codebase grows faster than your memory of it.
69
+
70
+ The real challenge isn't generating code—it's maintaining it. Real software has countless edge cases. Every architectural decision involves tradeoffs. As you switch between Cursor, Claude Code, terminal, and CI/CD, context gets lost. You make a decision in one tool, forget it in another, and repeat the same mistakes.
71
+
72
+ You shipped an MVP. You've got traction. Maybe even paying customers. Now you're in the maintenance phase—where the hard work happens. Where you handle edge cases, make tradeoffs, and keep the system coherent as it grows. Where you need your thinking and planning to keep pace with rapid code generation.
73
+
74
+ Trie remembers your decisions across tools, tracks the tradeoffs you've made, and maintains system coherence as your codebase evolves. It solves this by being your persistent memory. It keeps a ledger so it remembers what broke before, learns patterns across your projects, and warns you before you ship risky code. Tools like Cursor Bugbot are great, but just flagging issues isn't going to help you avoid similar patterns in the future. With Trie, you'll find quickly that you end up architecting apps and prompting better.
75
+
76
+ ## Key Features
77
+
78
+ ### Smart Memory
79
+
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
+
86
+ ### Intelligent Analysis
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
93
+
94
+ ### Development Integration
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
99
+
100
+ ### Developer Experience
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
105
+
106
+ ## How It Works
107
+
108
+ ### The Guardian System
109
+
110
+ Trie uses a "Guardian Agent" architecture:
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
116
+
117
+ ### Memory That Travels
118
+
119
+ ```
120
+ your-project/
121
+ ├── .trie/
122
+ │ ├── memory/ # Incident history
123
+ │ ├── patterns/ # Learned patterns
124
+ │ ├── context.json # Project knowledge graph
125
+ │ ├── context.db # SQLite graph (decisions, relationships)
126
+ │ └── config.json # Settings
127
+ ├── src/
128
+ └── .git/
129
+ ```
130
+
131
+ The .trie/ folder commits with your code, so your project's intelligence is preserved and shared across:
132
+
133
+ Local development
134
+ CI/CD pipelines
135
+ Team members
136
+ Different machines
137
+
138
+ ### Decision Memory Across Tools
139
+
140
+ Trie maintains a Context Graph that tracks decisions, tradeoffs, and architectural choices:
141
+
142
+ Decision nodes store why you made certain choices and what tradeoffs were considered
143
+ Cross-tool access - Cursor, Claude, VS Code, CLI, and CI/CD all read from the same .trie/ folder
144
+ Context trail - Knows which environment ran which analysis and when
145
+ Relationship tracking - Files ↔ Changes ↔ Incidents ↔ Fixes ↔ Decisions
146
+
147
+ When you switch from Cursor to Claude Code to terminal, Trie remembers. Your thinking and planning keep up with code generation because every tool shares the same memory.
148
+
149
+ ## Core Workflow
150
+
151
+ ### 1. Teaching Phase
152
+
153
+ ```bash
154
+ # Something breaks in production
155
+ trie tell "Payment processing failed for EU customers"
156
+
157
+ # Trie learns: "payments/" + "EU" + "failed" = high risk pattern
158
+ # Also records: decision context, affected files, tradeoffs made
159
+ ```
160
+
161
+ ### 2. Prevention Phase
162
+
163
+ ```bash
164
+ # Later, you modify payment code
165
+ git add src/payments/eu-handler.js
166
+ git commit -m "Update EU payment logic"
167
+
168
+ # Trie warns: "This area broke 2 weeks ago with EU payments. Consider extra testing."
169
+ # Context: Remembers the decision you made last time, the edge case that caused the issue
170
+ ```
171
+
172
+ ### 3. Feedback Loop
173
+
174
+ ```bash
175
+ # Warning was helpful
176
+ trie ok
177
+
178
+ # Warning was wrong
179
+ trie bad
180
+
181
+ # Trie adjusts confidence for similar future warnings
182
+ # Also updates: decision patterns, edge case recognition, tradeoff understanding
183
+ ```
184
+
185
+ ### 4. Maintenance Phase
186
+
187
+ This is where Trie shines. As your app grows and you handle edge cases:
188
+
189
+ ```bash
190
+ # Working in Cursor, you make a decision about error handling
191
+ # Trie records it in the context graph
192
+
193
+ # Switch to Claude Code later
194
+ # Same context graph, same decisions remembered
195
+
196
+ # Push from terminal
197
+ # Git hooks check against your full history of decisions and incidents
198
+
199
+ # CI/CD runs
200
+ # Same checks, same memory, same coherence
201
+ ```
202
+
203
+ Edge cases, tradeoffs, and system coherence—Trie handles the hard part that can't be automated by remembering what you decided, why you decided it, and what happened as a result.
204
+
205
+ ## Advanced Features
206
+
207
+ ### Goals & Hypotheses
208
+
209
+ Set improvement goals and test theories:
210
+
211
+ ```bash
212
+ # Set a goal
213
+ trie goal add "Reduce authentication bugs by 50%"
214
+
215
+ # Add a hypothesis
216
+ trie hypothesis add "Code reviews reduce bug rate"
217
+
218
+ # Trie tracks progress and validates hypotheses over time
219
+ ```
220
+
221
+ ### Watch Mode
222
+
223
+ Real-time monitoring with visual dashboard:
224
+
225
+ ```bash
226
+ trie watch
227
+ ```
228
+
229
+ Interactive panels for goals, memory, scout activity, and more.
230
+
231
+ Running in Background: To keep trie watch running in the background, use screen or tmux:
232
+
233
+ ```bash
234
+ # Using screen
235
+ screen -S trie-watch
236
+ trie watch
237
+ # Press Ctrl+A then D to detach
238
+ # Reattach with: screen -r trie-watch
239
+
240
+ # Using tmux
241
+ tmux new -s trie-watch
242
+ trie watch
243
+ # Press Ctrl+B then D to detach
244
+ # Reattach with: tmux attach -t trie-watch
245
+ ```
246
+
247
+ This allows you to keep the guardian running while using other terminals. The interactive dashboard will be available when you reattach.
248
+
249
+ ### JIT Defect Prediction ("Gotchas")
250
+
251
+ Trie connects to your issue tracker and project history to predict problems while you work:
252
+
253
+ ```bash
254
+ # 1. Connect Linear
255
+ trie linear auth <your-api-key>
256
+ trie linear sync
257
+
258
+ # 2. Learn from history automatically
259
+ trie learn
260
+
261
+ # 3. Predict for current changes
262
+ trie gotcha
263
+ ```
264
+
265
+ Trie will warn you if your current task correlates with historical regressions or high-risk signatures.
266
+
267
+ ### Integration with AI Coding Tools
268
+
269
+ Trie provides MCP (Model Context Protocol) tools for seamless integration with Claude, Cursor, and other AI assistants:
270
+
271
+ trie_scan - Analyze code with AI-friendly output
272
+ trie_check - Quick risk assessment
273
+ trie_tell - Report incidents
274
+ trie_memory - Search incident history
275
+ trie_fix - Apply suggested fixes
276
+
277
+ ## Built-in Scouts
278
+
279
+ Trie includes 26 specialized analyzers:
280
+
281
+ ### Security & Compliance
282
+
283
+ Security Scout - Vulnerabilities, injection risks, secrets
284
+ Privacy Scout - PII handling, GDPR/HIPAA compliance
285
+ Legal Scout - Regulatory compliance patterns
286
+ SOC2 Scout - Access controls, audit trails
287
+
288
+ ### Code Quality
289
+
290
+ Bug Scout - Common bugs, edge cases, null safety
291
+ Architecture Scout - SOLID principles, scalability issues
292
+ Types Scout - Type errors, missing annotations
293
+ Clean Scout - AI-generated code cleanup
294
+
295
+ ### User Experience
296
+
297
+ Accessibility Scout - WCAG compliance, screen readers
298
+ UX Scout - User journey analysis, usability issues
299
+ Design Scout - Visual consistency, design systems
300
+
301
+ ### Operations
302
+
303
+ DevOps Scout - Configuration issues, deployment patterns
304
+ Performance Scout - Speed bottlenecks, optimization opportunities
305
+
306
+ View all scouts →
307
+
308
+ ## Installation & Setup
309
+
310
+ ### Requirements
311
+
312
+ Node.js 16 or higher
313
+ Git repository
314
+
315
+ ### Installation
316
+
317
+ ```bash
318
+ # Install globally
319
+ npm install -g trie
320
+
321
+ # Or use npx for one-time runs
322
+ npx trie scan
323
+ ```
324
+
325
+ ### Project Setup
326
+
327
+ ```bash
328
+ # Initialize in your project
329
+ cd your-project
330
+ trie init
331
+
332
+ # This creates:
333
+ # - .trie/ directory with initial config
334
+ # - Git hooks for automatic checking
335
+ # - Bootstrap files (optional)
336
+ ```
337
+
338
+ ### API Key Configuration
339
+
340
+ Trie works best with these keys:
341
+
342
+ ANTHROPIC_API_KEY: Enables AI-powered analysis and explanations.
343
+ LINEAR_API_KEY: Enables JIT defect prediction by syncing your active tickets.
344
+
345
+ #### 1. Set via Environment (Recommended for MCP)
346
+
347
+ Add these to your .env file or shell config:
348
+
349
+ ```bash
350
+ export ANTHROPIC_API_KEY=sk-ant-...
351
+ export LINEAR_API_KEY=lin_api_...
352
+ ```
353
+
354
+ #### 2. Set via CLI (Persistent per project)
355
+
356
+ ```bash
357
+ trie linear auth <your-key>
358
+ ```
359
+
360
+ #### 3. Set in MCP Config (Cursor/Claude Code)
361
+
362
+ Add to your MCP server configuration:
363
+
364
+ ```json
365
+ {
366
+ "mcpServers": {
367
+ "trie": {
368
+ "command": "npx",
369
+ "args": ["-y", "@triedotdev/mcp"],
370
+ "env": {
371
+ "ANTHROPIC_API_KEY": "your-key",
372
+ "LINEAR_API_KEY": "your-key"
373
+ }
374
+ }
375
+ }
376
+ }
377
+ ```
378
+
379
+ ### AI Tool Integration
380
+
381
+ For Claude (MCP): Add to your MCP settings:
382
+
383
+ ```json
384
+ {
385
+ "mcpServers": {
386
+ "trie": {
387
+ "command": "trie",
388
+ "args": ["mcp"],
389
+ "env": {
390
+ "ANTHROPIC_API_KEY": "your-api-key-here",
391
+ "LINEAR_API_KEY": "your-key"
392
+ }
393
+ }
394
+ }
395
+ }
396
+ ```
397
+
398
+ For Cursor: Cursor has built-in MCP support. Add the above configuration to your Cursor MCP settings.
399
+
400
+ Note: VS Code extension is coming soon.
401
+
402
+ ## CLI Reference
403
+
404
+ ### Basic Commands
405
+
406
+ ```bash
407
+ trie init # Set up Trie in your project
408
+ trie scan # Analyze codebase with intelligent skill selection
409
+ trie status # View project health and memory stats
410
+ trie learn # Train Trie from history or feedback
411
+ trie gotcha # Predict problems with current changes
412
+ ```
413
+
414
+ ### Memory Management
415
+
416
+ ```bash
417
+ trie memory search "auth" # Search incident history
418
+ trie memory stats # View memory statistics
419
+ trie memory purge smart # Clean up old/resolved issues
420
+ trie learn # Extract patterns from reverts/fixes
421
+ ```
422
+
423
+ ### Goals & Learning
424
+
425
+ ```bash
426
+ trie goal add "<goal>" # Set improvement goal
427
+ trie hypothesis add "<theory>" # Test a hypothesis
428
+ trie goal list # View progress
429
+ trie linear sync # Sync Linear tickets for intent context
430
+ ```
431
+
432
+ ### Feedback & Training
433
+
434
+ ```bash
435
+ trie ok # Pattern is good (alias: learn ok)
436
+ trie bad # Pattern is bad (alias: learn bad)
437
+ trie learn # Learn from your git history
438
+ trie pause # Disable warnings for 1 hour
439
+ ```
440
+
441
+ ### Watch Mode
442
+
443
+ ```bash
444
+ trie watch # Start interactive monitoring dashboard
445
+
446
+ # Run in background with screen/tmux:
447
+ screen -S trie-watch && trie watch # Detach: Ctrl+A, D
448
+ tmux new -s trie-watch && trie watch # Detach: Ctrl+B, D
449
+ ```
450
+
451
+ ## Configuration
452
+
453
+ ### Scan Behavior
454
+
455
+ Create .trie/config.json:
456
+
457
+ ```json
458
+ {
459
+ "scanOptions": {
460
+ "maxConcurrency": 4,
461
+ "timeoutMs": 30000,
462
+ "includeNodeModules": false
463
+ },
464
+ "autoEscalation": {
465
+ "enabled": true,
466
+ "webhookUrl": "https://hooks.slack.com/...",
467
+ "quietHours": { "start": "21:00", "end": "08:00" }
468
+ }
469
+ }
470
+ ```
471
+
472
+ ### Git Hooks
473
+
474
+ Installed automatically with trie init:
475
+
476
+ pre-commit - Quick scan of staged files
477
+ post-commit - Update context graph
478
+ pre-push - Block critical issues (can be bypassed)
479
+
480
+ To bypass:
481
+
482
+ ```bash
483
+ git push --no-verify # Skip all hooks
484
+ TRIE_BYPASS=1 git push # Skip Trie but log bypass
485
+ ```
486
+
487
+ ## CI/CD Integration
488
+
489
+ ### GitHub Actions
490
+
491
+ ```bash
492
+ # Generate workflow file
493
+ trie ci github
494
+
495
+ # Creates .github/workflows/trie.yml with:
496
+ # - Full codebase scan
497
+ # - Memory caching for speed
498
+ # - SARIF upload for GitHub Security tab
499
+ ```
500
+
501
+ ### Custom CI
502
+
503
+ ```bash
504
+ # In your CI pipeline
505
+ npm install -g trie
506
+ trie scan --output=sarif > trie-results.sarif
507
+ ```
508
+
509
+ ## Memory System
510
+
511
+ ### Local Memory
512
+
513
+ Each project stores its own memory in .trie/memory/:
514
+
515
+ Incident reports and patterns
516
+ Risk scores and confidence levels
517
+ Performance over time
518
+
519
+ ### Cross-Project Memory
520
+
521
+ Global patterns stored in ~/.trie/memory/:
522
+
523
+ Patterns that apply across projects
524
+ Skill effectiveness data
525
+ Your personal coding patterns
526
+
527
+ ### Memory Management
528
+
529
+ ```bash
530
+ # View capacity (default: 10,000 issues)
531
+ trie memory stats
532
+
533
+ # Smart cleanup (removes resolved + old low-priority)
534
+ trie memory purge smart
535
+
536
+ # Remove all resolved issues
537
+ trie memory purge resolved
538
+
539
+ # Remove issues older than 90 days
540
+ trie memory purge old --days=90
541
+ ```
542
+
543
+ What happens at the 10,000 issue cap: Trie will deduplicate new repeats, compact older issues into summaries, and if it still exceeds the cap it will prune the oldest/lowest-value issues (it does not “overwrite” in place).
544
+
545
+ ## Custom Skills
546
+
547
+ ### Adding External Skills
548
+
549
+ ```bash
550
+ # From skill repositories
551
+ trie skill install vercel/ai-best-practices
552
+ trie skill install anthropic/typescript-patterns
553
+
554
+ # From any GitHub repo
555
+ trie skill install username/repo-name
556
+ ```
557
+
558
+ ### Security & Safe Installation
559
+
560
+ Trie automatically scans all skills for security risks before installation.
561
+
562
+ When installing skills:
563
+
564
+ Skills are scanned for malicious patterns
565
+ Critical risks flagged with strong warnings
566
+ High risks flagged with warnings
567
+ Shell commands Trie runs are logged to .trie/audit/ (e.g. skill install git clone, PR review git/gh, skill gating which/where, file picker helpers)
568
+
569
+ ```bash
570
+ # View audit logs
571
+ trie audit logs
572
+
573
+ # View security info for installed skill
574
+ trie skills info skill-name
575
+ ```
576
+
577
+ Best Practices:
578
+
579
+ Only install from trusted sources (verified organizations)
580
+ Review security warnings and all .md carefully before using
581
+ Check audit logs periodically: trie audit stats (and investigate anything unexpected with trie audit skill <name>)
582
+
583
+ ### Creating Your Own Skills
584
+
585
+ ```bash
586
+ # Create from documentation
587
+ trie skill create my-skill --doc=./coding-standards.md
588
+
589
+ # This creates a custom analyzer based on your documentation
590
+ ```
591
+
592
+ ### Skill Format
593
+
594
+ Skills are simple markdown files with detection rules:
595
+
596
+ ```markdown
597
+ # My Custom Skill
598
+
599
+ ## Detection Rules
600
+ - File patterns: `*.js`, `*.ts`
601
+ - Code patterns: `console.log`, `debugger`
602
+
603
+ ## Analysis
604
+ Look for debugging statements left in production code.
605
+
606
+ ## Fix Suggestions
607
+ Remove or replace with proper logging.
608
+ ```
609
+
610
+ ## Troubleshooting
611
+
612
+ ### Common Issues
613
+
614
+ Trie not finding issues: Your codebase might be very clean, or you haven't taught Trie about your specific patterns yet. Try trie tell to report some known issues.
615
+
616
+ Scans are slow: Reduce concurrency with --max-concurrency=2 or exclude large directories in config.
617
+
618
+ Too many false positives: Use trie bad to train Trie, and consider adjusting scout sensitivity in config.
619
+
620
+ Hooks not working: Reinstall with trie init. Make sure you have write permissions to .git/hooks/.
621
+
622
+ this is what our github readme should say
623
+ # Trie: Trainable AI Agent for Maintaining AI-Generated Codebases
624
+
3
625
  **A trainable AI agent that watches all of your codebases, learns from your incidents, and prevents repeat bugs before they ship.**
4
626
 
5
627
  [![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)
@@ -3,15 +3,15 @@ import {
3
3
  getSkillRegistry,
4
4
  loadContextState,
5
5
  runExecFile
6
- } from "./chunk-CGALCUZE.js";
6
+ } from "./chunk-Z6JP2QQU.js";
7
7
  import {
8
8
  getGlobalMemoryStats
9
- } from "./chunk-EWIEXQES.js";
9
+ } from "./chunk-KGVKUMFO.js";
10
10
  import {
11
11
  getHistoricalInsights,
12
12
  getMemoryStats,
13
13
  getRecentIssues
14
- } from "./chunk-WGECLUDQ.js";
14
+ } from "./chunk-7UPNCM66.js";
15
15
  import {
16
16
  getWorkingDirectory
17
17
  } from "./chunk-CM7EHNQK.js";
@@ -2245,4 +2245,4 @@ export {
2245
2245
  getSkillsByCategory,
2246
2246
  getSkillCategories
2247
2247
  };
2248
- //# sourceMappingURL=chunk-W4SQE6F7.js.map
2248
+ //# sourceMappingURL=chunk-4U3DNRUA.js.map
@@ -8,10 +8,10 @@ import {
8
8
  getUncommittedChanges,
9
9
  getWorkingTreeDiff,
10
10
  loadConfig
11
- } from "./chunk-W4SQE6F7.js";
11
+ } from "./chunk-4U3DNRUA.js";
12
12
  import {
13
13
  ContextGraph
14
- } from "./chunk-B7CLAOEK.js";
14
+ } from "./chunk-THJKXIMJ.js";
15
15
  import {
16
16
  scanForVulnerabilities
17
17
  } from "./chunk-FCMAQSV7.js";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-6NLHFIYA.js";
24
24
  import {
25
25
  storeIssues
26
- } from "./chunk-WGECLUDQ.js";
26
+ } from "./chunk-7UPNCM66.js";
27
27
  import {
28
28
  getWorkingDirectory
29
29
  } from "./chunk-CM7EHNQK.js";
@@ -1459,8 +1459,9 @@ var LearningEngine = class {
1459
1459
  * Record manual feedback (trie ok/bad) and adjust pattern confidence
1460
1460
  */
1461
1461
  async recordManualFeedback(helpful, files, note) {
1462
+ const context = files[0] ?? "unspecified";
1462
1463
  const decision = await this.graph.addNode("decision", {
1463
- context: files.length > 0 ? files[0] : "unspecified",
1464
+ context,
1464
1465
  decision: helpful ? "helpful" : "not helpful",
1465
1466
  reasoning: note ?? null,
1466
1467
  outcome: helpful ? "good" : "bad",
@@ -1543,10 +1544,8 @@ var LearningEngine = class {
1543
1544
 
1544
1545
  // src/ingest/linear-ingester.ts
1545
1546
  var LinearIngester = class {
1546
- projectPath;
1547
1547
  graph;
1548
- constructor(projectPath, graph) {
1549
- this.projectPath = projectPath;
1548
+ constructor(_projectPath, graph) {
1550
1549
  this.graph = graph;
1551
1550
  }
1552
1551
  async syncTickets() {
@@ -1688,4 +1687,4 @@ export {
1688
1687
  LearningEngine,
1689
1688
  LinearIngester
1690
1689
  };
1691
- //# sourceMappingURL=chunk-YHQYOD6M.js.map
1690
+ //# sourceMappingURL=chunk-4UVTFL2T.js.map