@triedotdev/mcp 1.0.148 → 1.0.149

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 (51) hide show
  1. package/README.md +134 -73
  2. package/dist/{chunk-4PAAGLKO.js → chunk-53KUI7RQ.js} +6 -4
  3. package/dist/{chunk-4PAAGLKO.js.map → chunk-53KUI7RQ.js.map} +1 -1
  4. package/dist/{chunk-XTTZAQWJ.js → chunk-72KSLD7A.js} +4 -4
  5. package/dist/{chunk-WMDFK7LI.js → chunk-B2AHQ2IR.js} +12 -12
  6. package/dist/{chunk-LT6VUZG2.js → chunk-CU5VDH6F.js} +2 -2
  7. package/dist/{chunk-4MJ52WBH.js → chunk-EFWVF6TI.js} +4 -2
  8. package/dist/chunk-EFWVF6TI.js.map +1 -0
  9. package/dist/{chunk-N2EDZTKG.js → chunk-GAL7OIYU.js} +11 -11
  10. package/dist/{chunk-J7CEBSEB.js → chunk-HYNDXZAU.js} +23 -112
  11. package/dist/chunk-HYNDXZAU.js.map +1 -0
  12. package/dist/{chunk-YEIJW6X6.js → chunk-ILGMFND2.js} +4 -4
  13. package/dist/{chunk-3MUCUZ46.js → chunk-OTQEFXHU.js} +2 -2
  14. package/dist/chunk-QH77RQB3.js +783 -0
  15. package/dist/chunk-QH77RQB3.js.map +1 -0
  16. package/dist/{chunk-T6PS3MXJ.js → chunk-ZDDE442Q.js} +5 -5
  17. package/dist/{chunk-62POBLFC.js → chunk-ZUEAHFSY.js} +180 -965
  18. package/dist/chunk-ZUEAHFSY.js.map +1 -0
  19. package/dist/cli/main.js +85 -90
  20. package/dist/cli/main.js.map +1 -1
  21. package/dist/cli/yolo-daemon.js +24 -148
  22. package/dist/cli/yolo-daemon.js.map +1 -1
  23. package/dist/{fast-analyzer-MWKCDRGD.js → fast-analyzer-CTT3MCPE.js} +3 -3
  24. package/dist/{goal-manager-ZBWKWEML.js → goal-manager-IGUMDGCA.js} +7 -6
  25. package/dist/{goal-validator-DA3JQ6JN.js → goal-validator-DV6DRSGF.js} +6 -5
  26. package/dist/{hypothesis-JCUMZKTG.js → hypothesis-O72ZLVOW.js} +7 -6
  27. package/dist/index.js +30 -116
  28. package/dist/index.js.map +1 -1
  29. package/dist/{insight-store-A5XXMFD6.js → insight-store-Q62UGMTF.js} +3 -3
  30. package/dist/{issue-store-LZWZIGM7.js → issue-store-4FPABLC6.js} +6 -3
  31. package/dist/ledger-43SIVE7X.js +43 -0
  32. package/dist/{trie-agent-6A7YBNTQ.js → trie-agent-ET3DAP5Y.js} +11 -10
  33. package/dist/trie-agent-ET3DAP5Y.js.map +1 -0
  34. package/package.json +5 -1
  35. package/dist/chunk-4MJ52WBH.js.map +0 -1
  36. package/dist/chunk-62POBLFC.js.map +0 -1
  37. package/dist/chunk-J7CEBSEB.js.map +0 -1
  38. /package/dist/{chunk-XTTZAQWJ.js.map → chunk-72KSLD7A.js.map} +0 -0
  39. /package/dist/{chunk-WMDFK7LI.js.map → chunk-B2AHQ2IR.js.map} +0 -0
  40. /package/dist/{chunk-LT6VUZG2.js.map → chunk-CU5VDH6F.js.map} +0 -0
  41. /package/dist/{chunk-N2EDZTKG.js.map → chunk-GAL7OIYU.js.map} +0 -0
  42. /package/dist/{chunk-YEIJW6X6.js.map → chunk-ILGMFND2.js.map} +0 -0
  43. /package/dist/{chunk-3MUCUZ46.js.map → chunk-OTQEFXHU.js.map} +0 -0
  44. /package/dist/{chunk-T6PS3MXJ.js.map → chunk-ZDDE442Q.js.map} +0 -0
  45. /package/dist/{fast-analyzer-MWKCDRGD.js.map → fast-analyzer-CTT3MCPE.js.map} +0 -0
  46. /package/dist/{goal-manager-ZBWKWEML.js.map → goal-manager-IGUMDGCA.js.map} +0 -0
  47. /package/dist/{goal-validator-DA3JQ6JN.js.map → goal-validator-DV6DRSGF.js.map} +0 -0
  48. /package/dist/{hypothesis-JCUMZKTG.js.map → hypothesis-O72ZLVOW.js.map} +0 -0
  49. /package/dist/{insight-store-A5XXMFD6.js.map → insight-store-Q62UGMTF.js.map} +0 -0
  50. /package/dist/{issue-store-LZWZIGM7.js.map → issue-store-4FPABLC6.js.map} +0 -0
  51. /package/dist/{trie-agent-6A7YBNTQ.js.map → ledger-43SIVE7X.js.map} +0 -0
