@triedotdev/mcp 1.0.166 → 1.0.167
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 +337 -801
- package/dist/chunk-2HF65EHQ.js +311 -0
- package/dist/chunk-2HF65EHQ.js.map +1 -0
- package/dist/{chunk-JNUOW2JS.js → chunk-4MXH2ZPT.js} +12 -12
- package/dist/chunk-4MXH2ZPT.js.map +1 -0
- package/dist/{chunk-LR5M4RTN.js → chunk-575YT2SD.js} +1 -1
- package/dist/chunk-575YT2SD.js.map +1 -0
- package/dist/{chunk-ZKKKLRZZ.js → chunk-5BRRRTN6.js} +4 -4
- package/dist/{chunk-TQOO6A4G.js → chunk-7WITSO22.js} +3 -3
- package/dist/{chunk-ACU2RJUJ.js → chunk-F6WFNUAY.js} +2 -2
- package/dist/{chunk-VR4VWXXU.js → chunk-G2TGF6TR.js} +9 -2
- package/dist/chunk-G2TGF6TR.js.map +1 -0
- package/dist/{chunk-ZBXW244P.js → chunk-HVCDY3AK.js} +3 -3
- package/dist/chunk-HVCDY3AK.js.map +1 -0
- package/dist/{chunk-HOGKPDZA.js → chunk-LQIMKE3P.js} +678 -151
- package/dist/chunk-LQIMKE3P.js.map +1 -0
- package/dist/{chunk-2Z3TQNNK.js → chunk-MRHKX5M5.js} +3 -3
- package/dist/{chunk-OLNZJ3XV.js → chunk-Q63FFI6D.js} +2 -2
- package/dist/{chunk-S36IO3EE.js → chunk-XE6KQRKZ.js} +9 -8
- package/dist/chunk-XE6KQRKZ.js.map +1 -0
- package/dist/{chunk-GDWA3CH3.js → chunk-XPZZFPBZ.js} +30 -6
- package/dist/chunk-XPZZFPBZ.js.map +1 -0
- package/dist/{chunk-JEZ7XJQN.js → chunk-XTFWT2XM.js} +2 -2
- package/dist/{chunk-UXRW2YSP.js → chunk-YDHUCDHM.js} +18 -112
- package/dist/chunk-YDHUCDHM.js.map +1 -0
- package/dist/{chunk-LG5CBK6A.js → chunk-YZ6Y2H3P.js} +21 -196
- package/dist/chunk-YZ6Y2H3P.js.map +1 -0
- package/dist/{chunk-MVVPJ73K.js → chunk-ZJF5FTBX.js} +126 -358
- package/dist/chunk-ZJF5FTBX.js.map +1 -0
- package/dist/cli/create-agent.js +1 -1
- package/dist/cli/create-agent.js.map +1 -1
- package/dist/cli/main.js +194 -849
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +15 -14
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/{fast-analyzer-NJQO3TFD.js → fast-analyzer-XXYMOXRK.js} +3 -3
- package/dist/git-EO5SRFMN.js +28 -0
- package/dist/{github-ingester-TFBDUDIY.js → github-ingester-ZOKK6GRS.js} +3 -3
- package/dist/{goal-manager-DVX24UPZ.js → goal-manager-YOB7VWK7.js} +5 -4
- package/dist/{goal-validator-6Y5CDEMJ.js → goal-validator-ULKIBDPX.js} +5 -4
- package/dist/{hypothesis-UKPGOYY2.js → hypothesis-7BFFT5JY.js} +5 -4
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist/{issue-store-UZAPI5DU.js → issue-store-ZIRP23EP.js} +4 -3
- package/dist/{ledger-CNFCJKHX.js → ledger-TWZTGDFA.js} +3 -2
- package/dist/{linear-ingester-PLES2BRS.js → linear-ingester-XXPAZZRW.js} +3 -3
- package/dist/{output-manager-JNMEAXFO.js → output-manager-RVJ37XKA.js} +2 -2
- package/dist/server/mcp-server.js +19 -18
- package/dist/{tiered-storage-OP74NPJY.js → tiered-storage-Z3YCR465.js} +2 -2
- package/dist/{trie-agent-6SWUHCVO.js → trie-agent-3YDPEGHJ.js} +9 -8
- package/dist/trie-agent-3YDPEGHJ.js.map +1 -0
- package/package.json +3 -2
- package/dist/chunk-GDWA3CH3.js.map +0 -1
- package/dist/chunk-HOGKPDZA.js.map +0 -1
- package/dist/chunk-JNUOW2JS.js.map +0 -1
- package/dist/chunk-LG5CBK6A.js.map +0 -1
- package/dist/chunk-LR5M4RTN.js.map +0 -1
- package/dist/chunk-MVVPJ73K.js.map +0 -1
- package/dist/chunk-S36IO3EE.js.map +0 -1
- package/dist/chunk-UXRW2YSP.js.map +0 -1
- package/dist/chunk-VR4VWXXU.js.map +0 -1
- package/dist/chunk-ZBXW244P.js.map +0 -1
- /package/dist/{chunk-ZKKKLRZZ.js.map → chunk-5BRRRTN6.js.map} +0 -0
- /package/dist/{chunk-TQOO6A4G.js.map → chunk-7WITSO22.js.map} +0 -0
- /package/dist/{chunk-ACU2RJUJ.js.map → chunk-F6WFNUAY.js.map} +0 -0
- /package/dist/{chunk-2Z3TQNNK.js.map → chunk-MRHKX5M5.js.map} +0 -0
- /package/dist/{chunk-OLNZJ3XV.js.map → chunk-Q63FFI6D.js.map} +0 -0
- /package/dist/{chunk-JEZ7XJQN.js.map → chunk-XTFWT2XM.js.map} +0 -0
- /package/dist/{fast-analyzer-NJQO3TFD.js.map → fast-analyzer-XXYMOXRK.js.map} +0 -0
- /package/dist/{github-ingester-TFBDUDIY.js.map → git-EO5SRFMN.js.map} +0 -0
- /package/dist/{goal-manager-DVX24UPZ.js.map → github-ingester-ZOKK6GRS.js.map} +0 -0
- /package/dist/{goal-validator-6Y5CDEMJ.js.map → goal-manager-YOB7VWK7.js.map} +0 -0
- /package/dist/{hypothesis-UKPGOYY2.js.map → goal-validator-ULKIBDPX.js.map} +0 -0
- /package/dist/{issue-store-UZAPI5DU.js.map → hypothesis-7BFFT5JY.js.map} +0 -0
- /package/dist/{ledger-CNFCJKHX.js.map → issue-store-ZIRP23EP.js.map} +0 -0
- /package/dist/{linear-ingester-PLES2BRS.js.map → ledger-TWZTGDFA.js.map} +0 -0
- /package/dist/{output-manager-JNMEAXFO.js.map → linear-ingester-XXPAZZRW.js.map} +0 -0
- /package/dist/{tiered-storage-OP74NPJY.js.map → output-manager-RVJ37XKA.js.map} +0 -0
- /package/dist/{trie-agent-6SWUHCVO.js.map → tiered-storage-Z3YCR465.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,642 +1,431 @@
|
|
|
1
|
-
# Trie:
|
|
1
|
+
# Trie: Governance ledger for agent-human teams
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
**The ledger that keeps agents and humans aligned when shipping together.**
|
|
3
|
+
**Decision memory that travels from Cursor → CLI → CI/CD, keeping agents and humans aligned.**
|
|
5
4
|
|
|
6
5
|
[](https://www.trie.dev) [](https://x.com/louiskishfy)
|
|
7
6
|
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
Trie is governance for teams where agents and humans ship together. Every decision, direction change, and tradeoff gets recorded in a governance ledger that every contributor—human or agent—reads from and writes to, across every tool in the stack.
|
|
11
|
-
|
|
12
|
-
- **Autonomous Operation**: Run `trie watch` and the agent monitors your codebase 24/7
|
|
13
|
-
- **Intelligent Extraction**: Automatically extracts decisions, facts, blockers from every change
|
|
14
|
-
- **Governance ledger**: Tamper-evident chain with digital signatures—the shared memory that travels from Cursor/Claude Code → CLI → CI/CD
|
|
15
|
-
- **Predictive Intelligence**: `trie gotcha` queries the ledger to predict problems before they happen
|
|
16
|
-
- **Continuous Learning**: Feed it incidents with `trie tell`, teach it patterns with your history
|
|
17
|
-
|
|
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
|
-
|
|
20
|
-
### The Agent Coordination Problem
|
|
21
|
-
|
|
22
|
-
**The problem**: When agents and humans ship code together across Cursor, Claude Code, VS Code, and CI/CD, who's accountable for what? An agent makes a decision in one tool; a human modifies it in another; a second agent undoes both. Without a shared record, coordination becomes chaos.
|
|
7
|
+
## The Problem
|
|
23
8
|
|
|
24
|
-
|
|
9
|
+
When agents and humans ship code together across Cursor, Claude Code, VS Code, and CI/CD, context fragments. An agent makes a decision in one tool, a human forgets it in another, and nothing prevents repeating the same mistake.
|
|
25
10
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Why It Matters for Agent Collaboration
|
|
29
|
-
|
|
30
|
-
When agents can ship production changes, you need governance that works for both humans and AI:
|
|
31
|
-
|
|
32
|
-
**Traditional tools fall short:**
|
|
11
|
+
**Traditional tools don't solve this:**
|
|
33
12
|
- Linear tracks tasks, not decisions or reasoning
|
|
34
13
|
- GitHub shows changes, not why they were made
|
|
35
14
|
- Slack/Discord: context vanishes in chat history
|
|
36
|
-
- No tool tells you if
|
|
37
|
-
|
|
38
|
-
**Trie's ledger provides:**
|
|
39
|
-
- **Tamper-evident history**: Ed25519 signatures detect if entries are modified
|
|
40
|
-
- **Automatic recording**: Agents and humans write to the same ledger
|
|
41
|
-
- **Cross-tool context**: Works in Cursor, CLI, CI/CD, MCP servers
|
|
42
|
-
- **Accountability**: See who (human or agent) made each decision and when
|
|
43
|
-
- **Pattern learning**: Every incident makes the system smarter
|
|
15
|
+
- No tool tells you if today's change conflicts with yesterday's decision
|
|
44
16
|
|
|
45
|
-
The
|
|
17
|
+
## The Solution
|
|
46
18
|
|
|
47
|
-
|
|
19
|
+
Trie keeps a **governance ledger**—a tamper-evident record of decisions, incidents, and fixes that travels with your code. Every tool reads from the same ledger, so decisions persist and everyone stays aligned.
|
|
48
20
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
5. **`trie tell`** - Feed agent incidents to improve its predictions
|
|
54
|
-
6. **Agent Learns** - Gets better at predicting what matters in YOUR codebase
|
|
21
|
+
- **`trie watch`** - Monitors your codebase 24/7, learns patterns autonomously
|
|
22
|
+
- **`trie gotcha`** - Predicts problems before you ship based on past incidents
|
|
23
|
+
- **Governance ledger** - Decision memory with Git-backed audit trail and digital signatures
|
|
24
|
+
- **Cross-tool context** - Same ledger in Cursor, CLI, CI/CD—no coordination needed
|
|
55
25
|
|
|
56
|
-
|
|
26
|
+
Think of it as **double-entry bookkeeping for code decisions**—not blockchain-level immutability, but tamper-evident accountability that works with Git and your existing workflow.
|
|
57
27
|
|
|
58
28
|
## Quick Start
|
|
59
29
|
|
|
60
|
-
###
|
|
61
|
-
|
|
62
|
-
Make sure you have Node.js installed, then:
|
|
30
|
+
### Install
|
|
63
31
|
|
|
64
32
|
```bash
|
|
65
|
-
# Install Trie globally
|
|
66
33
|
npm install -g trie
|
|
67
|
-
|
|
68
|
-
# Set up in your project
|
|
69
34
|
cd your-project
|
|
70
35
|
trie init
|
|
71
|
-
|
|
72
|
-
# Configure integrations
|
|
73
|
-
trie setup # Show setup guide
|
|
74
|
-
trie setup slack <webhook> # Set up Slack notifications
|
|
75
36
|
```
|
|
76
37
|
|
|
77
|
-
###
|
|
78
|
-
|
|
79
|
-
When bugs happen, tell Trie about them:
|
|
38
|
+
### Basic Workflow
|
|
80
39
|
|
|
81
40
|
```bash
|
|
82
|
-
# Report
|
|
41
|
+
# 1. Report incidents as they happen
|
|
83
42
|
trie tell "Users can't log in after password reset"
|
|
84
43
|
|
|
85
|
-
#
|
|
44
|
+
# 2. Start autonomous monitoring
|
|
45
|
+
trie watch
|
|
46
|
+
|
|
47
|
+
# 3. Before pushing, check for risks
|
|
48
|
+
trie gotcha
|
|
49
|
+
|
|
50
|
+
# 4. Learn from your git history
|
|
86
51
|
trie learn
|
|
87
52
|
|
|
88
|
-
# Give feedback
|
|
53
|
+
# 5. Give feedback
|
|
89
54
|
trie ok # Prediction was helpful
|
|
90
55
|
trie bad # Prediction was wrong
|
|
91
56
|
```
|
|
92
57
|
|
|
93
|
-
##
|
|
94
|
-
|
|
95
|
-
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.
|
|
96
|
-
|
|
97
|
-
The ledger is the answer. Trie keeps a tamper-evident record of decisions, incidents, and tradeoffs so everyone—human 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.
|
|
58
|
+
## Core Features
|
|
98
59
|
|
|
99
|
-
|
|
60
|
+
### 1. Autonomous Monitoring (`trie watch`)
|
|
100
61
|
|
|
101
|
-
|
|
62
|
+
Real-time agent that monitors your codebase and enforces custom rules:
|
|
102
63
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- **Digital signatures** - Ed25519 signatures prove who (human or agent) created each entry (`trie keys generate`)
|
|
109
|
-
- **Accountability trail** - See exactly what decisions agents made and when, verify authenticity
|
|
110
|
-
- **Cross-tool context** - Works in Cursor, Claude Code, CLI, CI/CD—same ledger everywhere
|
|
111
|
-
- **Tamper detection** - Signatures and Git history make modifications visible
|
|
112
|
-
- **No coordination needed** - Agents and humans write concurrently; Git handles conflicts
|
|
113
|
-
|
|
114
|
-
### Governance That Scales
|
|
115
|
-
|
|
116
|
-
- **Tamper-evident ledger** - Append-only chain with cryptographic signatures (not blockchain, think double-entry bookkeeping)
|
|
117
|
-
- **Correction pattern** - Entries never deleted, only marked as corrected with full audit trail
|
|
118
|
-
- **Decision memory** - Captures architectural choices, tradeoffs, and context across all tools
|
|
119
|
-
- **Judgment artifacts** - Not just what shipped, but why, what was considered, and who (or what) decided
|
|
120
|
-
- **Git integration** - Auto-commits ledger changes; distributed backup via Git history
|
|
121
|
-
|
|
122
|
-
### Intelligence That Compounds
|
|
123
|
-
|
|
124
|
-
- **Predictive analysis** - `trie gotcha` queries the ledger to predict problems before they happen
|
|
125
|
-
- **Pattern recognition** - Identifies recurring issues and edge cases from your actual incident history
|
|
126
|
-
- **Cross-project learning** - Patterns discovered in one project help prevent bugs in others
|
|
127
|
-
- **System coherence** - Tracks relationships between files, changes, incidents, fixes, and decisions
|
|
128
|
-
- **Continuous learning** - Gets better at predicting what matters in YOUR codebase over time
|
|
129
|
-
|
|
130
|
-
### Integration Built for Speed
|
|
131
|
-
|
|
132
|
-
- **Multiple interfaces** - CLI, MCP tools for Claude/Cursor, visual dashboards
|
|
133
|
-
- **Git hooks** - Automatic checks before commits and pushes
|
|
134
|
-
- **Watch mode** - Real-time monitoring while you code
|
|
135
|
-
- **Fast performance** - Sub-500ms checks, won't slow down your workflow
|
|
136
|
-
- **Flexible workflow** - Works with any editor, any git workflow, any deployment setup
|
|
137
|
-
|
|
138
|
-
## How It Works
|
|
139
|
-
|
|
140
|
-
### Memory Architecture
|
|
141
|
-
|
|
142
|
-
Trie maintains two complementary memory systems that work together to provide both fast queries and tamper-evident governance:
|
|
143
|
-
|
|
144
|
-
**1. Governance Ledger** (`.trie/memory/ledger.json`)
|
|
145
|
-
- **Purpose**: Cryptographic chain of what was detected and when
|
|
146
|
-
- **Properties**: Append-only, tamper-evident, never deleted
|
|
147
|
-
- **Used for**: Audit trail, compliance, historical analysis, gotcha predictions
|
|
148
|
-
- **Immutability**: Entries are marked as corrected, not deleted (see [Ledger Corrections](./docs/LEDGER_CORRECTIONS.md))
|
|
149
|
-
|
|
150
|
-
**2. Issue Memory** (`.trie/memory/issues/`)
|
|
151
|
-
- **Purpose**: Fast searchable cache of detected issues
|
|
152
|
-
- **Properties**: Queryable, can be compacted and purged
|
|
153
|
-
- **Used for**: `trie memory search`, pattern recognition, recent issue queries
|
|
154
|
-
- **Lifecycle**: Subject to capacity limits; cleaned up via `trie memory purge` strategies
|
|
155
|
-
|
|
156
|
-
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:
|
|
157
|
-
|
|
158
|
-
Local development
|
|
159
|
-
CI/CD pipelines
|
|
160
|
-
Team members
|
|
161
|
-
Cursor/Claude/VS Code
|
|
162
|
-
Git hooks
|
|
163
|
-
|
|
164
|
-
### File Structure
|
|
64
|
+
```bash
|
|
65
|
+
# Set any quality rule you want enforced
|
|
66
|
+
trie goal add "No console.log statements in production"
|
|
67
|
+
trie goal add "All API endpoints must have rate limiting"
|
|
68
|
+
trie goal add "We never truncate text in UI components"
|
|
165
69
|
|
|
70
|
+
# Start watching
|
|
71
|
+
trie watch
|
|
166
72
|
```
|
|
167
|
-
your-project/
|
|
168
|
-
├── .trie/
|
|
169
|
-
│ ├── hot/ # In-memory current session
|
|
170
|
-
│ ├── warm/ # Queryable governance DB
|
|
171
|
-
│ │ └── decisions.db # SQLite database
|
|
172
|
-
│ ├── cold/ # Archived history
|
|
173
|
-
│ ├── memory/ # Issue cache + ledger.json (cryptographic ledger)
|
|
174
|
-
│ ├── patterns/ # Learned patterns
|
|
175
|
-
│ ├── context.json # Project knowledge graph
|
|
176
|
-
│ └── config.json # Settings
|
|
177
|
-
├── .trie-shared/ # Shared ledger for team sync (optional)
|
|
178
|
-
│ ├── active/ # Recent blocks
|
|
179
|
-
│ ├── archived/ # Compressed old blocks
|
|
180
|
-
│ └── ledger-manifest.json
|
|
181
|
-
├── src/
|
|
182
|
-
└── .git/
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Decision Memory Across Tools
|
|
186
|
-
|
|
187
|
-
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.
|
|
188
|
-
|
|
189
|
-
- **Decision nodes** store why you made certain choices and what tradeoffs were considered
|
|
190
|
-
- **Cross-tool access** - Cursor, Claude, VS Code, CLI, and CI/CD all read from the same `.trie/` folder
|
|
191
|
-
- **Context trail** - Knows which environment ran which analysis and when
|
|
192
|
-
- **Relationship tracking** - Files ↔ Changes ↔ Incidents ↔ Fixes ↔ Decisions
|
|
193
|
-
|
|
194
|
-
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.
|
|
195
|
-
|
|
196
|
-
### Signal Extraction: Context Without Pollution
|
|
197
|
-
|
|
198
|
-
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.
|
|
199
73
|
|
|
200
|
-
**
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
| **HOT** (In-Memory) | Current session data, active decisions | Instant access during work |
|
|
207
|
-
| **WARM** (SQLite DB) | Recent decisions, facts, blockers | Query what you need: *"payment decisions in last 30 days"* |
|
|
208
|
-
| **COLD** (Archived) | Full history, indexed but dormant | Auto-archives after 90 days of low access |
|
|
209
|
-
|
|
210
|
-
#### How Extraction Works
|
|
211
|
-
|
|
212
|
-
1. **Raw Input** → You report an incident or commit code
|
|
213
|
-
2. **Extraction** → Cheap model (Haiku) pulls out structured signals:
|
|
214
|
-
- **Decisions**: "Chose bcrypt over sha256 for password hashing"
|
|
215
|
-
- **Facts**: "Stripe requires TLS 1.2+ for EU transactions"
|
|
216
|
-
- **Blockers**: "Missing VAT validation blocks EU checkout"
|
|
217
|
-
- **Questions**: "Should we cache session tokens?"
|
|
218
|
-
|
|
219
|
-
3. **Storage** → Structured data goes to WARM storage with embeddings
|
|
220
|
-
4. **Query** → Agents ask: `trie_get_decisions(relatedTo: "payments")`
|
|
221
|
-
5. **Targeted Context** → Agent gets 5 relevant decisions, not 5,000 raw logs
|
|
222
|
-
|
|
223
|
-
#### MCP Query Tools
|
|
224
|
-
|
|
225
|
-
Agents don't get dumps—they query for what they need:
|
|
226
|
-
|
|
227
|
-
```typescript
|
|
228
|
-
// Agent queries decision ledger
|
|
229
|
-
trie_get_decisions({
|
|
230
|
-
relatedTo: "checkout/validator.ts",
|
|
231
|
-
since: "30d",
|
|
232
|
-
limit: 5
|
|
233
|
-
})
|
|
74
|
+
**Features:**
|
|
75
|
+
- Interactive dashboard with goals, memory, and analysis activity
|
|
76
|
+
- AI-powered goal checking using semantic understanding (not just keywords)
|
|
77
|
+
- Token-aware to manage AI costs
|
|
78
|
+
- Smart caching to avoid duplicate scans
|
|
79
|
+
- Real-time nudges when violations are detected
|
|
234
80
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
81
|
+
Run in background with screen or tmux:
|
|
82
|
+
```bash
|
|
83
|
+
screen -S trie-watch
|
|
84
|
+
trie watch
|
|
85
|
+
# Detach: Ctrl+A then D
|
|
86
|
+
# Reattach: screen -r trie-watch
|
|
238
87
|
```
|
|
239
88
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
## Core Workflow
|
|
243
|
-
|
|
244
|
-
### 0. Planning Phase
|
|
89
|
+
### 2. Predictive Analysis (`trie gotcha`)
|
|
245
90
|
|
|
246
|
-
|
|
91
|
+
Predicts problems before you ship based on your actual incident history:
|
|
247
92
|
|
|
248
93
|
```bash
|
|
249
|
-
#
|
|
250
|
-
trie gotcha
|
|
251
|
-
trie memory search "payments" # See past incidents in this area
|
|
252
|
-
trie status # Check overall project health
|
|
94
|
+
# Check current changes for risks
|
|
95
|
+
trie gotcha
|
|
253
96
|
|
|
254
|
-
#
|
|
255
|
-
|
|
97
|
+
# Connect to Linear for JIT defect prediction
|
|
98
|
+
trie linear auth <your-api-key>
|
|
99
|
+
trie linear sync
|
|
256
100
|
```
|
|
257
101
|
|
|
258
|
-
|
|
102
|
+
Trie warns you if your current changes correlate with:
|
|
103
|
+
- Historical regressions in the same files
|
|
104
|
+
- High-risk patterns from past incidents
|
|
105
|
+
- Active tickets that might conflict
|
|
259
106
|
|
|
260
|
-
###
|
|
107
|
+
### 3. Governance Ledger
|
|
261
108
|
|
|
262
|
-
|
|
263
|
-
# Something breaks in production
|
|
264
|
-
trie tell "Payment processing failed for EU customers"
|
|
109
|
+
Tamper-evident record of all decisions, incidents, and fixes:
|
|
265
110
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
111
|
+
**Architecture:**
|
|
112
|
+
- **Governance ledger** (`.trie/memory/ledger.json`) - Append-only chain with Ed25519 signatures
|
|
113
|
+
- **Issue memory** (`.trie/memory/issues.json`) - Fast searchable cache
|
|
269
114
|
|
|
270
|
-
|
|
115
|
+
**Key properties:**
|
|
116
|
+
- Never deleted, only corrected (full audit trail)
|
|
117
|
+
- Digital signatures prove who (human or agent) created each entry
|
|
118
|
+
- Auto-commits to Git for distributed backup
|
|
119
|
+
- Works across Cursor, CLI, CI/CD—same ledger everywhere
|
|
271
120
|
|
|
121
|
+
**Setup signing:**
|
|
272
122
|
```bash
|
|
273
|
-
#
|
|
274
|
-
|
|
275
|
-
git commit -m "Update EU payment logic"
|
|
276
|
-
|
|
277
|
-
# Trie warns: "This area broke 2 weeks ago with EU payments. Consider extra testing."
|
|
278
|
-
# Context: Remembers the decision you made last time, the edge case that caused the issue
|
|
123
|
+
trie keys generate # Generate Ed25519 signing key
|
|
124
|
+
trie keys status # Check if signing is configured
|
|
279
125
|
```
|
|
280
126
|
|
|
281
|
-
|
|
282
|
-
|
|
127
|
+
**Ledger commands:**
|
|
283
128
|
```bash
|
|
284
|
-
#
|
|
285
|
-
trie
|
|
286
|
-
|
|
287
|
-
# Warning was wrong
|
|
288
|
-
trie bad
|
|
289
|
-
|
|
290
|
-
# Trie adjusts confidence for similar future warnings
|
|
291
|
-
# Also updates: decision patterns, edge case recognition, tradeoff understanding
|
|
129
|
+
trie ledger verify # Validate chain integrity
|
|
130
|
+
trie ledger history # Show blocks with author attribution
|
|
131
|
+
trie ledger stats # Block counts, entries, severity breakdown
|
|
292
132
|
```
|
|
293
133
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
This is where Trie shines. As your team grows—more humans, more agents, more tools:
|
|
297
|
-
|
|
134
|
+
**Corrections (not deletions):**
|
|
298
135
|
```bash
|
|
299
|
-
#
|
|
300
|
-
|
|
136
|
+
# Mark false positive
|
|
137
|
+
trie ledger correct <entry-id> -r "Expected behavior" -t false-positive
|
|
301
138
|
|
|
302
|
-
#
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
# Push from terminal
|
|
306
|
-
# Git hooks check against your full history of decisions and incidents
|
|
139
|
+
# Mark as fixed
|
|
140
|
+
trie ledger correct <entry-id> -r "Fixed in commit abc123"
|
|
307
141
|
|
|
308
|
-
#
|
|
309
|
-
|
|
142
|
+
# View correction stats
|
|
143
|
+
trie ledger corrections
|
|
310
144
|
```
|
|
311
145
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
## Advanced Features
|
|
146
|
+
## Integrations
|
|
315
147
|
|
|
316
|
-
|
|
148
|
+
| Integration | Setup | Purpose |
|
|
149
|
+
|-------------|-------|---------|
|
|
150
|
+
| **Linear** | `trie linear auth <key>` | JIT defect prediction from active tickets |
|
|
151
|
+
| **GitHub** | Set `GITHUB_TOKEN` env var | Sync PRs and issues into context graph |
|
|
152
|
+
| **Slack** | `trie setup slack <webhook>` | Team notifications for critical issues |
|
|
153
|
+
| **Cursor Cloud** | Set `CURSOR_API_KEY` | Verified automated fixes via cloud agent |
|
|
317
154
|
|
|
318
|
-
|
|
155
|
+
### Linear Integration
|
|
319
156
|
|
|
320
157
|
```bash
|
|
321
|
-
|
|
322
|
-
trie
|
|
323
|
-
trie goal add "All API endpoints must have rate limiting"
|
|
324
|
-
trie goal add "We never truncate text in UI components"
|
|
325
|
-
|
|
326
|
-
# Add a hypothesis
|
|
327
|
-
trie hypothesis add "Code reviews reduce bug rate"
|
|
328
|
-
|
|
329
|
-
# View progress
|
|
330
|
-
trie goal list
|
|
158
|
+
trie linear auth <your-api-key>
|
|
159
|
+
trie linear sync
|
|
331
160
|
```
|
|
332
161
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
When you run `trie watch`, the system actively monitors your code for goal violations using AI-powered analysis:
|
|
336
|
-
|
|
337
|
-
1. **Custom & Flexible** - Goals can be any quality rule you define (no emojis, no TODOs, security patterns, UI standards, etc.)
|
|
338
|
-
2. **RAG-Based** - Uses semantic understanding, not just keyword matching
|
|
339
|
-
3. **Real-Time** - Checks every file change against ALL active goals
|
|
340
|
-
4. **Smart Caching** - Avoids re-scanning unchanged files
|
|
341
|
-
5. **Cost-Aware** - Token budgets and cooldowns prevent runaway AI costs
|
|
342
|
-
6. **High Confidence** - Only reports violations with strong confidence scores
|
|
343
|
-
|
|
344
|
-
**Example Goal Violations Detected:**
|
|
345
|
-
- "No emojis in code" → Finds any Unicode emoji anywhere in files
|
|
346
|
-
- "All functions must have JSDoc" → Checks for missing documentation
|
|
347
|
-
- "No inline styles in React" → Detects style attributes in JSX
|
|
348
|
-
- "Every TODO must have a ticket reference" → Validates TODO format
|
|
349
|
-
|
|
350
|
-
Goals are tracked over time with metrics (violations caught, fixed, progress percentage).
|
|
162
|
+
Or via MCP: `trie_linear_sync` — syncs tickets into the context graph for gotcha predictions.
|
|
351
163
|
|
|
352
|
-
###
|
|
164
|
+
### GitHub Integration
|
|
353
165
|
|
|
354
|
-
|
|
166
|
+
Sync open PRs and issues into the context graph:
|
|
355
167
|
|
|
356
168
|
```bash
|
|
357
|
-
|
|
169
|
+
# Via MCP (Cursor/Claude)
|
|
170
|
+
trie_github_sync
|
|
171
|
+
trie_github_branches # See which branch has latest updates
|
|
358
172
|
```
|
|
359
173
|
|
|
360
|
-
|
|
361
|
-
- **Interactive dashboard** with goals, memory, analysis activity panels
|
|
362
|
-
- **AI-powered goal checking** - automatically detects violations of your custom rules
|
|
363
|
-
- **Token-aware** - manages AI costs with budgets and cooldowns
|
|
364
|
-
- **Smart prioritization** - focuses on high-risk files first
|
|
365
|
-
- **Caching** - avoids duplicate scans of unchanged files
|
|
366
|
-
- **Real-time nudges** - immediate feedback when violations are detected
|
|
174
|
+
Requires `GITHUB_TOKEN` (repo scope for private repos, public_repo for public).
|
|
367
175
|
|
|
368
|
-
|
|
176
|
+
### Slack Integration
|
|
369
177
|
|
|
370
178
|
```bash
|
|
371
|
-
#
|
|
372
|
-
|
|
373
|
-
trie watch
|
|
374
|
-
# Press Ctrl+A then D to detach
|
|
375
|
-
# Reattach with: screen -r trie-watch
|
|
179
|
+
# Show setup guide
|
|
180
|
+
trie setup slack
|
|
376
181
|
|
|
377
|
-
#
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
#
|
|
381
|
-
|
|
182
|
+
# Configure webhook
|
|
183
|
+
trie setup slack <webhook-url> [#channel]
|
|
184
|
+
|
|
185
|
+
# Test connection
|
|
186
|
+
trie setup test-slack
|
|
382
187
|
```
|
|
383
188
|
|
|
384
|
-
|
|
189
|
+
Or manually add to `.trie/config.json`:
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"integrations": {
|
|
193
|
+
"slack": {
|
|
194
|
+
"enabled": true,
|
|
195
|
+
"webhook": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
|
|
196
|
+
"channel": "#security"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
385
201
|
|
|
386
|
-
###
|
|
202
|
+
### Cursor Cloud Agent
|
|
387
203
|
|
|
388
|
-
|
|
204
|
+
Dispatch high-risk issues to Cursor's cloud for verified, test-passing fixes:
|
|
389
205
|
|
|
390
206
|
```bash
|
|
391
|
-
#
|
|
392
|
-
|
|
393
|
-
|
|
207
|
+
# Via MCP
|
|
208
|
+
trie_cloud_fix action:configure apiKey:"key-..."
|
|
209
|
+
trie_cloud_fix action:dispatch issueIds:["issue-1"]
|
|
394
210
|
|
|
395
|
-
#
|
|
396
|
-
|
|
211
|
+
# Force cloud dispatch (bypass triage)
|
|
212
|
+
trie_cloud_fix action:dispatch forceCloud:true
|
|
397
213
|
|
|
398
|
-
#
|
|
399
|
-
|
|
214
|
+
# Ad-hoc dispatch
|
|
215
|
+
trie_cloud_fix action:dispatch file:"src/auth.ts" issue:"SQL injection" fix:"Use parameterized queries"
|
|
400
216
|
```
|
|
401
217
|
|
|
402
|
-
|
|
218
|
+
The cloud agent runs in an isolated VM, applies the fix, runs tests, captures screenshots, and opens a PR.
|
|
403
219
|
|
|
404
|
-
###
|
|
220
|
+
### Pipeline View
|
|
405
221
|
|
|
406
|
-
|
|
222
|
+
See work across Linear, GitHub, and Trie in one place:
|
|
407
223
|
|
|
408
224
|
```bash
|
|
409
|
-
|
|
410
|
-
|
|
225
|
+
# Via MCP
|
|
226
|
+
trie_pipeline # Full status: tickets, PRs, issues
|
|
227
|
+
trie_pipeline action:coverage # Only Trie issues with no ticket/PR
|
|
228
|
+
trie_pipeline action:create_tickets issueIds:["id1","id2"] # Open tickets
|
|
411
229
|
```
|
|
412
230
|
|
|
413
|
-
|
|
231
|
+
## AI Tool Integration (MCP)
|
|
414
232
|
|
|
415
|
-
|
|
233
|
+
Trie provides Model Context Protocol tools for Claude, Cursor, and AI assistants.
|
|
416
234
|
|
|
417
|
-
|
|
418
|
-
# Via MCP (Cursor/Claude)
|
|
419
|
-
trie_github_sync
|
|
420
|
-
```
|
|
235
|
+
### Setup for Cursor/Claude
|
|
421
236
|
|
|
422
|
-
|
|
237
|
+
Add to your MCP settings:
|
|
423
238
|
|
|
424
|
-
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"mcpServers": {
|
|
242
|
+
"trie": {
|
|
243
|
+
"command": "trie",
|
|
244
|
+
"args": ["mcp"],
|
|
245
|
+
"env": {
|
|
246
|
+
"ANTHROPIC_API_KEY": "your-api-key",
|
|
247
|
+
"LINEAR_API_KEY": "your-key",
|
|
248
|
+
"GITHUB_TOKEN": "your-token",
|
|
249
|
+
"CURSOR_API_KEY": "your-cursor-key"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
425
255
|
|
|
426
|
-
|
|
427
|
-
# Via MCP
|
|
428
|
-
trie_cloud_fix action:configure apiKey:"key-..."
|
|
429
|
-
trie_cloud_fix action:dispatch issueIds:["issue-1", "issue-2"]
|
|
256
|
+
### Available Tools
|
|
430
257
|
|
|
431
|
-
|
|
432
|
-
|
|
258
|
+
**Core:**
|
|
259
|
+
- `trie_tell` - Report incidents and extract structured signals
|
|
260
|
+
- `trie_check` - Quick risk assessment
|
|
261
|
+
- `trie_watch` - Start/stop autonomous monitoring
|
|
262
|
+
- `trie_memory` - Search incident history
|
|
263
|
+
- `trie_fix` - Apply fixes (use `action:route` to see triage plan)
|
|
264
|
+
- `trie_cloud_fix` - Dispatch to Cursor cloud agent
|
|
433
265
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
266
|
+
**Integrations:**
|
|
267
|
+
- `trie_linear_sync` - Sync active Linear tickets
|
|
268
|
+
- `trie_github_sync` - Sync open PRs and issues
|
|
269
|
+
- `trie_github_branches` - Fetch branches with latest commits
|
|
270
|
+
- `trie_pipeline` - Consolidated view of tickets, PRs, issues
|
|
437
271
|
|
|
438
|
-
|
|
272
|
+
**Query Tools (Targeted Context):**
|
|
273
|
+
- `trie_get_governance` - Query decisions with filters
|
|
274
|
+
- `trie_get_blockers` - Get active blockers only
|
|
275
|
+
- `trie_get_nudges` - Get unresolved goal violations
|
|
276
|
+
- `trie_get_related_governance` - Find related context
|
|
277
|
+
- `trie_query_context` - Natural language queries across all signals
|
|
439
278
|
|
|
440
|
-
|
|
279
|
+
**Why query tools matter**: Instead of dumping everything into context, agents ask for exactly what they need. This prevents context pollution and keeps agents focused.
|
|
441
280
|
|
|
442
|
-
|
|
281
|
+
## Advanced Features
|
|
443
282
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
| **inline-auto** | Trivial, auto-fixable (score < 0) | Apply fix automatically |
|
|
447
|
-
| **local-ai** | Moderate risk (score 0–3) | `trie_fix` — local AI applies fix |
|
|
448
|
-
| **cloud-agent** | High risk (score ≥ 4) | `trie_cloud_fix` — Cursor cloud agent |
|
|
283
|
+
<details>
|
|
284
|
+
<summary><b>Goals & Custom Rules</b></summary>
|
|
449
285
|
|
|
450
|
-
|
|
286
|
+
Set improvement goals that are actively enforced in real-time:
|
|
451
287
|
|
|
452
288
|
```bash
|
|
453
|
-
#
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
### Pipeline View
|
|
289
|
+
# Add goals
|
|
290
|
+
trie goal add "No hardcoded API keys"
|
|
291
|
+
trie goal add "All async functions must handle errors"
|
|
292
|
+
trie goal add "Every TODO must have a ticket reference"
|
|
458
293
|
|
|
459
|
-
|
|
294
|
+
# View progress
|
|
295
|
+
trie goal list
|
|
460
296
|
|
|
461
|
-
|
|
462
|
-
# Via MCP
|
|
463
|
-
trie_pipeline # Full status: tickets, PRs, issues, coverage gaps
|
|
464
|
-
trie_pipeline action:coverage # Only Trie issues with no ticket/PR
|
|
465
|
-
trie_pipeline action:create_tickets issueIds:["id1","id2"] # Open Linear tickets for uncovered issues
|
|
297
|
+
# Get unresolved violations
|
|
298
|
+
trie_get_nudges # Via MCP
|
|
466
299
|
```
|
|
467
300
|
|
|
468
|
-
|
|
301
|
+
Goals use AI-powered semantic understanding to catch violations, not just keyword matching.
|
|
469
302
|
|
|
470
|
-
|
|
303
|
+
</details>
|
|
471
304
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
- **Merkle roots** — Block contents hashed for integrity verification
|
|
475
|
-
- **Author attribution** — Each block records who added it; git commit correlation for developer attribution
|
|
476
|
-
- **Version 2 format** — Syncable blocks with backwards compatibility for v1 ledgers
|
|
305
|
+
<details>
|
|
306
|
+
<summary><b>Fix Triage System</b></summary>
|
|
477
307
|
|
|
478
|
-
|
|
308
|
+
Trie routes each issue to one of three fix strategies:
|
|
479
309
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
│ └── 2024-01-21.json
|
|
486
|
-
└── archived/ # Cold storage (compressed)
|
|
487
|
-
├── 2024-01.tar.gz # Monthly archives
|
|
488
|
-
└── 2023-12.tar.gz
|
|
489
|
-
```
|
|
310
|
+
| Strategy | When | Action |
|
|
311
|
+
|----------|------|--------|
|
|
312
|
+
| **inline-auto** | Trivial fixes (score < 0) | Apply automatically |
|
|
313
|
+
| **local-ai** | Moderate risk (score 0–3) | `trie_fix` — local AI applies fix |
|
|
314
|
+
| **cloud-agent** | High risk (score ≥ 4) | `trie_cloud_fix` — Cursor cloud agent |
|
|
490
315
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
316
|
+
See routing plan before applying:
|
|
317
|
+
```bash
|
|
318
|
+
trie_fix action:route
|
|
319
|
+
```
|
|
495
320
|
|
|
496
|
-
|
|
321
|
+
</details>
|
|
497
322
|
|
|
498
|
-
|
|
323
|
+
<details>
|
|
324
|
+
<summary><b>Team Sync (Shared Ledger)</b></summary>
|
|
499
325
|
|
|
500
|
-
|
|
326
|
+
Sync ledger blocks across your team:
|
|
501
327
|
|
|
502
328
|
```bash
|
|
503
|
-
# Sync commands
|
|
504
329
|
trie sync init # Initialize shared storage
|
|
505
|
-
trie sync pull # Pull shared updates
|
|
330
|
+
trie sync pull # Pull shared updates
|
|
506
331
|
trie sync push # Push local changes
|
|
507
|
-
trie sync status # Show sync state
|
|
508
|
-
trie sync
|
|
509
|
-
trie sync hooks --install # Install pre-push/post-merge auto-sync hooks
|
|
510
|
-
|
|
511
|
-
# Ledger commands
|
|
512
|
-
trie ledger verify # Validate chain integrity
|
|
513
|
-
trie ledger history # Show chain with author attribution
|
|
514
|
-
trie ledger stats # Block counts, entries, severity breakdown
|
|
515
|
-
trie ledger diff # Compare local vs shared
|
|
516
|
-
trie ledger compress # Manually archive old blocks
|
|
517
|
-
trie ledger storage # Detailed storage usage stats
|
|
332
|
+
trie sync status # Show sync state
|
|
333
|
+
trie sync hooks --install # Install auto-sync git hooks
|
|
518
334
|
```
|
|
519
335
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
Trie provides MCP (Model Context Protocol) tools for seamless integration with Claude, Cursor, and other AI assistants:
|
|
336
|
+
The shared ledger lives in `.trie-shared/` with hot/cold storage tiers and automatic compression.
|
|
523
337
|
|
|
524
|
-
|
|
525
|
-
trie_tell - Report incidents and extract structured signals
|
|
526
|
-
trie_check - Quick risk assessment
|
|
527
|
-
trie_memory - Search incident history
|
|
528
|
-
trie_fix - Apply suggested fixes (use action:route to see triage plan)
|
|
529
|
-
trie_cloud_fix - Dispatch to Cursor cloud agent for verified fixes
|
|
338
|
+
</details>
|
|
530
339
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
trie_github_sync - Sync open PRs and issues from GitHub
|
|
534
|
-
trie_github_branches - Fetch branches with latest commit info (which branch has latest updates)
|
|
535
|
-
trie_pipeline - Consolidated view of tickets, PRs, issues, coverage gaps
|
|
340
|
+
<details>
|
|
341
|
+
<summary><b>Memory Management</b></summary>
|
|
536
342
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
343
|
+
```bash
|
|
344
|
+
# Search incident history
|
|
345
|
+
trie memory search "authentication"
|
|
346
|
+
trie memory stats
|
|
347
|
+
trie memory recent
|
|
542
348
|
|
|
543
|
-
|
|
349
|
+
# Clean up old issues (doesn't affect immutable ledger)
|
|
350
|
+
trie memory purge smart # Remove resolved & old low-priority
|
|
351
|
+
trie memory purge resolved # All resolved issues
|
|
352
|
+
trie memory purge old # Older than 90 days
|
|
353
|
+
```
|
|
544
354
|
|
|
545
|
-
|
|
355
|
+
</details>
|
|
546
356
|
|
|
547
|
-
|
|
357
|
+
<details>
|
|
358
|
+
<summary><b>Git Hooks</b></summary>
|
|
548
359
|
|
|
549
|
-
|
|
550
|
-
Git repository
|
|
360
|
+
Installed automatically with `trie init`:
|
|
551
361
|
|
|
552
|
-
|
|
362
|
+
- **pre-commit** - Scan staged files, block on critical issues
|
|
363
|
+
- **post-commit** - Update context graph
|
|
364
|
+
- **pre-push** - Block push on critical issues
|
|
553
365
|
|
|
366
|
+
**Bypass methods:**
|
|
554
367
|
```bash
|
|
555
|
-
#
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
# Or use npx for one-time runs
|
|
559
|
-
npx trie watch
|
|
368
|
+
git push --no-verify # Skip all hooks
|
|
369
|
+
TRIE_BYPASS=1 git push # Skip Trie but log bypass
|
|
560
370
|
```
|
|
561
371
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
```bash
|
|
565
|
-
# Initialize in your project
|
|
566
|
-
cd your-project
|
|
567
|
-
trie init
|
|
568
|
-
|
|
569
|
-
# This creates:
|
|
570
|
-
# - .trie/ directory with initial config
|
|
571
|
-
# - Git hooks for automatic checking
|
|
572
|
-
# - Bootstrap files (optional)
|
|
573
|
-
```
|
|
372
|
+
</details>
|
|
574
373
|
|
|
575
|
-
|
|
374
|
+
## How It Works
|
|
576
375
|
|
|
577
|
-
|
|
376
|
+
### Memory Architecture
|
|
578
377
|
|
|
579
|
-
|
|
580
|
-
LINEAR_API_KEY: Enables JIT defect prediction by syncing your active tickets.
|
|
378
|
+
Trie maintains two complementary memory systems:
|
|
581
379
|
|
|
582
|
-
|
|
380
|
+
**1. Governance Ledger** (`.trie/memory/ledger.json`)
|
|
381
|
+
- Append-only chain with Ed25519 signatures
|
|
382
|
+
- Tamper-evident, never deleted (only corrected)
|
|
383
|
+
- Used for: audit trail, compliance, gotcha predictions
|
|
384
|
+
- Auto-commits to Git for distributed backup
|
|
583
385
|
|
|
584
|
-
|
|
386
|
+
**2. Issue Memory** (`.trie/memory/issues.json`)
|
|
387
|
+
- Fast searchable cache of detected issues
|
|
388
|
+
- Can be compacted and purged
|
|
389
|
+
- Used for: pattern recognition, quick queries
|
|
390
|
+
- Links back to ledger via `ledgerBlockHash`
|
|
585
391
|
|
|
586
|
-
|
|
587
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
588
|
-
export LINEAR_API_KEY=lin_api_...
|
|
589
|
-
```
|
|
392
|
+
Both systems sync across your team and travel with your codebase via Git.
|
|
590
393
|
|
|
591
|
-
|
|
394
|
+
### File Structure
|
|
592
395
|
|
|
593
|
-
```bash
|
|
594
|
-
trie linear auth <your-key>
|
|
595
396
|
```
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
397
|
+
your-project/
|
|
398
|
+
├── .trie/
|
|
399
|
+
│ ├── memory/
|
|
400
|
+
│ │ ├── ledger.json # Governance ledger (cryptographic chain)
|
|
401
|
+
│ │ └── issues.json # Issue cache
|
|
402
|
+
│ ├── warm/
|
|
403
|
+
│ │ └── decisions.db # SQLite database for structured queries
|
|
404
|
+
│ ├── context.json # Project knowledge graph
|
|
405
|
+
│ ├── config.json # Settings
|
|
406
|
+
│ └── keys/ # Ed25519 signing keys (never committed)
|
|
407
|
+
├── .trie-shared/ # Shared ledger for team sync (optional)
|
|
408
|
+
│ ├── active/
|
|
409
|
+
│ ├── archived/
|
|
410
|
+
│ └── ledger-manifest.json
|
|
411
|
+
└── .git/
|
|
614
412
|
```
|
|
615
413
|
|
|
616
|
-
###
|
|
414
|
+
### Signal Extraction
|
|
617
415
|
|
|
618
|
-
|
|
416
|
+
Instead of dumping raw logs into context, Trie extracts structured signals:
|
|
619
417
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
"env": {
|
|
627
|
-
"ANTHROPIC_API_KEY": "your-api-key-here",
|
|
628
|
-
"LINEAR_API_KEY": "your-key",
|
|
629
|
-
"GITHUB_TOKEN": "your-github-token",
|
|
630
|
-
"CURSOR_API_KEY": "your-cursor-key"
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
```
|
|
418
|
+
**Input:** Incident report, commit, conversation
|
|
419
|
+
**Extraction:** AI pulls out structured data:
|
|
420
|
+
- **Decisions**: "Chose bcrypt over sha256 for password hashing"
|
|
421
|
+
- **Facts**: "Stripe requires TLS 1.2+ for EU transactions"
|
|
422
|
+
- **Blockers**: "Missing VAT validation blocks EU checkout"
|
|
423
|
+
- **Questions**: "Should we cache session tokens?"
|
|
636
424
|
|
|
637
|
-
|
|
425
|
+
**Storage:** Goes to queryable database with embeddings
|
|
426
|
+
**Query:** Agents ask for targeted context, not everything at once
|
|
638
427
|
|
|
639
|
-
|
|
428
|
+
This prevents context pollution and keeps agents focused on relevant signals.
|
|
640
429
|
|
|
641
430
|
## CLI Reference
|
|
642
431
|
|
|
@@ -644,386 +433,133 @@ Note: VS Code extension is coming soon.
|
|
|
644
433
|
|
|
645
434
|
```bash
|
|
646
435
|
trie init # Set up Trie in your project
|
|
647
|
-
trie setup # Show setup guide with integration status
|
|
648
|
-
trie tell # Report incidents (extracts decisions, facts, blockers)
|
|
649
436
|
trie status # View project health and memory stats
|
|
650
|
-
trie
|
|
437
|
+
trie tell # Report incidents (extracts decisions, facts, blockers)
|
|
651
438
|
trie gotcha # Predict problems with current changes
|
|
439
|
+
trie learn # Train from git history or feedback
|
|
440
|
+
trie watch # Start interactive monitoring dashboard
|
|
652
441
|
```
|
|
653
442
|
|
|
654
|
-
###
|
|
443
|
+
### Goals
|
|
655
444
|
|
|
656
445
|
```bash
|
|
657
|
-
trie
|
|
658
|
-
trie
|
|
659
|
-
trie setup slack <webhook-url> [channel] # Configure Slack integration
|
|
660
|
-
trie setup test-slack # Test Slack connection
|
|
446
|
+
trie goal add "<goal>" # Set improvement goal
|
|
447
|
+
trie goal list # View progress
|
|
661
448
|
```
|
|
662
449
|
|
|
663
|
-
### Memory
|
|
450
|
+
### Memory
|
|
664
451
|
|
|
665
452
|
```bash
|
|
666
|
-
trie memory search "
|
|
667
|
-
trie memory stats
|
|
668
|
-
trie memory
|
|
669
|
-
trie
|
|
453
|
+
trie memory search "query" # Search incident history
|
|
454
|
+
trie memory stats # View statistics
|
|
455
|
+
trie memory recent # Recent issues
|
|
456
|
+
trie memory purge smart # Clean up old/resolved
|
|
670
457
|
```
|
|
671
458
|
|
|
672
|
-
###
|
|
459
|
+
### Ledger
|
|
673
460
|
|
|
674
461
|
```bash
|
|
675
|
-
trie
|
|
676
|
-
trie
|
|
677
|
-
trie
|
|
678
|
-
trie
|
|
462
|
+
trie ledger verify # Validate chain integrity
|
|
463
|
+
trie ledger history # Show blocks with authors
|
|
464
|
+
trie ledger stats # Block counts, entries, severity
|
|
465
|
+
trie ledger correct <id> # Mark entry as corrected
|
|
466
|
+
trie ledger corrections # View correction stats
|
|
679
467
|
```
|
|
680
468
|
|
|
681
|
-
###
|
|
469
|
+
### Sync
|
|
682
470
|
|
|
683
471
|
```bash
|
|
684
|
-
trie
|
|
685
|
-
trie
|
|
686
|
-
trie
|
|
687
|
-
trie
|
|
688
|
-
trie
|
|
689
|
-
trie ledger storage # Storage usage stats
|
|
690
|
-
trie sync init # Initialize shared ledger
|
|
691
|
-
trie sync pull # Pull from shared storage
|
|
692
|
-
trie sync push # Push local blocks to shared
|
|
693
|
-
trie sync status # Show sync state and conflicts
|
|
694
|
-
trie sync migrate # Migrate legacy v1 ledger
|
|
695
|
-
trie sync hooks --install # Install auto-sync git hooks
|
|
472
|
+
trie sync init # Initialize shared ledger
|
|
473
|
+
trie sync pull # Pull from shared storage
|
|
474
|
+
trie sync push # Push to shared storage
|
|
475
|
+
trie sync status # Show sync state
|
|
476
|
+
trie sync hooks --install # Install auto-sync git hooks
|
|
696
477
|
```
|
|
697
478
|
|
|
698
|
-
###
|
|
479
|
+
### Keys
|
|
699
480
|
|
|
700
481
|
```bash
|
|
701
|
-
trie
|
|
702
|
-
trie
|
|
703
|
-
trie
|
|
704
|
-
trie pause # Disable warnings for 1 hour
|
|
482
|
+
trie keys generate # Generate Ed25519 signing key
|
|
483
|
+
trie keys status # Check if signing is configured
|
|
484
|
+
trie keys public # Get your public key
|
|
705
485
|
```
|
|
706
486
|
|
|
707
|
-
###
|
|
487
|
+
### Feedback
|
|
708
488
|
|
|
709
489
|
```bash
|
|
710
|
-
trie
|
|
711
|
-
|
|
712
|
-
#
|
|
713
|
-
screen -S trie-watch && trie watch # Detach: Ctrl+A, D
|
|
714
|
-
tmux new -s trie-watch && trie watch # Detach: Ctrl+B, D
|
|
490
|
+
trie ok # Pattern is good
|
|
491
|
+
trie bad # Pattern is bad
|
|
492
|
+
trie pause # Disable warnings for 1 hour
|
|
715
493
|
```
|
|
716
494
|
|
|
717
|
-
|
|
495
|
+
### Setup
|
|
718
496
|
|
|
719
|
-
|
|
497
|
+
```bash
|
|
498
|
+
trie setup # Show setup guide
|
|
499
|
+
trie setup slack <webhook> # Configure Slack
|
|
500
|
+
trie setup test-slack # Test Slack connection
|
|
501
|
+
trie linear auth <key> # Configure Linear
|
|
502
|
+
trie linear sync # Sync Linear tickets
|
|
503
|
+
```
|
|
720
504
|
|
|
721
|
-
|
|
505
|
+
## Configuration
|
|
722
506
|
|
|
723
|
-
Create
|
|
507
|
+
Create `.trie/config.json`:
|
|
724
508
|
|
|
725
509
|
```json
|
|
726
510
|
{
|
|
727
511
|
"scanOptions": {
|
|
728
512
|
"maxConcurrency": 4,
|
|
729
|
-
"timeoutMs": 30000
|
|
730
|
-
"includeNodeModules": false
|
|
513
|
+
"timeoutMs": 30000
|
|
731
514
|
},
|
|
732
|
-
"autoEscalation": {
|
|
733
|
-
"enabled": true,
|
|
734
|
-
"webhookUrl": "https://hooks.slack.com/...",
|
|
735
|
-
"quietHours": { "start": "21:00", "end": "08:00" }
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
```
|
|
739
|
-
|
|
740
|
-
### Git Hooks
|
|
741
|
-
|
|
742
|
-
Installed automatically with trie init:
|
|
743
|
-
|
|
744
|
-
- **pre-commit** - Quick scan of staged files
|
|
745
|
-
- **post-commit** - Update context graph
|
|
746
|
-
- **pre-push** - Block critical issues (can be bypassed)
|
|
747
|
-
|
|
748
|
-
**Hook Commands** (called automatically by Git):
|
|
749
|
-
```bash
|
|
750
|
-
trie pre-commit # Scan staged files, block on critical issues
|
|
751
|
-
trie post-commit # Update context graph after commit
|
|
752
|
-
trie pre-push # Block push on critical issues
|
|
753
|
-
```
|
|
754
|
-
|
|
755
|
-
**Bypass Methods:**
|
|
756
|
-
```bash
|
|
757
|
-
git push --no-verify # Skip all hooks
|
|
758
|
-
TRIE_BYPASS=1 git push # Skip Trie but log bypass
|
|
759
|
-
```
|
|
760
|
-
|
|
761
|
-
### Slack Integration
|
|
762
|
-
|
|
763
|
-
Trie sends notifications to Slack for team collaboration:
|
|
764
|
-
|
|
765
|
-
**Quick Setup:**
|
|
766
|
-
```bash
|
|
767
|
-
# Show setup guide
|
|
768
|
-
trie setup slack
|
|
769
|
-
|
|
770
|
-
# Configure webhook
|
|
771
|
-
trie setup slack <webhook-url> [#channel]
|
|
772
|
-
|
|
773
|
-
# Test integration
|
|
774
|
-
trie setup test-slack
|
|
775
|
-
```
|
|
776
|
-
|
|
777
|
-
**Manual Setup:**
|
|
778
|
-
1. Create a Slack webhook: https://api.slack.com/apps
|
|
779
|
-
2. Run: `trie setup slack <webhook-url> [#channel]`
|
|
780
|
-
|
|
781
|
-
Or manually add to `.trie/config.json`:
|
|
782
|
-
|
|
783
|
-
```json
|
|
784
|
-
{
|
|
785
515
|
"integrations": {
|
|
786
516
|
"slack": {
|
|
787
517
|
"enabled": true,
|
|
788
|
-
"webhook": "https://hooks.slack.com
|
|
789
|
-
"channel": "#security"
|
|
518
|
+
"webhook": "https://hooks.slack.com/...",
|
|
519
|
+
"channel": "#security"
|
|
790
520
|
}
|
|
791
521
|
},
|
|
792
522
|
"autoEscalation": {
|
|
793
523
|
"enabled": true,
|
|
794
|
-
"webhookUrl": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
|
|
795
524
|
"quietHours": { "start": "21:00", "end": "08:00" }
|
|
796
525
|
}
|
|
797
526
|
}
|
|
798
527
|
```
|
|
799
528
|
|
|
800
|
-
|
|
801
|
-
- Decision extractions from incidents
|
|
802
|
-
- Active blockers
|
|
803
|
-
- Risk predictions from gotcha
|
|
804
|
-
- Daily/weekly team summaries
|
|
805
|
-
- Critical decision changes
|
|
806
|
-
- Auto-escalation notifications
|
|
807
|
-
|
|
808
|
-
### Ledger Corrections (Immutable Audit Trail)
|
|
809
|
-
|
|
810
|
-
The ledger is **append-only** - entries are never deleted. When mistakes happen, use corrections instead:
|
|
811
|
-
|
|
812
|
-
**Mark entries as corrected:**
|
|
813
|
-
```bash
|
|
814
|
-
# Correct a false positive
|
|
815
|
-
trie ledger correct <entry-id> -r "Expected behavior, not a bug" -t false-positive
|
|
816
|
-
|
|
817
|
-
# Mark as fixed
|
|
818
|
-
trie ledger correct <entry-id> -r "Fixed in commit abc123"
|
|
819
|
-
|
|
820
|
-
# Batch corrections
|
|
821
|
-
trie ledger correct entry1 entry2 entry3 -r "Duplicate detections"
|
|
822
|
-
```
|
|
823
|
-
|
|
824
|
-
**View correction stats:**
|
|
825
|
-
```bash
|
|
826
|
-
# Show correction statistics
|
|
827
|
-
trie ledger corrections
|
|
828
|
-
|
|
829
|
-
# View history for specific entries
|
|
830
|
-
trie ledger corrections --entries <entry-id1> <entry-id2>
|
|
831
|
-
```
|
|
832
|
-
|
|
833
|
-
**What happens:**
|
|
834
|
-
- Original entry preserved for audit trail
|
|
835
|
-
- Entry marked with status (`corrected` or `false-positive`)
|
|
836
|
-
- Correction metadata added (timestamp, reason, who)
|
|
837
|
-
- New correction entry appended to ledger
|
|
838
|
-
- Queries automatically filter out corrected entries
|
|
839
|
-
|
|
840
|
-
**Why immutability matters:**
|
|
841
|
-
- Full audit trail for compliance and trust
|
|
842
|
-
- Tamper-evidence through cryptographic chain
|
|
843
|
-
- Learn from false positives to improve detection
|
|
844
|
-
- Track correction rates over time
|
|
845
|
-
|
|
846
|
-
## CI/CD Integration
|
|
847
|
-
|
|
848
|
-
### GitHub Actions
|
|
849
|
-
|
|
850
|
-
```bash
|
|
851
|
-
# Generate workflow file
|
|
852
|
-
trie ci github
|
|
853
|
-
|
|
854
|
-
# Creates .github/workflows/trie.yml with:
|
|
855
|
-
# - Decision ledger queries
|
|
856
|
-
# - Memory caching for speed
|
|
857
|
-
# - Risk prediction on PRs
|
|
858
|
-
```
|
|
859
|
-
|
|
860
|
-
### Custom CI
|
|
861
|
-
|
|
862
|
-
```bash
|
|
863
|
-
# In your CI pipeline
|
|
864
|
-
npm install -g trie
|
|
865
|
-
# Query decision ledger for risks
|
|
866
|
-
|
|
867
|
-
## Memory Architecture
|
|
868
|
-
|
|
869
|
-
Trie maintains two complementary memory systems that work together:
|
|
870
|
-
|
|
871
|
-
### 1. Governance Ledger (Primary Product)
|
|
872
|
-
|
|
873
|
-
**Location:** `.trie/memory/ledger.json`
|
|
874
|
-
**Purpose:** Tamper-evident record of decisions, incidents, and fixes
|
|
875
|
-
**Architecture:** Append-only chain of blocks with Ed25519 signatures
|
|
876
|
-
|
|
877
|
-
This is the **core governance layer** that:
|
|
878
|
-
- Powers `trie gotcha` predictions
|
|
879
|
-
- Provides accountability for agent and human decisions
|
|
880
|
-
- Uses digital signatures to detect tampering
|
|
881
|
-
- Never deleted, only corrected (see [Ledger Corrections](./docs/LEDGER_CORRECTIONS.md))
|
|
882
|
-
- Auto-commits to Git for distributed backup
|
|
883
|
-
|
|
884
|
-
**How it works:**
|
|
885
|
-
- **Daily blocks** - One block per calendar day; all issues detected that day go into the same block
|
|
886
|
-
- Every entry gets signed with Ed25519 (automatic once key exists)
|
|
887
|
-
- Signatures prove who created each entry and detect modifications
|
|
888
|
-
- Git integration provides distributed backup and history
|
|
889
|
-
- Think: **double-entry bookkeeping**, not blockchain
|
|
890
|
-
|
|
891
|
-
**Setting up Ed25519 signing:**
|
|
892
|
-
```bash
|
|
893
|
-
# Option 1: Automatic (trie init generates a key)
|
|
894
|
-
trie init
|
|
895
|
-
|
|
896
|
-
# Option 2: Manual
|
|
897
|
-
trie keys generate # Generate Ed25519 signing key
|
|
898
|
-
trie keys status # Check if signing is configured
|
|
899
|
-
trie keys public # Get your public key for verification
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
Once a key exists, all new ledger entries are signed automatically. Keys are stored in `.trie/keys/` (never committed to git). Each team member generates their own key.
|
|
903
|
-
|
|
904
|
-
**Security model:**
|
|
905
|
-
- ✅ **Tamper-evident**: Signatures detect if entries are modified
|
|
906
|
-
- ✅ **Accountability**: See who (human or agent) made each decision
|
|
907
|
-
- ✅ **Git backup**: Distributed history via automatic commits
|
|
908
|
-
- ✅ **Verification**: `trie ledger verify` checks integrity
|
|
909
|
-
- ⚠️ **Not encrypted**: Ledger is plaintext (can add encryption if needed)
|
|
910
|
-
- ⚠️ **Not access-controlled**: Standard file permissions apply
|
|
911
|
-
- ⚠️ **Not deletion-proof**: Can still `rm .trie/` (but Git history remains)
|
|
912
|
-
|
|
913
|
-
**Real protection comes from:** Git history + Team workflow + PR reviews
|
|
914
|
-
|
|
915
|
-
Perfect for agent collaboration because:
|
|
916
|
-
- Agents can trust ledger contents (signatures verify authenticity)
|
|
917
|
-
- Humans can audit agent decisions (full provenance trail)
|
|
918
|
-
- Cross-tool context works (same ledger in Cursor, CLI, CI/CD)
|
|
919
|
-
- Conflicts are visible (Git shows competing changes)
|
|
920
|
-
|
|
921
|
-
Learn more: [Signatures & Git Integration](./docs/SIGNATURES_AND_GIT.md)
|
|
922
|
-
|
|
923
|
-
### 2. Issue Memory (Query Cache)
|
|
924
|
-
|
|
925
|
-
**Location:** `.trie/memory/issues.json`
|
|
926
|
-
**Purpose:** Fast searchable cache for pattern queries
|
|
927
|
-
**Complementary to:** The ledger
|
|
928
|
-
|
|
929
|
-
Issue memory caches:
|
|
930
|
-
- **Goal violations** caught by watch mode
|
|
931
|
-
- **Learning extractions** from `trie learn` (git history analysis)
|
|
932
|
-
- **Manual reports** via `trie tell` or chat
|
|
933
|
-
- **Working state** - tracks resolved/open/fixed status
|
|
934
|
-
- **Cross-project patterns** in `~/.trie/memory/`
|
|
935
|
-
|
|
936
|
-
**Each issue links back to the ledger** via `ledgerBlockHash` for full audit trail.
|
|
937
|
-
|
|
938
|
-
**Why both systems?**
|
|
939
|
-
- **Ledger** = immutable historical record (what was detected, when)
|
|
940
|
-
- **Issue memory** = mutable working state (resolved, open, metrics)
|
|
941
|
-
|
|
942
|
-
The ledger ensures nothing is lost. Issue memory tracks current state and makes queries fast.
|
|
943
|
-
|
|
944
|
-
### Query Issue Memory
|
|
945
|
-
|
|
946
|
-
```bash
|
|
947
|
-
# Search for patterns
|
|
948
|
-
trie memory search "authentication"
|
|
529
|
+
## Why Trie Exists
|
|
949
530
|
|
|
950
|
-
|
|
951
|
-
trie memory stats
|
|
531
|
+
When agents and humans ship code together, coordination becomes the bottleneck. Context fragments across tools, decisions get forgotten, and nothing prevents repeating the same mistakes.
|
|
952
532
|
|
|
953
|
-
|
|
954
|
-
trie memory recent
|
|
955
|
-
```
|
|
533
|
+
Trie solves this with a governance ledger—a tamper-evident record that travels with your code. Every tool reads from the same ledger, so agents and humans stay aligned. Teams that can coordinate contributors (human and AI) without losing coherence will ship faster and more reliably.
|
|
956
534
|
|
|
957
|
-
|
|
535
|
+
As codebases move toward agent autonomy—agents that merge PRs, manage rollouts, and monitor production—governance becomes critical. Trie keeps your work compliant, scales your contributors, and turns your decision history into durable institutional knowledge.
|
|
958
536
|
|
|
959
537
|
## Troubleshooting
|
|
960
538
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
**Trie not finding issues**: You haven't taught Trie about your specific patterns yet. Use `trie tell` to report incidents and build your decision ledger.
|
|
964
|
-
|
|
965
|
-
**Memory queries returning empty**: The warm storage is empty. Report some incidents with `trie tell` or run `trie learn` to extract from git history.
|
|
539
|
+
**Trie not finding issues**: You haven't taught Trie about your patterns yet. Use `trie tell` to report incidents.
|
|
966
540
|
|
|
967
|
-
**
|
|
541
|
+
**Memory queries returning empty**: Report incidents with `trie tell` or run `trie learn` to extract from git history.
|
|
968
542
|
|
|
969
|
-
**
|
|
543
|
+
**Query tools not working**: Make sure you've initialized with `trie init` and have `ANTHROPIC_API_KEY` set.
|
|
970
544
|
|
|
971
|
-
**
|
|
972
|
-
```bash
|
|
973
|
-
# Quick fix - activate a specific goal
|
|
974
|
-
node fix-goals.js "NO EMOJIS"
|
|
545
|
+
**Hooks not working**: Reinstall with `trie init`. Check write permissions to `.git/hooks/`.
|
|
975
546
|
|
|
976
|
-
|
|
977
|
-
trie goal add "NO EMOJIS"
|
|
978
|
-
trie goal list
|
|
979
|
-
```
|
|
980
|
-
### Getting Help
|
|
981
|
-
- Issues: [Report bugs and request features](https://x.com/louiskishfy)
|
|
547
|
+
**Goals showing but not detecting violations**: Goals may not be active in project state. Run `trie goal add "<goal>"` to activate.
|
|
982
548
|
|
|
983
|
-
|
|
549
|
+
**Quick start:**
|
|
550
|
+
1. Fork and clone the repository
|
|
551
|
+
2. `npm install`
|
|
552
|
+
3. Copy `.env.example` to `.env.local` and add API keys
|
|
553
|
+
4. `npm run build`
|
|
554
|
+
5. `npm test`
|
|
984
555
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
2. **Install dependencies**: `npm install`
|
|
991
|
-
3. **Set up environment**: Copy `.env.example` to `.env.local` and add your API keys
|
|
992
|
-
4. **Build the project**: `npm run build`
|
|
993
|
-
5. **Run tests**: `npm test`
|
|
994
|
-
|
|
995
|
-
### Before Submitting
|
|
996
|
-
|
|
997
|
-
- Ensure all tests pass (`npm test`)
|
|
998
|
-
- Run type checking (`npm run typecheck`)
|
|
999
|
-
- Follow our code style (`npm run lint`)
|
|
1000
|
-
- Update documentation for new features
|
|
556
|
+
**Before submitting:**
|
|
557
|
+
- All tests pass (`npm test`)
|
|
558
|
+
- Type checking passes (`npm run typecheck`)
|
|
559
|
+
- Follow code style (`npm run lint`)
|
|
560
|
+
- Update docs for new features
|
|
1001
561
|
- Never commit secrets or API keys
|
|
1002
562
|
|
|
1003
|
-
**Read our full [Contributing Guide](CONTRIBUTING.md) for detailed guidelines.**
|
|
1004
|
-
|
|
1005
|
-
### Ways to Contribute
|
|
1006
|
-
|
|
1007
|
-
- 🐛 **Report bugs** - Open an issue with reproduction steps
|
|
1008
|
-
- 💡 **Suggest features** - Share ideas for improvements
|
|
1009
|
-
- 📝 **Improve docs** - Fix typos, add examples, clarify instructions
|
|
1010
|
-
- 🔧 **Submit PRs** - Fix bugs or implement features
|
|
1011
|
-
- 🧪 **Add tests** - Improve test coverage
|
|
1012
|
-
- 🔐 **Security** - Report vulnerabilities privately (see [SECURITY.md](SECURITY.md))
|
|
1013
|
-
|
|
1014
|
-
### Code of Conduct
|
|
1015
|
-
|
|
1016
|
-
Be respectful, inclusive, and professional. We're building this together.
|
|
1017
|
-
|
|
1018
|
-
## Security
|
|
1019
|
-
|
|
1020
|
-
Please report security vulnerabilities privately. See [SECURITY.md](SECURITY.md) for details.
|
|
1021
|
-
|
|
1022
|
-
**Never commit:**
|
|
1023
|
-
- API keys or secrets
|
|
1024
|
-
- `.env.local` or `.env` files
|
|
1025
|
-
- Private signing keys (`.trie/keys/`)
|
|
1026
|
-
- Personal configuration
|
|
1027
563
|
|
|
1028
564
|
## License
|
|
1029
565
|
|