@triedotdev/mcp 1.0.138 → 1.0.140

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 (74) hide show
  1. package/README.md +184 -38
  2. package/dist/{autonomy-config-TZ6HF4FA.js → autonomy-config-ZCOSTMPD.js} +2 -2
  3. package/dist/{chunk-X3F5QDER.js → chunk-4O2KRHK4.js} +934 -132
  4. package/dist/chunk-4O2KRHK4.js.map +1 -0
  5. package/dist/{chunk-J5EMP4XW.js → chunk-5KJ4UJOY.js} +9 -4
  6. package/dist/chunk-5KJ4UJOY.js.map +1 -0
  7. package/dist/chunk-62POBLFC.js +1925 -0
  8. package/dist/chunk-62POBLFC.js.map +1 -0
  9. package/dist/{chunk-GFFUDJMK.js → chunk-75ADWWUF.js} +13 -13
  10. package/dist/chunk-75ADWWUF.js.map +1 -0
  11. package/dist/{chunk-D3AS5LY7.js → chunk-7OJ6JIPL.js} +39 -604
  12. package/dist/chunk-7OJ6JIPL.js.map +1 -0
  13. package/dist/{chunk-3RRXWX3V.js → chunk-AF2APASP.js} +38 -4
  14. package/dist/{chunk-3RRXWX3V.js.map → chunk-AF2APASP.js.map} +1 -1
  15. package/dist/{chunk-QSWUPSLK.js → chunk-FH335WL5.js} +9 -1
  16. package/dist/chunk-FH335WL5.js.map +1 -0
  17. package/dist/{chunk-Y32FM3MR.js → chunk-FPEMP54L.js} +21 -15
  18. package/dist/chunk-FPEMP54L.js.map +1 -0
  19. package/dist/{chunk-EDDT4ZIH.js → chunk-GXF6JOCN.js} +21 -323
  20. package/dist/chunk-GXF6JOCN.js.map +1 -0
  21. package/dist/chunk-LD7ZEFNY.js +132 -0
  22. package/dist/chunk-LD7ZEFNY.js.map +1 -0
  23. package/dist/chunk-NKHO34UZ.js +467 -0
  24. package/dist/chunk-NKHO34UZ.js.map +1 -0
  25. package/dist/{chunk-YOKQ25IW.js → chunk-OQ4A3RDY.js} +14 -14
  26. package/dist/{chunk-6LLH3TBZ.js → chunk-UOSTOLU7.js} +12 -12
  27. package/dist/{chunk-67GSG2ST.js → chunk-XTTZAQWJ.js} +18 -15
  28. package/dist/chunk-XTTZAQWJ.js.map +1 -0
  29. package/dist/{chunk-FOCXXIXY.js → chunk-YEIJW6X6.js} +2 -2
  30. package/dist/chunk-YOJGSRZK.js +216 -0
  31. package/dist/chunk-YOJGSRZK.js.map +1 -0
  32. package/dist/cli/main.js +573 -59
  33. package/dist/cli/main.js.map +1 -1
  34. package/dist/cli/yolo-daemon.js +15 -13
  35. package/dist/cli/yolo-daemon.js.map +1 -1
  36. package/dist/{client-JTU5TRLB.js → client-INNE2GGZ.js} +2 -2
  37. package/dist/{codebase-index-FNJ4GCBE.js → codebase-index-5SEOESWM.js} +3 -3
  38. package/dist/fast-analyzer-AYLZB5TW.js +216 -0
  39. package/dist/fast-analyzer-AYLZB5TW.js.map +1 -0
  40. package/dist/github-ingester-J2ZFYXVE.js +11 -0
  41. package/dist/{goal-manager-6BJQ36AH.js → goal-manager-ZBWKWEML.js} +3 -3
  42. package/dist/{goal-validator-GISXYANK.js → goal-validator-HNXXUCPW.js} +3 -3
  43. package/dist/{graph-X2FMRQLG.js → graph-J4OGTYCO.js} +2 -2
  44. package/dist/{hypothesis-K3KQJOXJ.js → hypothesis-JCUMZKTG.js} +3 -3
  45. package/dist/index.js +1090 -108
  46. package/dist/index.js.map +1 -1
  47. package/dist/{issue-store-BO5OWLJW.js → issue-store-LZWZIGM7.js} +2 -2
  48. package/dist/linear-ingester-JRDQAIAA.js +11 -0
  49. package/dist/linear-ingester-JRDQAIAA.js.map +1 -0
  50. package/dist/{trie-agent-XMSGMD7E.js → trie-agent-M6PHM6UD.js} +10 -10
  51. package/dist/trie-agent-M6PHM6UD.js.map +1 -0
  52. package/package.json +15 -8
  53. package/dist/chunk-67GSG2ST.js.map +0 -1
  54. package/dist/chunk-D3AS5LY7.js.map +0 -1
  55. package/dist/chunk-EDDT4ZIH.js.map +0 -1
  56. package/dist/chunk-GFFUDJMK.js.map +0 -1
  57. package/dist/chunk-J5EMP4XW.js.map +0 -1
  58. package/dist/chunk-QSWUPSLK.js.map +0 -1
  59. package/dist/chunk-X3F5QDER.js.map +0 -1
  60. package/dist/chunk-Y32FM3MR.js.map +0 -1
  61. package/dist/chunk-Z2P4WST6.js +0 -883
  62. package/dist/chunk-Z2P4WST6.js.map +0 -1
  63. /package/dist/{autonomy-config-TZ6HF4FA.js.map → autonomy-config-ZCOSTMPD.js.map} +0 -0
  64. /package/dist/{chunk-YOKQ25IW.js.map → chunk-OQ4A3RDY.js.map} +0 -0
  65. /package/dist/{chunk-6LLH3TBZ.js.map → chunk-UOSTOLU7.js.map} +0 -0
  66. /package/dist/{chunk-FOCXXIXY.js.map → chunk-YEIJW6X6.js.map} +0 -0
  67. /package/dist/{client-JTU5TRLB.js.map → client-INNE2GGZ.js.map} +0 -0
  68. /package/dist/{codebase-index-FNJ4GCBE.js.map → codebase-index-5SEOESWM.js.map} +0 -0
  69. /package/dist/{goal-manager-6BJQ36AH.js.map → github-ingester-J2ZFYXVE.js.map} +0 -0
  70. /package/dist/{goal-validator-GISXYANK.js.map → goal-manager-ZBWKWEML.js.map} +0 -0
  71. /package/dist/{graph-X2FMRQLG.js.map → goal-validator-HNXXUCPW.js.map} +0 -0
  72. /package/dist/{hypothesis-K3KQJOXJ.js.map → graph-J4OGTYCO.js.map} +0 -0
  73. /package/dist/{issue-store-BO5OWLJW.js.map → hypothesis-JCUMZKTG.js.map} +0 -0
  74. /package/dist/{trie-agent-XMSGMD7E.js.map → issue-store-LZWZIGM7.js.map} +0 -0