package/README.md CHANGED
@@ -7,29 +7,29 @@
7
7
 
8
8
  ## What Trie Does
9
9
 
10
- Trie is a trainable AI agent that maintains a ledger that governs work across agents and humans:
10
+ Trie is governance for teams where agents and humans ship together. Every decision, direction change, and tradeoff gets recorded in a cryptographic ledger that every contributor—human or agent—reads from and writes to, across every tool in the stack.
11
11
 
12
12
  - **Autonomous Operation**: Run `trie watch` and the agent monitors your codebase 24/7
13
13
  - **Intelligent Extraction**: Automatically extracts decisions, facts, blockers from every change
14
- - **Cryptographic governance ledger**: Stores decisions, incidents, and fixes in a tamper-evident chain—the shared memory that travels from Cursor/Claude Code → CLI → CI/CD, solving the context-across-tools problem
14
+ - **Cryptographic governance ledger**: Tamper-evident, append-only chain of blocks—the shared memory that travels from Cursor/Claude Code → CLI → CI/CD
15
15
  - **Predictive Intelligence**: `trie gotcha` queries the ledger to predict problems before they happen
16
16
  - **Continuous Learning**: Feed it incidents with `trie tell`, teach it patterns with your history
17
17
 
18
- The ledger learns from every incident, decision, and fix. When you ship, Trie remembers. When something breaks, Trie learns. Over time, everyone on the team—human and agent—gets better at predicting what will go wrong before it does.
18
+ The work stays coherent not because someone held it together, but because the ledger did. When any contributor flags a direction change, the ledger surfaces the relevant history instantly. When an agent acts, it does so with full context of what was decided before and why.
19
19
 
20
- ### The Context-Across-Tools Problem (and How the Ledger Solves It)
20
+ ### The Context-Across-Tools Problem
21
21
 
22
- **The problem**: When work happens across Cursor, Claude Code, VS Code, the terminal, and CI/CD, context fragments. An agent makes a decision in one tool; a human forgets it in another. Each environment has its own memory—or none at all. You burn tokens re-explaining the same constraints, or worse, ship code that violates decisions made elsewhere.
22
+ **The problem**: When work happens across Cursor, Claude Code, VS Code, the terminal, and more, context fragments. An agent makes a decision in one tool; a human forgets it in another. Accountability and context diffuse across tools, models, and people until they belong to no one.
23
23
 
24
- **The solution**: Trie stores important information in a cryptographic governance ledger—a tamper-evident, append-only chain of blocks. Every decision, incident, fix, and tradeoff gets written to the ledger. Because the ledger lives in your `.trie/` folder and syncs across your team, every tool reads from the same source of truth. Cursor, Claude, the CLI, and CI/CD all query the same blocks. No more context loss. No more conflicting memories. The ledger is the shared brain that keeps agents and humans aligned across every tool you use.
24
+ **The solution**: Trie stores every decision, incident, fix, and tradeoff in a cryptographic governance ledger—a tamper-evident, append-only chain of blocks that lives in your `.trie/` folder and syncs across your team. Every tool reads from the same source of truth. The ledger surfaces the relevant history instantly in each contributor's native tool. No more context loss. No more conflicting memories.
25
25
 
26
- ## Goal
26
+ ## Why It Matters
27
27
 
28
- **Trie is the governance layer for teams where agents and humans ship together.**
28
+ Code is solved. The bottleneck isn't building—it's deciding what to build and whether the change aligns with how you got here.
29
29
 
30
- Every bug you fix teaches the ledger 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 extracted and stored automatically. The ledger keeps work compliant so you ship the right thing every time.
30
+ When agents and non-technical contributors can ship production changes, coordination tools built to manage engineering capacity break down. Linear tells you what's in the queue. GitHub tells you what changed. Neither tells you whether the change aligns with the decisions that came before.
31
31
 
