thumbgate 1.5.0 → 1.5.2
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/CHANGELOG.md +504 -0
- package/README.md +251 -223
- package/adapters/README.md +1 -1
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/codex/config.toml +4 -2
- package/adapters/mcp/server-stdio.js +34 -3
- package/adapters/opencode/opencode.json +1 -1
- package/bench/prompt-eval-suite.json +106 -0
- package/bin/cli.js +21 -8
- package/bin/postinstall.js +25 -17
- package/config/evals/agent-safety-eval.json +131 -0
- package/config/github-about.json +5 -2
- package/config/specs/agent-safety.json +79 -0
- package/package.json +69 -29
- package/public/compare.html +3 -3
- package/public/dashboard.html +1399 -0
- package/public/guide.html +2 -2
- package/public/index.html +230 -98
- package/scripts/auto-wire-hooks.js +77 -27
- package/scripts/bot-detection.js +165 -0
- package/scripts/cli-feedback.js +6 -2
- package/scripts/commercial-offer.js +4 -4
- package/scripts/dashboard.js +152 -2
- package/scripts/decision-trace.js +354 -0
- package/scripts/feedback-loop.js +4 -8
- package/scripts/prompt-eval.js +363 -0
- package/scripts/rate-limiter.js +77 -24
- package/scripts/sales-pipeline.js +681 -0
- package/scripts/session-episode-store.js +329 -0
- package/scripts/session-health-sensor.js +242 -0
- package/scripts/spec-gate.js +362 -0
- package/scripts/statusline.sh +6 -9
- package/skills/thumbgate/SKILL.md +1 -1
- package/src/api/server.js +368 -12
package/README.md
CHANGED
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
# ThumbGate
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Your AI coding bill has a leak.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Stop paying $ for the same AI mistake.**
|
|
6
|
+
|
|
7
|
+
Every retry loop, every hallucinated import, every *"let me try a different approach"* — those are billable tokens on every LLM vendor's bill. Thumbs-down once; ThumbGate blocks that exact mistake on every future call. Across Claude Code, Cursor, Codex, Gemini, Amp, OpenCode — any MCP-compatible agent, forever.
|
|
8
|
+
|
|
9
|
+
Under the hood: your thumbs-down becomes a **Pre-Action Gate** that physically blocks the pattern **permanently** on every future call — across every session, every model, every agent. It is **self-improving agent governance**: every correction promotes a fresh prevention rule, and your library of Pre-Action Gates grows stronger with every lesson. Works with Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode, and any MCP-compatible agent. The monthly Anthropic / OpenAI bill stops paying for the same lesson over and over — local-first enforcement, zero tokens spent on repeats.
|
|
10
|
+
|
|
11
|
+
> **Prevent expensive AI mistakes. Make AI stop repeating mistakes. Turn a smart assistant into a reliable operator.**
|
|
12
|
+
|
|
13
|
+
> **Mission:** make AI coding affordable by making sure you never pay for the same mistake twice.
|
|
6
14
|
|
|
7
15
|
[](https://github.com/IgorGanapolsky/ThumbGate/actions/workflows/ci.yml)
|
|
8
16
|
[](https://www.npmjs.com/package/thumbgate)
|
|
9
17
|
[](LICENSE)
|
|
10
|
-
[](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=badge_cta#workflow-sprint-intake)
|
|
11
|
-
[](https://thumbgate-production.up.railway.app/go/gpt?utm_source=github&utm_medium=readme&utm_campaign=badge_cta&cta_id=readme_badge_open_gpt&cta_placement=readme_badge)
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
---
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
## 🎬 90-second demo
|
|
22
|
+
|
|
23
|
+
Watch the force-push scenario: agent tries to `git push --force`, one thumbs-down, next session it's blocked — zero tokens spent on the repeat.
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
[**▶ Watch the 90-second demo**](https://thumbgate-production.up.railway.app/#demo?utm_source=github&utm_medium=readme&utm_campaign=demo_video) · [Script](docs/marketing/demo-video-script.md) · [ElevenLabs narration: `npm run demo:voiceover`](scripts/generate-demo-voiceover.js)
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
<!-- Video embed lives on the landing page and YouTube. Script + voiceover automation ship with the repo so anyone can re-record. -->
|
|
28
|
+
|
|
29
|
+
---
|
|
20
30
|
|
|
21
31
|
## First-dollar activation path
|
|
22
32
|
|
|
@@ -29,65 +39,116 @@ If someone is not already bought into ThumbGate, do not lead with architecture.
|
|
|
29
39
|
|
|
30
40
|
The buying question is simple: **what repeated AI mistake would be worth blocking before the next tool call?**
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## The Problem — the bill nobody talks about
|
|
33
45
|
|
|
34
|
-
|
|
46
|
+
Frontier-model calls are not cheap. Sonnet 4.5 is ~$3 / 1M input tokens and ~$15 / 1M output tokens. Opus is 5× that. Every time your agent:
|
|
35
47
|
|
|
36
|
-
|
|
48
|
+
- hallucinates a function name and you have to correct it,
|
|
49
|
+
- retries the same failing tool call until it gives up,
|
|
50
|
+
- regenerates a 4,000-token plan you already approved last session,
|
|
51
|
+
- repeats a destructive command you blocked manually yesterday,
|
|
37
52
|
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
…you are paying for that round-trip. *Twice if it retries. Three times if you re-prompt.* And the agent has no memory across sessions, so the meter resets every Monday.
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Session 1: Agent force-pushes to main. You fix it. +4,200 tokens
|
|
57
|
+
Session 2: Agent force-pushes again. You fix it. +4,200 tokens
|
|
58
|
+
Session 3: Same mistake. Again. You lose 45m. +5,800 tokens
|
|
40
59
|
```
|
|
41
60
|
|
|
42
|
-
|
|
61
|
+
That's ~$0.21 in tokens just to fix the same mistake three times — multiplied by every developer, every repeated-mistake class, every week. The math gets ugly fast.
|
|
62
|
+
|
|
63
|
+
## The Solution — fix it once, the bill never sees it again
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Session 1: Agent force-pushes to main. You 👎 it. +4,200 tokens
|
|
67
|
+
Session 2: ⛔ Gate blocks the force-push. Zero round-trip. +0 tokens
|
|
68
|
+
Session 3+: Never happens again. +0 tokens
|
|
69
|
+
```
|
|
43
70
|
|
|
44
|
-
|
|
71
|
+
One thumbs-down. The PreToolUse hook intercepts the call **before** it reaches the model — no input tokens, no output tokens, no retry loop. The dashboard tracks **tokens saved this week** as a live counter so you can see exactly what your prevention rules are worth.
|
|
45
72
|
|
|
46
|
-
|
|
73
|
+
ThumbGate doesn't make your agent smarter. It makes your agent *cheaper to be wrong with.*
|
|
47
74
|
|
|
48
|
-
|
|
75
|
+
---
|
|
49
76
|
|
|
50
|
-
|
|
77
|
+
## Quick Start
|
|
51
78
|
|
|
52
79
|
```bash
|
|
53
|
-
|
|
80
|
+
npx thumbgate init # auto-detects your agent, wires everything
|
|
81
|
+
npx thumbgate capture "Never run DROP on production tables"
|
|
54
82
|
```
|
|
55
83
|
|
|
56
|
-
|
|
84
|
+
That single command creates a gate rule. Next time any AI agent tries to run `DROP` on production:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
⛔ Gate blocked: "Never run DROP on production tables"
|
|
88
|
+
Pattern: DROP.*production
|
|
89
|
+
Verdict: BLOCK
|
|
90
|
+
```
|
|
57
91
|
|
|
58
92
|
---
|
|
59
93
|
|
|
60
|
-
##
|
|
94
|
+
## Architecture
|
|
61
95
|
|
|
62
|
-
|
|
96
|
+
ThumbGate operates as a 4-layer enforcement stack between your AI agent and your codebase:
|
|
63
97
|
|
|
64
|
-
ThumbGate
|
|
98
|
+

|
|
65
99
|
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
- **Turn AI into a reliable operator** — move from a smart assistant that apologizes after damage to a production-ready operator with checkpoints, proof, and enforcement.
|
|
100
|
+
### Layer 1: Feedback Capture
|
|
101
|
+
Your thumbs-up/down reactions are captured via MCP protocol, CLI, or the ChatGPT GPT surface. Each reaction is stored as a structured lesson with context, timestamp, and severity.
|
|
69
102
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
103
|
+
### Layer 2: Gate Engine
|
|
104
|
+
The gate engine converts lessons into enforceable rules using pattern matching, semantic similarity (via LanceDB vectors), and Thompson Sampling for adaptive rule selection. Rules are stored locally in `.thumbgate/gates/`.
|
|
105
|
+
|
|
106
|
+
### Layer 3: Pre-Action Interception
|
|
107
|
+
Before any agent action executes, ThumbGate's `PreToolUse` hook intercepts the command and evaluates it against all active gates. This happens at the MCP protocol level — the agent physically cannot bypass it.
|
|
108
|
+
|
|
109
|
+
### Layer 4: Multi-Agent Distribution
|
|
110
|
+
Gates are distributed across all connected agents via MCP stdio protocol. One correction in Claude Code protects Cursor, Codex, Gemini CLI, and any MCP-compatible agent.
|
|
111
|
+
|
|
112
|
+
Prompt engineering still matters, but it is only the starting point. ThumbGate adds prompt evaluation on top: proof lanes, benchmarks, and self-heal checks tell you whether your prompt and workflow actually held up under execution instead of leaving you to guess from vibes.
|
|
113
|
+
|
|
114
|
+

|
|
115
|
+
|
|
116
|
+

|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Install for Your Agent
|
|
121
|
+
|
|
122
|
+
| Agent | Command |
|
|
123
|
+
|-------|---------|
|
|
124
|
+
| **Claude Code** | `npx thumbgate init --agent claude-code` |
|
|
125
|
+
| **Cursor** | `npx thumbgate init --agent cursor` |
|
|
126
|
+
| **Codex** | `npx thumbgate init --agent codex` |
|
|
127
|
+
| **Gemini CLI** | `npx thumbgate init --agent gemini` |
|
|
128
|
+
| **Amp** | `npx thumbgate init --agent amp` |
|
|
129
|
+
| **Claude Desktop** | [Download extension bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb) |
|
|
130
|
+
| **Any MCP agent** | `npx thumbgate serve` |
|
|
131
|
+
|
|
132
|
+
Works with **Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode**, and any MCP-compatible agent.
|
|
133
|
+
|
|
134
|
+
### Status bar proof
|
|
135
|
+
|
|
136
|
+

|
|
137
|
+
|
|
138
|
+

|
|
85
139
|
|
|
86
|
-
ThumbGate
|
|
140
|
+
Claude renders the live ThumbGate footer today. `npx thumbgate init --agent codex` now installs the full Codex hook bundle and writes the ThumbGate `statusLine` target into `~/.codex/config.json` so you can test it on your local Codex build immediately.
|
|
141
|
+
|
|
142
|
+
### Install Codex Plugin
|
|
143
|
+
|
|
144
|
+
Download the standalone Codex plugin bundle and follow the install guide:
|
|
145
|
+
|
|
146
|
+
1. Download: [thumbgate-codex-plugin.zip](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)
|
|
147
|
+
2. Follow: [plugins/codex-profile/INSTALL.md](plugins/codex-profile/INSTALL.md)
|
|
87
148
|
|
|
88
149
|
---
|
|
89
150
|
|
|
90
|
-
## How It Works
|
|
151
|
+
## How It Works
|
|
91
152
|
|
|
92
153
|
```
|
|
93
154
|
STEP 1 STEP 2 STEP 3
|
|
@@ -102,46 +163,75 @@ ThumbGate is the **Reliability Gateway** for AI coding agents — turning your f
|
|
|
102
163
|
agent action reinforced (or ✅ allowed)
|
|
103
164
|
```
|
|
104
165
|
|
|
105
|
-
|
|
166
|
+
No manual rule-writing. No config files. Your reactions teach the agent what your team actually wants.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
ThumbGate sells three concrete outcomes:
|
|
171
|
+
|
|
172
|
+
- **Prevent expensive AI mistakes** — catch bad commands, destructive database actions, unsafe publishes, and risky API calls before they run.
|
|
173
|
+
- **Make AI stop repeating mistakes** — fix it once, turn the lesson into a rule, and block the repeat before the next tool call lands.
|
|
174
|
+
- **Turn AI into a reliable operator** — move from a smart assistant that apologizes after damage to a production-ready operator with checkpoints, proof, and enforcement.
|
|
175
|
+
- **Measure prompts instead of rewriting them blindly** — use proof lanes, ThumbGate Bench, and `self-heal:check` to evaluate whether prompts and workflows actually improved behavior.
|
|
106
176
|
|
|
107
177
|
---
|
|
108
178
|
|
|
109
|
-
##
|
|
179
|
+
## Use Cases
|
|
180
|
+
|
|
181
|
+
- **Stop force-push to main** — Gate blocks `git push --force` on protected branches before it runs
|
|
182
|
+
- **Prevent repeated migration failures** — Each mistake becomes a searchable lesson that fires before the next attempt
|
|
183
|
+
- **Block unauthorized file edits** — Control which files agents can touch with path-based rules
|
|
184
|
+
- **Memory across sessions** — The agent remembers your feedback from yesterday
|
|
185
|
+
- **Shared team safety** — One developer's thumbs-down protects the whole team
|
|
186
|
+
- **Auto-improving without feedback** — Self-improvement mode evaluates outcomes and generates rules automatically
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Built-in Gates
|
|
110
191
|
|
|
111
192
|
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
Agent force-pushes again. │ ⛔ Gate blocks force-push.
|
|
120
|
-
It learned nothing. │ Agent uses safe push instead.
|
|
121
|
-
│
|
|
122
|
-
Session 3: │ Session 3+:
|
|
123
|
-
Same mistake. Again. │ Permanently fixed.
|
|
124
|
-
And again. │
|
|
193
|
+
⛔ force-push → blocks git push --force
|
|
194
|
+
⛔ protected-branch → blocks direct push to main
|
|
195
|
+
⛔ unresolved-threads → blocks push with open reviews
|
|
196
|
+
⛔ package-lock-reset → blocks destructive lock edits
|
|
197
|
+
⛔ env-file-edit → blocks .env secret exposure
|
|
198
|
+
|
|
199
|
+
+ custom gates in config/gates/custom.json
|
|
125
200
|
```
|
|
126
201
|
|
|
127
202
|
---
|
|
128
203
|
|
|
129
|
-
##
|
|
204
|
+
## CLI Reference
|
|
130
205
|
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
206
|
+
```bash
|
|
207
|
+
npx thumbgate init # detect agent, wire hooks
|
|
208
|
+
npx thumbgate doctor # health check
|
|
209
|
+
npx thumbgate capture # create a gate from text
|
|
210
|
+
npx thumbgate lessons # see what's been learned
|
|
211
|
+
npx thumbgate explore # terminal explorer for lessons, gates, stats
|
|
212
|
+
npx thumbgate dashboard # open local dashboard
|
|
213
|
+
npx thumbgate serve # start MCP server on stdio
|
|
214
|
+
npx thumbgate bench # run reliability benchmark
|
|
140
215
|
```
|
|
141
216
|
|
|
142
217
|
---
|
|
143
218
|
|
|
144
|
-
##
|
|
219
|
+
## Pricing
|
|
220
|
+
|
|
221
|
+
| | Free | Pro ($19/mo) | Team ($49/seat/mo) |
|
|
222
|
+
|---|---|---|---|
|
|
223
|
+
| Local CLI + enforced gates | ✅ | ✅ | ✅ |
|
|
224
|
+
| Feedback captures/day | 3 | Unlimited | Unlimited |
|
|
225
|
+
| Prevention rules | 1 | Unlimited | Unlimited |
|
|
226
|
+
| Agent connections | 1 | Unlimited | Unlimited |
|
|
227
|
+
| Personal dashboard | — | ✅ | ✅ |
|
|
228
|
+
| DPO export (model fine-tuning) | — | ✅ | ✅ |
|
|
229
|
+
| Team lesson export/import | — | ✅ | ✅ |
|
|
230
|
+
| Shared hosted lesson DB | — | — | ✅ |
|
|
231
|
+
| Org-wide dashboard | — | — | ✅ |
|
|
232
|
+
| Approval + audit proof | — | — | ✅ |
|
|
233
|
+
|
|
234
|
+
The free tier gives you 3 feedback captures, 1 rule, and 1 agent — enough to prove the enforcement loop works. Pro is $19/mo or $149/yr for unlimited everything plus a dashboard and history-aware lesson recall. Team is $49/seat/mo with shared hosted lesson DB, org dashboard, and shared enforcement. Pro and Team include open_feedback_session, append_feedback_context, and finalize_feedback_session for structured multi-turn feedback capture.
|
|
145
235
|
|
|
146
236
|
**Best first paid motion for teams:** the **Workflow Hardening Sprint** — qualify one repeated failure before committing to a full rollout. **[Start intake →](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=team_rollout#workflow-sprint-intake)**
|
|
147
237
|
|
|
@@ -149,223 +239,161 @@ Session 3: │ Session 3+:
|
|
|
149
239
|
|
|
150
240
|
**Paid path for individual operators:** [ThumbGate Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page) is the self-serve side lane for a personal dashboard and export-ready evidence.
|
|
151
241
|
|
|
152
|
-
**
|
|
242
|
+
**[Start free](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme)** · **[See Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme)** · **[Team Sprint intake](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme#workflow-sprint-intake)**
|
|
153
243
|
|
|
154
244
|
---
|
|
155
245
|
|
|
156
|
-
##
|
|
246
|
+
## Team Lesson Sharing (Pro + Team)
|
|
157
247
|
|
|
158
|
-
|
|
159
|
-
npx thumbgate init # detects your agent and wires everything up
|
|
160
|
-
npx thumbgate doctor # health check
|
|
161
|
-
npx thumbgate lessons # see what's been learned
|
|
162
|
-
npx thumbgate explore # terminal explorer for lessons, gates, and stats
|
|
163
|
-
npx thumbgate dashboard # open local dashboard
|
|
164
|
-
```
|
|
248
|
+
One team's hard-won lessons shouldn't stay trapped on one laptop. ThumbGate Pro and Team can export lessons as portable bundles and import them into any other ThumbGate instance — so a mistake caught by Team A becomes a prevention rule for Team B.
|
|
165
249
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
Works with **Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode**, and any MCP-compatible agent.
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## Install for Your Agent
|
|
250
|
+
**Export lessons from one project:**
|
|
173
251
|
|
|
174
|
-
### Claude Code
|
|
175
252
|
```bash
|
|
176
|
-
|
|
253
|
+
curl -X POST http://localhost:3456/v1/lessons/export \
|
|
254
|
+
-H "Authorization: Bearer $THUMBGATE_API_KEY" \
|
|
255
|
+
-H "Content-Type: application/json" \
|
|
256
|
+
-d '{"outputPath": "./lessons-export.json"}'
|
|
177
257
|
```
|
|
178
|
-
Wires hooks automatically. Works immediately.
|
|
179
258
|
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
npx thumbgate init --agent cursor
|
|
183
|
-
```
|
|
184
|
-
Installs as a Cursor extension with 4 skills: capture feedback, manage rules, search lessons, recall context.
|
|
185
|
-
|
|
186
|
-
### Codex
|
|
187
|
-
```bash
|
|
188
|
-
npx thumbgate init --agent codex
|
|
189
|
-
```
|
|
190
|
-
Bridges to Codex CLI with 6 skills including adversarial review and second-pass analysis.
|
|
259
|
+
Filter by signal or tags:
|
|
191
260
|
|
|
192
|
-
### Gemini CLI
|
|
193
261
|
```bash
|
|
194
|
-
|
|
262
|
+
curl -X POST http://localhost:3456/v1/lessons/export \
|
|
263
|
+
-H "Authorization: Bearer $THUMBGATE_API_KEY" \
|
|
264
|
+
-H "Content-Type: application/json" \
|
|
265
|
+
-d '{"signal": "down", "tags": ["push-notifications", "ci"]}'
|
|
195
266
|
```
|
|
196
267
|
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
npx thumbgate init --agent amp
|
|
200
|
-
```
|
|
268
|
+
**Import into another team's ThumbGate:**
|
|
201
269
|
|
|
202
|
-
### Any MCP-Compatible Agent
|
|
203
270
|
```bash
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
### Claude Desktop
|
|
209
|
-
Add to your `claude_desktop_config.json`:
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"mcpServers": {
|
|
213
|
-
"thumbgate": {
|
|
214
|
-
"command": "npx",
|
|
215
|
-
"args": ["--yes", "--package", "thumbgate", "thumbgate", "serve"]
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
271
|
+
curl -X POST http://localhost:3456/v1/lessons/import \
|
|
272
|
+
-H "Authorization: Bearer $THUMBGATE_API_KEY" \
|
|
273
|
+
-H "Content-Type: application/json" \
|
|
274
|
+
-d @lessons-export.json
|
|
219
275
|
```
|
|
220
|
-
Or [download the packaged extension bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb) and install directly.
|
|
221
276
|
|
|
222
|
-
|
|
277
|
+
What happens on import:
|
|
278
|
+
- **Deduplication** — lessons with the same ID or title+signal are skipped
|
|
279
|
+
- **Provenance tracking** — every imported lesson is tagged `team-import` with original source project, export timestamp, and original ID
|
|
280
|
+
- **No overwrite** — import is additive; existing lessons are never modified
|
|
223
281
|
|
|
224
|
-
|
|
282
|
+
The export bundle includes full lesson metadata: signal, title, context, tags, failure type, skill, structured rules, and diagnosis. It's the same data you see in the lesson detail dashboard — portable as JSON.
|
|
225
283
|
|
|
226
|
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
-
|
|
231
|
-
- **Auto-improving without feedback** — Self-improvement mode evaluates outcomes and generates rules automatically
|
|
284
|
+
**Use cases:**
|
|
285
|
+
- Share enforcement patterns across repos in the same org
|
|
286
|
+
- Onboard a new team with pre-built lessons from a mature project
|
|
287
|
+
- Export lessons before a project handoff so institutional knowledge transfers
|
|
288
|
+
- Feed lessons from multiple teams into a centralized DPO training pipeline
|
|
232
289
|
|
|
233
290
|
---
|
|
234
291
|
|
|
235
|
-
##
|
|
292
|
+
## DPO Export for Fine-Tuning (Pro + Team)
|
|
236
293
|
|
|
237
|
-
|
|
294
|
+
Every thumbs-up and thumbs-down becomes a training signal. ThumbGate Pro exports your captured feedback as DPO (Direct Preference Optimization) pairs — ready to feed into a LoRA fine-tune so your model stops repeating known mistakes at the weight level, not just the gate level.
|
|
238
295
|
|
|
296
|
+
**Export DPO pairs:**
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
curl -X POST http://localhost:3456/v1/dpo/export \
|
|
300
|
+
-H "Authorization: Bearer $THUMBGATE_API_KEY" \
|
|
301
|
+
-o dpo-pairs.jsonl
|
|
239
302
|
```
|
|
240
|
-
👎 thumbs down
|
|
241
|
-
└─► open_feedback_session
|
|
242
|
-
└─► "you lied about deployment" (append_feedback_context)
|
|
243
|
-
└─► "tests were actually failing" (append_feedback_context)
|
|
244
|
-
└─► finalize_feedback_session
|
|
245
|
-
└─► lesson inferred from full conversation
|
|
246
|
-
```
|
|
247
303
|
|
|
248
|
-
|
|
304
|
+
**What you get:** JSONL where each line is a preference pair:
|
|
305
|
+
- `chosen` — the agent action you thumbed up
|
|
306
|
+
- `rejected` — the action you thumbed down for the same task context
|
|
307
|
+
- `prompt` — the originating user intent
|
|
308
|
+
|
|
309
|
+
**Use cases:**
|
|
310
|
+
- Fine-tune Llama 3 / Mistral / local models with a LoRA adapter trained on your real mistakes
|
|
311
|
+
- Feed into RLAIF or KTO pipelines (KTO export also available via `/v1/kto/export`)
|
|
312
|
+
- Build a model that natively avoids your team's known failure patterns — no gate at inference time needed
|
|
249
313
|
|
|
250
|
-
|
|
314
|
+
**Why this matters:** Gates block mistakes. Fine-tuning prevents them from being attempted. Combine both for belt-and-suspenders governance.
|
|
251
315
|
|
|
252
316
|
---
|
|
253
317
|
|
|
254
|
-
##
|
|
318
|
+
## Tech Stack
|
|
255
319
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
```
|
|
320
|
+
| Layer | Technology |
|
|
321
|
+
|-------|-----------|
|
|
322
|
+
| **Storage** | SQLite + FTS5, LanceDB vectors, JSONL logs |
|
|
323
|
+
| **Capture** | 3 feedback capture/day (free), unlimited (Pro) |
|
|
324
|
+
| **Intelligence** | MemAlign dual recall, Thompson Sampling |
|
|
325
|
+
| **Enforcement** | PreToolUse hook engine, Gates config |
|
|
326
|
+
| **Interfaces** | MCP stdio, HTTP API, CLI (Node.js >=18) |
|
|
327
|
+
| **Billing** | Stripe |
|
|
328
|
+
| **Execution** | Railway, Cloudflare Workers, Docker Sandboxes |
|
|
329
|
+
| **Governance** | Workflow Sentinel, control plane, Docker Sandboxes |
|
|
330
|
+
|
|
331
|
+
Every Changeset is tied to the exact `main` merge commit and generates Verification Evidence for Release Confidence.
|
|
269
332
|
|
|
270
333
|
---
|
|
271
334
|
|
|
272
|
-
|
|
335
|
+
**Popular buyer questions:** **[Stop repeated AI agent mistakes](https://thumbgate-production.up.railway.app/guides/stop-repeated-ai-agent-mistakes?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Cursor guardrails](https://thumbgate-production.up.railway.app/guides/cursor-agent-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Codex CLI guardrails](https://thumbgate-production.up.railway.app/guides/codex-cli-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Gemini CLI memory + enforcement](https://thumbgate-production.up.railway.app/guides/gemini-cli-feedback-memory?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)**
|
|
273
336
|
|
|
274
|
-
|
|
275
|
-
┌──────────────────┬──────────────────────────────┬──────────────────────┐
|
|
276
|
-
│ FREE │ TEAM $99/seat/mo (min 3) │ PRO $19/mo · $149/yr│
|
|
277
|
-
├──────────────────┼──────────────────────────────┼──────────────────────┤
|
|
278
|
-
│ Local CLI │ Workflow Hardening Sprint │ Personal dashboard │
|
|
279
|
-
│ Enforced gates │ Shared hosted lesson DB │ Export feedback data │
|
|
280
|
-
│ 3 captures/day │ Org-wide dashboard │ Review-ready exports │
|
|
281
|
-
│ 5 searches/day │ Approval + audit proof │ │
|
|
282
|
-
│ Unlimited recall │ Isolated execution guidance │ │
|
|
283
|
-
└──────────────────┴──────────────────────────────┴──────────────────────┘
|
|
284
|
-
```
|
|
337
|
+
**[Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=top_cta)**
|
|
285
338
|
|
|
286
|
-
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Integrations
|
|
287
342
|
|
|
288
|
-
**
|
|
289
|
-
- **
|
|
290
|
-
- **
|
|
291
|
-
- **
|
|
343
|
+
- **[Open ThumbGate GPT](https://thumbgate-production.up.railway.app/go/gpt?utm_source=github&utm_medium=readme&utm_campaign=readme_gpt)** — ThumbGate GPT: start here. Paste agent actions, get advice + checkpointing. No, users do not have to keep chatting inside the ThumbGate GPT to use ThumbGate — the hard enforcement layer still runs where the work happens.
|
|
344
|
+
- **[Claude Desktop Extension](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb)** — One-click install for Claude Desktop
|
|
345
|
+
- **[Codex Plugin](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)** — Standalone bundle for Codex CLI
|
|
346
|
+
- **[Perplexity Command Center](docs/PERPLEXITY_MAX_COMMAND_CENTER.md)** — AI-search visibility + lead discovery
|
|
347
|
+
- **[ThumbGate Bench](docs/THUMBGATE_BENCH.md)** — Reliability benchmark for gate evaluation
|
|
348
|
+
- **[Manus AI Skill](skills/thumbgate/SKILL.md)** — ThumbGate integration for Manus AI agents
|
|
292
349
|
|
|
293
350
|
---
|
|
294
351
|
|
|
295
|
-
##
|
|
352
|
+
## Feedback Sessions
|
|
353
|
+
|
|
354
|
+
Give the agent more context when a thumbs-down isn't enough:
|
|
296
355
|
|
|
297
356
|
```
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
│ File-based context │ selection) │ Hook wiring │
|
|
305
|
-
│ │ │ │
|
|
306
|
-
│ │ │ │
|
|
307
|
-
├──────────────────────┼──────────────────────┼──────────────────────┤
|
|
308
|
-
│ INTERFACES │ BILLING │ EXECUTION │
|
|
309
|
-
│ │ │ │
|
|
310
|
-
│ MCP stdio │ Stripe │ Railway │
|
|
311
|
-
│ HTTP API │ │ Cloudflare Workers │
|
|
312
|
-
│ CLI │ │ Docker Sandboxes │
|
|
313
|
-
│ Node.js >=18 │ │ │
|
|
314
|
-
└──────────────────────┴──────────────────────┴──────────────────────┘
|
|
357
|
+
👎 thumbs down
|
|
358
|
+
└─► open_feedback_session
|
|
359
|
+
└─► "you lied about deployment" (append_feedback_context)
|
|
360
|
+
└─► "tests were actually failing" (append_feedback_context)
|
|
361
|
+
└─► finalize_feedback_session
|
|
362
|
+
└─► lesson inferred from full conversation
|
|
315
363
|
```
|
|
316
364
|
|
|
365
|
+
Free and self-hosted users can invoke `search_lessons` directly through MCP, and via the CLI with `npx thumbgate lessons`. History-aware feedback sessions give the agent full context for each lesson.
|
|
366
|
+
|
|
317
367
|
---
|
|
318
368
|
|
|
319
369
|
## FAQ
|
|
320
370
|
|
|
321
371
|
**Is ThumbGate a model fine-tuning tool?**
|
|
322
|
-
No. ThumbGate does not update model weights
|
|
372
|
+
No. ThumbGate does not update model weights. It captures feedback, stores lessons, injects context at runtime, and blocks bad actions before they execute.
|
|
323
373
|
|
|
324
374
|
**How is this different from CLAUDE.md or .cursorrules?**
|
|
325
375
|
Those are suggestions the agent can ignore. ThumbGate gates are enforced — they physically block the action before it runs. They also auto-generate from feedback instead of requiring manual writing.
|
|
326
376
|
|
|
327
377
|
**Does it work with my agent?**
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
**What's self-improvement mode?**
|
|
331
|
-
ThumbGate can watch for failure signals (test failures, reverted edits, error patterns) and auto-generate prevention rules — no thumbs-down required. Your agent gets smarter every session.
|
|
378
|
+
If it supports MCP or pre-action hooks, yes. Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, Amp, OpenCode all work out of the box.
|
|
332
379
|
|
|
333
380
|
**Is it free?**
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
---
|
|
337
|
-
|
|
338
|
-
## Enterprise Story
|
|
339
|
-
|
|
340
|
-
ThumbGate is the control plane for AI coding agents:
|
|
341
|
-
|
|
342
|
-
- Feedback becomes enforcement — repeated failures stop at the gate instead of reappearing in review.
|
|
343
|
-
- **Workflow Sentinel** scores blast radius before execution, so risky PR, release, and publish flows are visible early.
|
|
344
|
-
- High-risk local actions route into **Docker Sandboxes**; hosted team automations use a signed isolated sandbox lane.
|
|
345
|
-
- Team rollout stays tied to [Verification Evidence](docs/VERIFICATION_EVIDENCE.md) instead of trust-me operator claims.
|
|
346
|
-
|
|
347
|
-
## Release Confidence
|
|
348
|
-
|
|
349
|
-
- Every PR must carry a **Changeset** entry — each shipped version has a customer-readable explanation before publish.
|
|
350
|
-
- Version-sync checks keep `package.json`, `CHANGELOG.md`, plugin manifests, and installer metadata aligned.
|
|
351
|
-
- Final close-out requires verifying the exact `main` merge commit, with proof anchored in [Verification Evidence](docs/VERIFICATION_EVIDENCE.md).
|
|
352
|
-
|
|
353
|
-
See [Release Confidence](docs/RELEASE_CONFIDENCE.md) for the full trust chain.
|
|
381
|
+
The free tier gives you 3 captures/day, 1 rule, and 1 agent — enough to prove the enforcement loop works. Pro is $19/mo or $149/yr for unlimited everything plus a dashboard. Team is $49/seat/mo with shared hosted lesson DB, org dashboard, and shared enforcement.
|
|
354
382
|
|
|
355
383
|
---
|
|
356
384
|
|
|
357
385
|
## Docs
|
|
358
386
|
|
|
359
|
-
- [Commercial Truth](docs/COMMERCIAL_TRUTH.md) — pricing, claims, what we don't say
|
|
360
|
-
- [Changeset Strategy](docs/CHANGESET_STRATEGY.md) — how release notes and version bumps are enforced
|
|
361
387
|
- [First Dollar Playbook](docs/FIRST_DOLLAR_PLAYBOOK.md) — turning one painful workflow into the next booked pilot
|
|
362
|
-
- [
|
|
363
|
-
- [
|
|
388
|
+
- [Commercial Truth](docs/COMMERCIAL_TRUTH.md) — pricing, claims, what we don't say
|
|
389
|
+
- [Changeset Strategy](docs/CHANGESET_STRATEGY.md) — release notes and version bump enforcement
|
|
390
|
+
- [Release Confidence](docs/RELEASE_CONFIDENCE.md) — changesets, version checks, proof lanes
|
|
364
391
|
- [Verification Evidence](docs/VERIFICATION_EVIDENCE.md) — proof artifacts
|
|
365
|
-
- [
|
|
366
|
-
- [
|
|
367
|
-
|
|
368
|
-
|
|
392
|
+
- [Claude Desktop Extension Guide](docs/CLAUDE_DESKTOP_EXTENSION.md)
|
|
393
|
+
- [Agent Workflow Contract](WORKFLOW.md) — the agent-run contract for all ThumbGate operations
|
|
394
|
+
- [Ready for Agent Intake](https://github.com/IgorGanapolsky/ThumbGate/issues/new?template=ready-for-agent.yml) — ready-for-agent intake template
|
|
395
|
+
- [SEO Guide: Claude Code Guardrails](docs/learn/claude-code-guardrails.md)
|
|
396
|
+
- [Pro Overlay Repository](https://github.com/IgorGanapolsky/thumbgate-pro) — paid overlay code in the separate `thumbgate-pro` repo/package
|
|
369
397
|
|
|
370
398
|
---
|
|
371
399
|
|