package/README.md CHANGED
@@ -1,30 +1,37 @@
1
- # Trie: Trainable AI Agent for AI-Generated Codebases
1
+ # Trie: Trainable AI agent with a cryptographic governance ledger and portable context for AI-generated codebases.
2
2
 
3
- **Your autonomous agent that learns from every incident, extracts decisions from every change, and predicts problems before they happen.**
3
+
4
+ **The ledger that keeps your work compliant when agents and humans ship together.**
4
5
 
5
6
  [![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)
6
7
 
7
8
  ## What Trie Does
8
9
 
9
- Trie is an **autonomous, trainable AI agent** that maintains a decision ledger for your codebase:
10
+ Trie is a trainable AI agent that maintains a ledger that governs work across agents and humans:
10
11
 
11
12
  - **Autonomous Operation**: Run `trie watch` and the agent monitors your codebase 24/7
12
13
  - **Intelligent Extraction**: Automatically extracts decisions, facts, blockers from every change
13
- - **Ledger**: Builds institutional knowledge that travels from Cursor/Claude Code → CLI → CI/CD
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
15
  - **Predictive Intelligence**: `trie gotcha` queries the ledger to predict problems before they happen
15
16
  - **Continuous Learning**: Feed it incidents with `trie tell`, teach it patterns with your history
16
17
 
17
- The agent learns from every incident, decision, and fix. When you ship, Trie remembers. When something breaks, Trie learns. Over time, your agent gets better at predicting what will go wrong before it does.
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 agentgets better at predicting what will go wrong before it does.
19
+
20
+ ### The Context-Across-Tools Problem (and How the Ledger Solves It)
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.
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.
18
25
 
19
26
  ## Goal
20
27
 
21
- **Trie is your personal AI agent that carries context across tools.**
28
+ **Trie is the governance layer for teams where agents and humans ship together.**
22
29
 
23
- Every bug you fix teaches the agent 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 by the agent.
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.
24
31
 
25
- Instead of burning tokens on the same questions across different repos or forgetting why you architected something a certain way six months ago, **your agent remembers for you**. Instead of losing track of edge cases and tradeoffs as you switch between tools, **your agent maintains system coherence**.
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.
26
33
 
27
- The result is faster development with fewer production fires, because **your agent gets smarter every time something breaks** instead of starting from zero in every conversation.
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.
28
35
 
29
36
  ### How the Agent Works
30
37
 
@@ -35,7 +42,7 @@ The result is faster development with fewer production fires, because **your age
35
42
  5. **`trie tell`** - Feed agent incidents to improve its predictions
36
43
  6. **Agent Learns** - Gets better at predicting what matters in YOUR codebase
37
44
 
38
- **Your thinking and planning keep up with code generation. Your decisions persist across tools. Your edge cases don't get forgotten. Your agent handles it all.**
45
+ Your decisions persist across tools. Your edge cases don't get forgotten. The ledger keeps agents and humans compliant—so you ship the right thing every time.
39
46
 
40
47
  ## Quick Start
41
48
 
@@ -70,13 +77,13 @@ trie bad # Prediction was wrong
70
77
 
71
78
  ## Why Trie Exists
72
79
 
73
- 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.
80
+ The real challenge isn't generating code—it's governance. When some of your teammates are agents and you're working with multiple humans, context fragments. An agent makes a decision in Cursor, a human forgets it in Claude Code, another agent ships something that breaks what you fixed last week. You're not just maintaining a codebase—you're coordinating a mixed team where work happens across tools, models, and people.
74
81
 
75
- The real challenge isn't generating codeit'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.
82
+ The ledger is the answer. Trie keeps a tamper-evident record of decisions, incidents, and tradeoffs so everyonehuman and agent—stays compliant with what you've already learned. Ship the right thing every time. That's the competitive advantage. Software margins are compressing; pure application software is becoming a fundamentally different, worse category. The teams that can coordinate agents and humans, that can scale contributors without losing coherence, will win.
76
83
 
77
- 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.
84
+ Cursor is building toward self-driving codebases—agents that merge PRs, manage rollouts, and monitor production. We're moving from a world where developers use agents to create diffs to one where agents ship tested features end-to-end. The closer we march toward self-driving systems and AGI, the more important governance becomes. That shift requires tooling that coordinates work across many agents and models that learn from past runs. Trie is optimized for coordination and collaboration with both humans and agents. It keeps your work compliant, scales your contributors (human and AI), and turns your decision history into durable institutional knowledge.
78
85
 
79
- 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.
86
+ Tools like Cursor Bugbot flag issues—but flagging doesn't help you avoid similar patterns in the future. Trie remembers what broke, learns across projects, and warns before you ship risky code. You end up architecting better and prompting better because the ledger enforces coherence.
80
87
 
81
88
  ## Key Features
82
89
 
@@ -86,7 +93,8 @@ Trie remembers your decisions across tools, tracks the tradeoffs you've made, an
86
93
  - Cross-project learning - Patterns discovered in one project help prevent bugs in others.
87
94
  - Incident tracking - Build a searchable history of what went wrong and why.
88
95
  - Decision memory - Remembers architectural choices and tradeoffs across Cursor, Claude, VS Code, CLI, and CI/CD.
89
- - Context that travels - Your thinking and planning keep up with code generation across all your tools.
96
+ - 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.
97
+ - Governance that travels - The ledger keeps agents and humans compliant across all your tools.
90
98
 
91
99
  ### Intelligent Analysis
92
100
 
@@ -126,10 +134,14 @@ your-project/
126
134
  │ ├── warm/ # Queryable decisions DB
127
135
  │ │ └── decisions.db # SQLite database
128
136
  │ ├── cold/ # Archived history
129
- │ ├── memory/ # Incident history
137
+ │ ├── memory/ # Incident history + ledger.json (cryptographic ledger)
130
138
  │ ├── patterns/ # Learned patterns
131
139
  │ ├── context.json # Project knowledge graph
132
140
  │ └── config.json # Settings
141
+ ├── .trie-shared/ # Shared ledger for team sync (optional)
142
+ │ ├── active/ # Recent blocks
143
+ │ ├── archived/ # Compressed old blocks
144
+ │ └── ledger-manifest.json
133
145
  ├── src/
134
146
  └── .git/
135
147
  ```
@@ -143,18 +155,18 @@ Different machines
143
155
 
144
156
  ### Decision Memory Across Tools
145
157
 
146
- Trie maintains a Context Graph that tracks decisions, tradeoffs, and architectural choices:
158
+ Trie solves the context-across-tools problem with a **cryptographic governance ledger**: an append-only, tamper-evident chain of blocks that stores decisions, incidents, fixes, and tradeoffs. Every tool—Cursor, Claude, VS Code, CLI, CI/CD—reads from the same ledger in `.trie/`, so there is no context fragmentation.
147
159
 
148
- Decision nodes store why you made certain choices and what tradeoffs were considered
149
- Cross-tool access - Cursor, Claude, VS Code, CLI, and CI/CD all read from the same .trie/ folder
150
- Context trail - Knows which environment ran which analysis and when
151
- Relationship tracking - Files ↔ Changes ↔ Incidents ↔ Fixes ↔ Decisions
160
+ - **Decision nodes** store why you made certain choices and what tradeoffs were considered
161
+ - **Cross-tool access** - Cursor, Claude, VS Code, CLI, and CI/CD all read from the same `.trie/` folder
162
+ - **Context trail** - Knows which environment ran which analysis and when
163
+ - **Relationship tracking** - Files ↔ Changes ↔ Incidents ↔ Fixes ↔ Decisions
152
164
 
153
- 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.
165
+ When you switch from Cursor to Claude Code to terminal—or when different agents and humans work in parallel—Trie remembers. Every tool shares the same ledger, so governance stays consistent.
154
166
 
155
167
  ### Signal Extraction: Context Without Pollution
156
168
 
157
- **The Problem**: Agents drown in raw data. Dumping 10,000 lines of logs, 500 Slack messages, and 200 commits into context is expensive and ineffective.
169
+ The Problem: Agents drown in raw data. Dumping 10,000 lines of logs, 500 Slack messages, and 200 commits into context is expensive and ineffective.
158
170
 
159
171
  **Trie's Solution**: Extract signal, not noise.
160
172
 
@@ -181,7 +193,7 @@ When you switch from Cursor to Claude Code to terminal, Trie remembers. Your thi
181
193
 
182
194
  #### MCP Query Tools
183
195
 
184
- Agents don't get dumps—they **query** for what they need:
196
+ Agents don't get dumps—they query for what they need:
185
197
 
186
198
  ```typescript
187
199
  // Agent queries decision ledger
@@ -196,7 +208,7 @@ trie_get_decisions({
196
208
  // 2. "EU customers need VAT validation" (2 months ago)
197
209
  ```
198
210
 
199
- **Why this matters**: Context management IS the product. Agents get the right information at the right moment, not everything dumped at once.
211
+ Why this matters: context management IS the product. Agents get the right information at the right moment, not everything dumped at once.
200
212
 
201
213
  ## Core Workflow
202
214
 
@@ -214,7 +226,7 @@ trie status # Check overall project health
214
226
  # Trie's Context Graph remembers why you made choices and what happened
215
227
  ```
216
228
 
217
- **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.
229
+ 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.
218
230
 
219
231
  ### 1. Teaching Phase
220
232
 
@@ -250,16 +262,16 @@ trie bad
250
262
  # Also updates: decision patterns, edge case recognition, tradeoff understanding
251
263
  ```
252
264
 
253
- ### 4. Maintenance Phase
265
+ ### 4. Governance Phase
254
266
 
255
- This is where Trie shines. As your app grows and you handle edge cases:
267
+ This is where Trie shines. As your team grows—more humans, more agents, more tools:
256
268
 
257
269
  ```bash
258
- # Working in Cursor, you make a decision about error handling
259
- # Trie records it in the context graph
270
+ # Working in Cursor, an agent makes a decision about error handling
271
+ # Trie records it in the ledger
260
272
 
261
- # Switch to Claude Code later
262
- # Same context graph, same decisions remembered
273
+ # A teammate switches to Claude Code later
274
+ # Same ledger, same decisions, same compliance
263
275
 
264
276
  # Push from terminal
265
277
  # Git hooks check against your full history of decisions and incidents
@@ -268,7 +280,7 @@ This is where Trie shines. As your app grows and you handle edge cases:
268
280
  # Same checks, same memory, same coherence
269
281
  ```
270
282
 
271
- 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.
283
+ Edge cases, tradeoffs, and system coherence—Trie handles governance by remembering what was decided, why it was decided, and what happened as a result. When agents and humans ship together, the ledger keeps everyone compliant.
272
284
 
273
285
  ## Advanced Features
274
286
 
@@ -332,6 +344,116 @@ trie gotcha
332
344
 
333
345
  Trie will warn you if your current task correlates with historical regressions or high-risk signatures.
334
346
 
347
+ ### Integrations: Linear, GitHub & Cursor Cloud Agent
348
+
349
+ **Linear** — Sync active tickets for JIT defect prediction:
350
+
351
+ ```bash
352
+ trie linear auth <your-api-key>
353
+ trie linear sync
354
+ ```
355
+
356
+ Or via MCP: `trie_linear_sync` — syncs tickets into the context graph for gotcha predictions.
357
+
358
+ **GitHub** — Sync open PRs and issues into the context graph:
359
+
360
+ ```bash
361
+ # Via MCP (Cursor/Claude)
362
+ trie_github_sync
363
+ ```
364
+
365
+ Links PRs to changed files and to Linear tickets mentioned in PR descriptions. Requires `GITHUB_TOKEN` (repo scope for private repos, public_repo for public).
366
+
367
+ **Cursor Cloud Agent** — Dispatch high-risk issues to Cursor's cloud for verified, test-passing fixes:
368
+
369
+ ```bash
370
+ # Via MCP
371
+ trie_cloud_fix action:configure apiKey:"key-..."
372
+ trie_cloud_fix action:dispatch issueIds:["issue-1", "issue-2"]
373
+ ```
374
+
375
+ The cloud agent runs in an isolated VM, applies the fix, runs tests, captures screenshots, and opens a PR. Requires `CURSOR_API_KEY`. Use `trie_fix action:route` first to see which issues qualify.
376
+
377
+ ### Fix Triage System
378
+
379
+ Trie routes each issue to one of three fix strategies based on a scoring system:
380
+
381
+ | Strategy | When | Action |
382
+ |----------|------|--------|
383
+ | **inline-auto** | Trivial, auto-fixable (score < 0) | Apply fix automatically |
384
+ | **local-ai** | Moderate risk (score 0–3) | `trie_fix` — local AI applies fix |
385
+ | **cloud-agent** | High risk (score ≥ 4) | `trie_cloud_fix` — Cursor cloud agent |
386
+
387
+ Scoring signals: Issue shape (effort, severity, CWE, OWASP), code context (tests, auth/crypto/payments), occurrence history (how often seen), pipeline context (linked PR/ticket), and user config.
388
+
389
+ ```bash
390
+ # See routing plan before applying
391
+ trie_fix action:route
392
+ ```
393
+
394
+ ### Pipeline View
395
+
396
+ Get a consolidated view of your work across Linear, GitHub, and Trie:
397
+
398
+ ```bash
399
+ # Via MCP
400
+ trie_pipeline # Full status: tickets, PRs, issues, coverage gaps
401
+ trie_pipeline action:coverage # Only Trie issues with no ticket/PR
402
+ trie_pipeline action:create_tickets issueIds:["id1","id2"] # Open Linear tickets for uncovered issues
403
+ ```
404
+
405
+ ### Cryptographic Governance Ledger
406
+
407
+ Trie uses a **chain-of-blocks ledger** for tamper-evident incident history and team sync. The ledger transforms from isolated per-developer chains into a collaborative, distributed cryptographic ledger that scales to teams while maintaining integrity.
408
+
409
+ **Architecture:**
410
+ - **Chained blocks** — Each block links to the previous via hash; genesis block starts the chain
411
+ - **Merkle roots** — Block contents hashed for integrity verification
412
+ - **Author attribution** — Each block records who added it; git commit correlation for developer attribution
413
+ - **Version 2 format** — Syncable blocks with backwards compatibility for v1 ledgers
414
+
415
+ **Shared storage** (`.trie-shared/`):
416
+
417
+ ```
418
+ .trie-shared/
419
+ ├── ledger-manifest.json # Global chain metadata + index
420
+ ├── active/ # Hot storage (recent blocks)
421
+ │ ├── 2024-01-20.json
422
+ │ └── 2024-01-21.json
423
+ └── archived/ # Cold storage (compressed)
424
+ ├── 2024-01.tar.gz # Monthly archives
425
+ └── 2023-12.tar.gz
426
+ ```
427
+
428
+ **Compression & scalability:**
429
+ - Automatic archiving after 30 days
430
+ - gzip compression with configurable levels (90%+ space savings)
431
+ - Hot/cold storage tiers; lazy loading of archived content
432
+
433
+ **Conflict resolution:** Divergent chains merge with timestamp or longest-chain strategy; entry deduplication across developer chains.
434
+
435
+ **Git integration:** Auto-sync via `trie sync hooks --install` — pre-push and post-merge hooks keep local and shared ledgers in sync. Commit correlation and developer attribution from git history.
436
+
437
+ **Backwards compatibility:** Automatic migration of v1 ledgers; legacy detection and zero-data-loss upgrade.
438
+
439
+ ```bash
440
+ # Sync commands
441
+ trie sync init # Initialize shared storage
442
+ trie sync pull # Pull shared updates (auto-migrates legacy)
443
+ trie sync push # Push local changes
444
+ trie sync status # Show sync state, conflicts
445
+ trie sync migrate # Manually migrate legacy v1 ledger
446
+ trie sync hooks --install # Install pre-push/post-merge auto-sync hooks
447
+
448
+ # Ledger commands
449
+ trie ledger verify # Validate chain integrity
450
+ trie ledger history # Show chain with author attribution
451
+ trie ledger stats # Block counts, entries, severity breakdown
452
+ trie ledger diff # Compare local vs shared
453
+ trie ledger compress # Manually archive old blocks
454
+ trie ledger storage # Detailed storage usage stats
455
+ ```
456
+
335
457
  ### Integration with AI Coding Tools
336
458
 
337
459
  Trie provides MCP (Model Context Protocol) tools for seamless integration with Claude, Cursor, and other AI assistants:
@@ -340,9 +462,16 @@ Trie provides MCP (Model Context Protocol) tools for seamless integration with C
340
462
  trie_tell - Report incidents and extract structured signals
341
463
  trie_check - Quick risk assessment
342
464
  trie_memory - Search incident history
343
- trie_fix - Apply suggested fixes
465
+ trie_fix - Apply suggested fixes (use action:route to see triage plan)
466
+ trie_cloud_fix - Dispatch to Cursor cloud agent for verified fixes
467
+
468
+ **Integration Tools:**
469
+ trie_linear_sync - Sync active Linear tickets
470
+ trie_github_sync - Sync open PRs and issues from GitHub
471
+ trie_github_branches - Fetch branches with latest commit info (which branch has latest updates)
472
+ trie_pipeline - Consolidated view of tickets, PRs, issues, coverage gaps
344
473
 
345
- **Query Tools (NEW - Signal Extraction):**
474
+ **Query Tools (Signal Extraction):**
346
475
  trie_get_decisions - Query decisions with filters (tags, time, file)
347
476
  trie_get_blockers - Get active blockers only
348
477
  trie_get_related_decisions - Find related context
@@ -433,7 +562,9 @@ For Claude (MCP): Add to your MCP settings:
433
562
  "args": ["mcp"],
434
563
  "env": {
435
564
  "ANTHROPIC_API_KEY": "your-api-key-here",
436
- "LINEAR_API_KEY": "your-key"
565
+ "LINEAR_API_KEY": "your-key",
566
+ "GITHUB_TOKEN": "your-github-token",
567
+ "CURSOR_API_KEY": "your-cursor-key"
437
568
  }
438
569
  }
439
570
  }
@@ -474,6 +605,23 @@ trie goal list # View progress
474
605
  trie linear sync # Sync Linear tickets for intent context
475
606
  ```
476
607
 
608
+ ### Ledger & Sync
609
+
610
+ ```bash
611
+ trie ledger verify # Verify chain integrity
612
+ trie ledger history # Show blocks with author attribution
613
+ trie ledger stats # Block counts, entries, severity
614
+ trie ledger diff # Compare local vs shared ledger
615
+ trie ledger compress # Archive old blocks
616
+ trie ledger storage # Storage usage stats
617
+ trie sync init # Initialize shared ledger
618
+ trie sync pull # Pull from shared storage
619
+ trie sync push # Push local blocks to shared
620
+ trie sync status # Show sync state and conflicts
621
+ trie sync migrate # Migrate legacy v1 ledger
622
+ trie sync hooks --install # Install auto-sync git hooks
623
+ ```
624
+
477
625
  ### Feedback & Training
478
626
 
479
627
  ```bash
@@ -644,8 +792,6 @@ node fix-goals.js "NO EMOJIS"
644
792
  trie goal add "NO EMOJIS"
645
793
  trie goal list
646
794
  ```
647
- See [Goal Detection Fix](./docs/GOAL_DETECTION_FIX.md) for details.
648
-
649
795
  ### Getting Help
650
796
  - Issues: [Report bugs and request features](https://x.com/louiskishfy)
651
797
 
@@ -10,7 +10,7 @@ import {
10
10
  shouldAutoFix,
11
11
  shouldBlockPush,
12
12
  trackIssueOccurrence
13
- } from "./chunk-J5EMP4XW.js";
13
+ } from "./chunk-5KJ4UJOY.js";
14
14
  import "./chunk-SH7H3WRU.js";
15
15
  import "./chunk-APMV77PU.js";
16
16
  import "./chunk-DGUM43GV.js";
@@ -27,4 +27,4 @@ export {
27
27
  shouldBlockPush,
28
28
  trackIssueOccurrence
29
29
  };
30
- //# sourceMappingURL=autonomy-config-TZ6HF4FA.js.map
30
+ //# sourceMappingURL=autonomy-config-ZCOSTMPD.js.map