32
- Instead of burning tokens on the same questions across different repos or forgetting why you architected something a certain way six months ago, the ledger remembers for everyone. Instead of agents and humans stepping on each other's decisions, the ledger maintains system coherence.
32
+ Every bug you fix teaches the ledger 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 extracted and stored automatically.
33
33
 
34
34
  The result: faster development with fewer production fires, because the ledger gets smarter every time something breaks—and every agent and human on the team benefits.
35
35
 
@@ -91,54 +91,66 @@ Tools like Cursor Bugbot flag issues—but flagging doesn't help you avoid simil
91
91
 
92
92
  ## Key Features
93
93
 
94
- ### Smart Memory
94
+ ### Governance That Scales
95
95
 
96
- - Git-based storage - Your project's memory travels with your code in `.trie/` folder.
97
- - Cross-project learning - Patterns discovered in one project help prevent bugs in others.
98
- - Incident tracking - Build a searchable history of what went wrong and why.
99
- - Decision memory - Remembers architectural choices and tradeoffs across Cursor, Claude, VS Code, CLI, and CI/CD.
100
- - Cryptographic governance ledger - Chain-of-blocks, append-only, tamper-evident; solves the context-across-tools problem; every tool reads from the same source of truth.
101
- - Governance that travels - The ledger keeps agents and humans compliant across all your tools.
96
+ - **Cryptographic ledger** - Tamper-evident, append-only chain of blocks; every tool reads from the same source of truth
97
+ - **True immutability** - Ledger entries never deleted, only marked as corrected; full audit trail for compliance
98
+ - **Decision memory** - Captures architectural choices, tradeoffs, and context across Cursor, Claude, VS Code, CLI, and CI/CD
99
+ - **Judgment artifacts** - Not just what shipped, but why, what was considered, and who decided
100
+ - **Git-based storage** - Your project's memory travels with your code in `.trie/` folder
102
101
 
103
- ### Intelligent Analysis
102
+ ### Intelligence That Compounds
104
103
 
105
- - Risk scoring - Intelligent priority ranking based on your actual incident history.
106
- - Edge case detection - Identifies recurring issues and patterns you've hit before.
107
- - System coherence - Tracks relationships between files, changes, incidents, fixes, and decisions.
104
+ - **Predictive analysis** - `trie gotcha` queries the ledger to predict problems before they happen
105
+ - **Pattern recognition** - Identifies recurring issues and edge cases from your actual incident history
106
+ - **Cross-project learning** - Patterns discovered in one project help prevent bugs in others
107
+ - **System coherence** - Tracks relationships between files, changes, incidents, fixes, and decisions
108
+ - **Continuous learning** - Gets better at predicting what matters in YOUR codebase over time
108
109
 
109
- ### Development Integration
110
+ ### Integration Built for Speed
110
111
 
111
- - Git hooks - Automatic checks before commits and pushes.
112
- - Watch mode - Real-time monitoring while you code.
113
- - Fast performance - Sub-500ms checks, won't slow down your workflow.
112
+ - **Multiple interfaces** - CLI, MCP tools for Claude/Cursor, visual dashboards, Slack notifications
113
+ - **Git hooks** - Automatic checks before commits and pushes
114
+ - **Watch mode** - Real-time monitoring while you code
115
+ - **Fast performance** - Sub-500ms checks, won't slow down your workflow
116
+ - **Flexible workflow** - Works with any editor, any git workflow, any deployment setup
114
117
 
115
- ### Developer Experience
118
+ ## How It Works
116
119
 
117
- - Plain English warnings - "This payment flow broke twice before" instead of cryptic codes.
118
- - Multiple interfaces - CLI, MCP tools for Claude/Cursor, visual dashboards.
119
- - Flexible workflow - Works with any editor, any git workflow, any deployment setup.
120
+ ### Memory Architecture
120
121
 
121
- ## How It Works
122
+ Trie maintains two complementary memory systems that work together to provide both fast queries and tamper-evident governance:
123
+
124
+ **1. Governance Ledger** (`.trie/memory/ledger.json`)
125
+ - **Purpose**: Cryptographic chain of what was detected and when
126
+ - **Properties**: Append-only, tamper-evident, never deleted
127
+ - **Used for**: Audit trail, compliance, historical analysis, gotcha predictions
128
+ - **Immutability**: Entries are marked as corrected, not deleted (see [Ledger Corrections](./docs/LEDGER_CORRECTIONS.md))
122
129
 
123
- ### The Trie Agent
130
+ **2. Issue Memory** (`.trie/memory/issues/`)
131
+ - **Purpose**: Fast searchable cache of detected issues
132
+ - **Properties**: Queryable, can be compacted and purged
133
+ - **Used for**: `trie memory search`, pattern recognition, recent issue queries
134
+ - **Lifecycle**: Subject to capacity limits; cleaned up via `trie memory purge` strategies
124
135
 
125
- Trie uses a proactive agent architecture:
136
+ Both systems sync across your team and travel with your codebase. The `.trie/` folder commits with your code, so your project's intelligence is preserved and shared across:
126
137
 
127
- - Analyzes your code for potential issues based on your incident history.
128
- - The agent decides what matters based on your history.
129
- - Memory Tree stores incident patterns using a trie data structure for fast lookups.
130
- - Learning Loop improves predictions based on your feedback.
138
+ Local development
139
+ CI/CD pipelines
140
+ Team members
141
+ Cursor/Claude/VS Code
142
+ Git hooks
131
143
 
132
- ### Memory That Travels
144
+ ### File Structure
133
145
 
134
146
  ```
135
147
  your-project/
136
148
  ├── .trie/
137
149
  │ ├── hot/ # In-memory current session
138
- │ ├── warm/ # Queryable decisions DB
150
+ │ ├── warm/ # Queryable governance DB
139
151
  │ │ └── decisions.db # SQLite database
140
152
  │ ├── cold/ # Archived history
141
- │ ├── memory/ # Incident history + ledger.json (cryptographic ledger)
153
+ │ ├── memory/ # Issue cache + ledger.json (cryptographic ledger)
142
154
  │ ├── patterns/ # Learned patterns
143
155
  │ ├── context.json # Project knowledge graph
144
156
  │ └── config.json # Settings
@@ -148,13 +160,7 @@ your-project/
148
160
  │ └── ledger-manifest.json
149
161
  ├── src/
150
162
  └── .git/
151
- ```
152
-
153
- The .trie/ folder commits with your code, so your project's intelligence is preserved and shared across:
154
-
155
- Local development
156
- CI/CD pipelines
157
- Team members
163
+ ```
158
164
  Different machines
159
165
 
160
166
  ### Decision Memory Across Tools
@@ -503,7 +509,7 @@ Git repository
503
509
  npm install -g trie
504
510
 
505
511
  # Or use npx for one-time runs
506
- npx trie scan
512
+ npx trie watch
507
513
  ```
508
514
 
509
515
  ### Project Setup
@@ -752,6 +758,46 @@ Or manually add to `.trie/config.json`:
752
758
  - Critical decision changes
753
759
  - Auto-escalation notifications
754
760
 
761
+ ### Ledger Corrections (Immutable Audit Trail)
762
+
763
+ The ledger is **append-only** - entries are never deleted. When mistakes happen, use corrections instead:
764
+
765
+ **Mark entries as corrected:**
766
+ ```bash
767
+ # Correct a false positive
768
+ trie ledger correct <entry-id> -r "Expected behavior, not a bug" -t false-positive
769
+
770
+ # Mark as fixed
771
+ trie ledger correct <entry-id> -r "Fixed in commit abc123"
772
+
773
+ # Batch corrections
774
+ trie ledger correct entry1 entry2 entry3 -r "Duplicate detections"
775
+ ```
776
+
777
+ **View correction stats:**
778
+ ```bash
779
+ # Show correction statistics
780
+ trie ledger corrections
781
+
782
+ # View history for specific entries
783
+ trie ledger corrections --entries <entry-id1> <entry-id2>
784
+ ```
785
+
786
+ **What happens:**
787
+ - Original entry preserved for audit trail
788
+ - Entry marked with status (`corrected` or `false-positive`)
789
+ - Correction metadata added (timestamp, reason, who)
790
+ - New correction entry appended to ledger
791
+ - Queries automatically filter out corrected entries
792
+
793
+ **Why immutability matters:**
794
+ - Full audit trail for compliance and trust
795
+ - Tamper-evidence through cryptographic chain
796
+ - Learn from false positives to improve detection
797
+ - Track correction rates over time
798
+
799
+ See [docs/LEDGER_CORRECTIONS.md](./docs/LEDGER_CORRECTIONS.md) for detailed usage.
800
+
755
801
  ## CI/CD Integration
756
802
 
757
803
  ### GitHub Actions
@@ -772,45 +818,60 @@ trie ci github
772
818
  # In your CI pipeline
773
819
  npm install -g trie
774
820
  # Query decision ledger for risks
775
- trie gotcha
776
- # Check memory for related incidents
777
- trie memory search "deployment"
778
- ```
779
821
 
780
- ## Memory System
822
+ ## Memory Architecture
781
823
 
782
- ### Local Memory
824
+ Trie maintains two complementary memory systems that work together:
783
825
 
784
- Each project stores its own memory in .trie/memory/:
826
+ ### 1. Governance Ledger (Primary Product)
785
827
 
786
- Incident reports and patterns
787
- Risk scores and confidence levels
788
- Performance over time
828
+ **Location:** `.trie/memory/ledger.json`
829
+ **Purpose:** Cryptographic, tamper-evident record of what was detected and when
830
+ **Architecture:** Append-only chain of blocks with merkle roots
789
831
 
790
- ### Cross-Project Memory
832
+ This is the **core governance layer** - the immutable audit trail that:
833
+ - Powers `trie gotcha` predictions
834
+ - Provides compliance and trust
835
+ - Never deleted, only corrected (see [Ledger Corrections](./docs/LEDGER_CORRECTIONS.md))
836
+ - Syncs across team via `.trie-shared/`
791
837
 
792
- Global patterns stored in ~/.trie/memory/:
838
+ The ledger is what makes Trie's governance verifiable and trustworthy. It's the permanent record.
793
839
 
794
- Patterns that apply across projects
795
- Your personal coding patterns
840
+ ### 2. Issue Memory (Query Cache)
796
841
 
797
- ### Memory Management
842
+ **Location:** `.trie/memory/issues.json`
843
+ **Purpose:** Fast searchable cache for pattern queries
844
+ **Complementary to:** The ledger
798
845
 
799
- ```bash
800
- # View capacity (default: 10,000 issues)
801
- trie memory stats
846
+ Issue memory caches:
847
+ - **Goal violations** caught by watch mode
848
+ - **Learning extractions** from `trie learn` (git history analysis)
849
+ - **Manual reports** via `trie tell` or chat
850
+ - **Working state** - tracks resolved/open/fixed status
851
+ - **Cross-project patterns** in `~/.trie/memory/`
852
+
853
+ **Each issue links back to the ledger** via `ledgerBlockHash` for full audit trail.
854
+
855
+ **Why both systems?**
856
+ - **Ledger** = immutable historical record (what was detected, when)
857
+ - **Issue memory** = mutable working state (resolved, open, metrics)
802
858
 
803
- # Smart cleanup (removes resolved + old low-priority)
804
- trie memory purge smart
859
+ The ledger ensures nothing is lost. Issue memory tracks current state and makes queries fast.
805
860
 
806
- # Remove all resolved issues
807
- trie memory purge resolved
861
+ ### Query Issue Memory
862
+
863
+ ```bash
864
+ # Search for patterns
865
+ trie memory search "authentication"
866
+
867
+ # View statistics
868
+ trie memory stats
808
869
 
809
- # Remove issues older than 90 days
810
- trie memory purge old --days=90
870
+ # See recent detections
871
+ trie memory recent
811
872
  ```
812
873
 
813
- 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).
874
+ **Note:** Issue memory can be cleaned up (`trie memory purge smart`) without affecting the immutable ledger. The ledger remains the source of truth.
814
875
 
815
876
  ## Troubleshooting
816
877
 
@@ -838,4 +899,4 @@ trie goal list
838
899
 
839
900
  ## License
840
901
 
841
- MIT License
902
+ MIT License
@@ -7,6 +7,9 @@ import {
7
7
  import {
8
8
  ContextGraph
9
9
  } from "./chunk-FH335WL5.js";
10
+ import {
11
+ storeIssues
12
+ } from "./chunk-QH77RQB3.js";
10
13
  import {
11
14
  scanForVulnerabilities
12
15
  } from "./chunk-F4NJ4CBP.js";
@@ -18,9 +21,8 @@ import {
18
21
  getRecentCommits,
19
22
  getStagedChanges,
20
23
  getUncommittedChanges,
21
- getWorkingTreeDiff,
22
- storeIssues
23
- } from "./chunk-62POBLFC.js";
24
+ getWorkingTreeDiff
25
+ } from "./chunk-ZUEAHFSY.js";
24
26
  import {
25
27
  getTrieDirectory,
26
28
  getWorkingDirectory
@@ -1454,4 +1456,4 @@ export {
1454
1456
  handleCheckpointCommand,
1455
1457
  isTrieInitialized
1456
1458
  };
1457
- //# sourceMappingURL=chunk-4PAAGLKO.js.map
1459
+ //# sourceMappingURL=chunk-53KUI7RQ.js.map