thumbgate 1.27.19 → 1.28.0
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/commands/dashboard.md +15 -0
- package/.claude/commands/thumbgate-blocked.md +27 -0
- package/.claude/commands/thumbgate-dashboard.md +15 -0
- package/.claude/commands/thumbgate-doctor.md +30 -0
- package/.claude/commands/thumbgate-guard.md +36 -0
- package/.claude/commands/thumbgate-protect.md +30 -0
- package/.claude/commands/thumbgate-rules.md +30 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +63 -45
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/gcp/dfcx-webhook-gate.js +295 -0
- package/adapters/letta/README.md +41 -0
- package/adapters/letta/thumbgate-letta-adapter.js +133 -0
- package/adapters/mcp/server-stdio.js +1 -1
- package/adapters/opencode/opencode.json +1 -1
- package/adapters/policy-engine/ethicore-guardian-client.js +68 -0
- package/adapters/policy-engine/thumbgate-policy-engine-adapter.js +260 -0
- package/bench/observability-eval-suite.json +26 -0
- package/bin/cli.js +52 -9
- package/bin/dashboard-cli.js +7 -0
- package/bin/postinstall.js +14 -23
- package/commands/dashboard.md +15 -0
- package/commands/thumbgate-dashboard.md +15 -0
- package/config/entitlement-public-keys.json +6 -0
- package/config/gates/default.json +1 -1
- package/config/github-about.json +2 -2
- package/config/merge-quality-checks.json +3 -0
- package/package.json +233 -100
- package/public/about.html +159 -0
- package/public/agent-manager.html +179 -0
- package/public/agents-cost-savings.html +153 -0
- package/public/ai-malpractice-prevention.html +818 -0
- package/public/assets/brand/github-social-preview.png +0 -0
- package/public/assets/brand/thumbgate-icon-512.png +0 -0
- package/public/assets/brand/thumbgate-icon-pro-512.png +0 -0
- package/public/assets/brand/thumbgate-icon-team-512.png +0 -0
- package/public/assets/brand/thumbgate-logo-1200x360.png +0 -0
- package/public/assets/brand/thumbgate-logo-transparent.svg +28 -0
- package/public/assets/brand/thumbgate-mark-inline-v3.svg +18 -0
- package/public/assets/brand/thumbgate-mark-pro.svg +23 -0
- package/public/assets/brand/thumbgate-mark-team.svg +26 -0
- package/public/assets/brand/thumbgate-mark.svg +21 -0
- package/public/assets/brand/thumbgate-wordmark.svg +20 -0
- package/public/assets/claude-thumbgate-statusbar.svg +8 -0
- package/public/assets/codex-thumbgate-statusbar-test.svg +9 -0
- package/public/assets/legal-intake-control-flow.svg +66 -0
- package/public/blog.html +12 -9
- package/public/brand/thumbgate-mark.svg +19 -0
- package/public/brand/thumbgate-og.svg +16 -0
- package/public/chatgpt-app.html +330 -0
- package/public/codex-enterprise.html +123 -0
- package/public/codex-plugin.html +5 -5
- package/public/compare.html +10 -10
- package/public/dashboard.html +1 -1
- package/public/diagnostic.html +345 -0
- package/public/federal.html +2 -2
- package/public/guide.html +14 -14
- package/public/index.html +81 -70
- package/public/install.html +193 -0
- package/public/js/buyer-intent.js +672 -0
- package/public/learn.html +4 -17
- package/public/numbers.html +2 -2
- package/public/pricing.html +392 -0
- package/public/pro.html +2 -2
- package/scripts/action-receipts.js +324 -0
- package/scripts/activation-quickstart.js +187 -0
- package/scripts/agent-operations-planner.js +621 -0
- package/scripts/agent-reward-model.js +13 -0
- package/scripts/ai-component-inventory.js +367 -0
- package/scripts/async-eval-observability.js +236 -0
- package/scripts/audit.js +65 -0
- package/scripts/aws-blocks-guardrails.js +272 -0
- package/scripts/bayes-optimal-gate.js +6 -1
- package/scripts/classifier-routing.js +130 -0
- package/scripts/cli-feedback.js +17 -1
- package/scripts/commercial-offer.js +3 -3
- package/scripts/dashboard-chat.js +332 -0
- package/scripts/entitlement.js +250 -0
- package/scripts/export-databricks-bundle.js +5 -0
- package/scripts/export-dpo-pairs.js +6 -0
- package/scripts/export-hf-dataset.js +5 -0
- package/scripts/feedback-aggregate.js +281 -0
- package/scripts/feedback-sanitizer.js +105 -0
- package/scripts/gates-engine.js +15 -3
- package/scripts/hook-stop-anti-claim.js +301 -0
- package/scripts/imperative-detector.js +85 -0
- package/scripts/install-shim.js +87 -0
- package/scripts/intervention-policy.js +13 -0
- package/scripts/mcp-oauth.js +293 -0
- package/scripts/noop-detect.js +285 -0
- package/scripts/parallel-workflow-orchestrator.js +293 -0
- package/scripts/plan-gate.js +243 -0
- package/scripts/plausible-domain-config.js +99 -0
- package/scripts/pr-manager.js +9 -22
- package/scripts/pro-local-dashboard.js +198 -0
- package/scripts/qa-scenario-planner.js +136 -0
- package/scripts/repeat-metric.js +137 -0
- package/scripts/risk-scorer.js +6 -0
- package/scripts/secret-fixture-tokens.js +61 -0
- package/scripts/secret-redaction.js +166 -0
- package/scripts/self-harness-optimizer.js +141 -0
- package/scripts/self-healing-check.js +193 -0
- package/scripts/self-protection.js +90 -0
- package/scripts/seo-gsd.js +2 -2
- package/scripts/silent-failure-cluster.js +531 -0
- package/scripts/statusline-cache-read.js +57 -0
- package/scripts/sync-telemetry-from-prod.js +374 -0
- package/scripts/thompson-sampling.js +11 -2
- package/scripts/tool-contract-validator.js +76 -0
- package/scripts/trajectory-scorer.js +63 -0
- package/scripts/verify-marketing-pages-deployed.js +212 -0
- package/scripts/visitor-journey.js +172 -0
- package/src/api/server.js +81 -10
- package/.claude-plugin/marketplace.json +0 -85
- package/adapters/chatgpt/openapi.yaml +0 -1707
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dashboard
|
|
3
|
+
description: Open the local HTTP dashboard for the current project in your web browser.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Open Dashboard
|
|
7
|
+
|
|
8
|
+
Open the local HTTP dashboard for the current project in your web browser.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
Execute the following command in the project directory to open the browser dashboard scoped to the current repository:
|
|
12
|
+
```bash
|
|
13
|
+
thumbgate-dashboard
|
|
14
|
+
```
|
|
15
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thumbgate-blocked
|
|
3
|
+
description: Show what ThumbGate has actually blocked — gate enforcement stats and the full enforcement matrix. Use for "what has ThumbGate blocked", "show gate stats", "is enforcement working", "how many tokens did we save", "enforcement matrix".
|
|
4
|
+
allowed-tools: mcp__thumbgate__gate_stats, mcp__thumbgate__enforcement_matrix, Bash(npx thumbgate gate-stats:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ThumbGate Blocked
|
|
8
|
+
|
|
9
|
+
Show the enforcement record: how many risky actions were blocked vs warned, which gates fire most, and the full feedback → check → rejection pipeline.
|
|
10
|
+
|
|
11
|
+
This command wraps existing ThumbGate capability — **no new logic**. It reads the live enforcement counters.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Call the `gate_stats` MCP tool for the headline numbers: blocked count, warned count, and the top gates by hits. (CLI fallback: `npx thumbgate gate-stats`.)
|
|
16
|
+
2. Call the `enforcement_matrix` MCP tool for the full picture: feedback pipeline stats, active pre-action checks, and the rejection ledger with revival conditions.
|
|
17
|
+
3. Summarize for the user:
|
|
18
|
+
- Total blocks (each block = a repeat mistake stopped before it spent tokens or did damage).
|
|
19
|
+
- Most-triggered gates.
|
|
20
|
+
- Anything in the rejection ledger that is close to revival.
|
|
21
|
+
4. If counts are all zero, note that enforcement is wired but hasn't fired yet, and point to `/thumbgate-guard` to promote a rule.
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
/thumbgate-blocked
|
|
27
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thumbgate-dashboard
|
|
3
|
+
description: Open the local HTTP dashboard for the current project in your web browser.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Open Scoped ThumbGate Dashboard
|
|
7
|
+
|
|
8
|
+
Open the local HTTP dashboard for the current project in your web browser.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
Execute the following command in the project directory to open the browser dashboard:
|
|
12
|
+
```bash
|
|
13
|
+
thumbgate-dashboard
|
|
14
|
+
```
|
|
15
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thumbgate-doctor
|
|
3
|
+
description: Health-check the ThumbGate wiring for this project — hooks, MCP server, and agent-readiness — and report what's broken. Use for "is ThumbGate wired up", "thumbgate doctor", "check my guardrails are installed", "why aren't my gates firing", "agent readiness".
|
|
4
|
+
allowed-tools: Bash(npx thumbgate doctor:*), mcp__thumbgate__check_operational_integrity
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ThumbGate Doctor
|
|
8
|
+
|
|
9
|
+
Audit whether ThumbGate is actually wired into this agent: PreToolUse / SessionStart hooks installed, MCP server reachable, lesson store present, and overall agent-readiness — then tell the user exactly what to fix.
|
|
10
|
+
|
|
11
|
+
This command wraps existing ThumbGate capability — **no new logic**. It runs the existing doctor + integrity checks.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Run the existing wiring/health audit:
|
|
16
|
+
```bash
|
|
17
|
+
npx thumbgate doctor
|
|
18
|
+
```
|
|
19
|
+
(Add `--json` for a machine-readable report.) It exits non-zero when the project is not `ready`.
|
|
20
|
+
2. For deeper runtime state, call the `check_operational_integrity` MCP tool to verify the server-side enforcement path is live, not just the local config.
|
|
21
|
+
3. Summarize:
|
|
22
|
+
- ✅ what's wired (hooks, MCP, store, statusline).
|
|
23
|
+
- ❌ what's missing, with the exact fix command (usually `npx thumbgate init`).
|
|
24
|
+
4. If everything is green, say so plainly with the readiness status; if not, lead with the single highest-impact fix.
|
|
25
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/thumbgate-doctor
|
|
30
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thumbgate-guard
|
|
3
|
+
description: Turn the last agent mistake into a hard prevention rule the agent cannot bypass. Use after a bad tool call, a wrong action, or a thumbs-down — "guard against this", "block this from happening again", "never do that again", "promote this to a rule".
|
|
4
|
+
allowed-tools: mcp__thumbgate__capture_feedback, Bash(npx thumbgate force-gate:*), Bash(npx thumbgate quickstart:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ThumbGate Guard
|
|
8
|
+
|
|
9
|
+
Capture the mistake the agent just made and promote it into a Pre-Action Check (a `block` gate) so the same tool-call shape is intercepted before it runs again — in this and every future session, across Claude Code, Cursor, Codex, Gemini, Amp, and Cline.
|
|
10
|
+
|
|
11
|
+
This command wraps existing ThumbGate capability. It adds **no new logic** — it routes to the real capture + force-promote path.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Identify the specific bad action from the recent conversation (e.g. `git push --force origin main`, `DROP TABLE users`, deploy without tests). State it in one sentence.
|
|
16
|
+
2. Record the signal with the `capture_feedback` MCP tool:
|
|
17
|
+
- `signal: "down"`
|
|
18
|
+
- `context`: one sentence describing what went wrong
|
|
19
|
+
- `whatWentWrong`: the concrete failure
|
|
20
|
+
- `whatToChange`: the prevention action
|
|
21
|
+
- `tags`: the domain (e.g. `git`, `database`, `deploy`)
|
|
22
|
+
- If the user only gave a vague signal, pass the recent turns through `conversationWindow` / `chatHistory` for history-aware distillation instead of refusing.
|
|
23
|
+
3. Promote it to an enforced block gate using the existing force-promote path:
|
|
24
|
+
```bash
|
|
25
|
+
npx thumbgate force-gate "<one-sentence context of the mistake>"
|
|
26
|
+
```
|
|
27
|
+
This prints the new `gateId` and the total active gate count.
|
|
28
|
+
4. Show the user the promoted rule and confirm it is now enforced as a PreToolUse block.
|
|
29
|
+
|
|
30
|
+
> First rule of the project and want the guided walkthrough (capture → promote → watch it block once)? Run `npx thumbgate quickstart` instead.
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
/thumbgate-guard the agent force-pushed to main and overwrote a teammate's commit
|
|
36
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thumbgate-protect
|
|
3
|
+
description: Show this repo's branch/release governance and grant a scoped, time-limited approval for an action that touches protected files. Use for "protect this branch", "is main protected", "approve this protected change", "branch governance", "let me edit a protected file".
|
|
4
|
+
allowed-tools: mcp__thumbgate__get_branch_governance, mcp__thumbgate__approve_protected_action
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ThumbGate Protect
|
|
8
|
+
|
|
9
|
+
Inspect the protected-action posture for this project and, when the user explicitly approves, grant a scoped, expiring exception so a protected-file edit or publish can proceed under audit.
|
|
10
|
+
|
|
11
|
+
This command wraps existing ThumbGate capability — **no new logic**. It reads governance state and records a time-boxed approval.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Read the current posture with the `get_branch_governance` MCP tool: which branches are protected, release rules, and the protected-file globs in effect.
|
|
16
|
+
2. Report it plainly: what is protected, and what the agent is currently blocked from touching without approval.
|
|
17
|
+
3. **Only if the user explicitly asks to proceed**, grant a scoped approval with `approve_protected_action`:
|
|
18
|
+
- `pathGlobs`: the smallest set of protected globs the action needs.
|
|
19
|
+
- `reason`: why this is approved (one sentence).
|
|
20
|
+
- `evidence`: supporting note (tests passing, owner sign-off, etc.) when available.
|
|
21
|
+
- `ttlMs`: keep it short — default is 1 hour, never exceed what the task needs.
|
|
22
|
+
4. Confirm the approval id, covered globs, and expiry. Approvals are deliberately temporary and audited; re-run for the next task.
|
|
23
|
+
|
|
24
|
+
> This is for granting *narrow, temporary* exceptions, not for disabling protection. Never use it to bypass branch governance wholesale.
|
|
25
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/thumbgate-protect
|
|
30
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thumbgate-rules
|
|
3
|
+
description: List the active prevention rules and learned lessons guarding this project. Use to answer "what is ThumbGate protecting me from", "show my gates/rules", "what has the agent learned", "what's blocked here".
|
|
4
|
+
allowed-tools: mcp__thumbgate__prevention_rules, mcp__thumbgate__get_reliability_rules, mcp__thumbgate__search_lessons, Bash(npx thumbgate rules:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ThumbGate Rules
|
|
8
|
+
|
|
9
|
+
Show the guardrails currently in force for this project: the auto-promoted prevention rules, the reliability rules, and the promoted lessons behind them.
|
|
10
|
+
|
|
11
|
+
This command wraps existing ThumbGate capability — **no new logic**. It reads the live rule + lesson stores.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. List the active prevention rules with the `prevention_rules` MCP tool (or the CLI fallback `npx thumbgate rules`).
|
|
16
|
+
2. Pull the reliability rules with `get_reliability_rules` to show which tool-call shapes are gated.
|
|
17
|
+
3. For each rule, surface the lesson it came from with `search_lessons` so the user sees *why* the rule exists, not just *what* it blocks.
|
|
18
|
+
4. Present a compact table:
|
|
19
|
+
|
|
20
|
+
| Rule / Gate | Blocks | From lesson | State |
|
|
21
|
+
|-------------|--------|-------------|-------|
|
|
22
|
+
| … | … | … | active / archived |
|
|
23
|
+
|
|
24
|
+
5. If there are zero active rules, point the user to `/thumbgate-guard` to promote their first one.
|
|
25
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/thumbgate-rules
|
|
30
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
3
|
"description": "One 👎 becomes a hard rule the agent cannot bypass. Captures thumbs-down feedback, distills it into PreToolUse Pre-Action Checks, enforced across every future Claude Code session.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.28.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Igor Ganapolsky",
|
|
7
7
|
"email": "ig5973700@gmail.com",
|
package/README.md
CHANGED
|
@@ -6,17 +6,14 @@
|
|
|
6
6
|
</a>
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
> **⚡ LAUNCH PROMO: 50% off Pro for 3 months — use code `THUMB50`**
|
|
10
|
-
> [$9.50/mo instead of $19 →](https://buy.stripe.com/eVqeVd62o0aO19v7mb3sI3g) · Limited to first 50 customers
|
|
11
|
-
|
|
12
9
|
**AI coding agents repeat mistakes — and one wrong tool call can wipe a directory, leak a key, or push broken code.**
|
|
13
10
|
|
|
14
|
-
ThumbGate is the local-first
|
|
11
|
+
ThumbGate is the local-first Pre-Action Checks engine for AI coding agents. It runs in the PreToolUse hook on your machine: it flags the next tool call and logs every decision. It **hard-blocks the catastrophic classes by default** — secret exfiltration, destructive deletes (`rm -rf`), and supply-chain attacks — and hard-blocks **every** rule (force-push, off-scope edits, a bad `git push`, deploys) when you set `THUMBGATE_STRICT_ENFORCEMENT=1`; those classes warn-and-log by default. Works across Claude Code, Cursor, Codex, Gemini, Amp, Cline, and OpenCode. No server on the enforcement path. (Regulated-industry policy templates — legal intake, financial compliance, healthcare — are on the roadmap, built on the same engine.)
|
|
15
12
|
|
|
16
|
-
The product is a self-improving enforcement layer: thumbs-down feedback, prompt evaluation, and proof from prior runs become prevention rules that
|
|
13
|
+
The product is a self-improving enforcement layer: thumbs-down feedback, prompt evaluation, and proof from prior runs become prevention rules that flag or block repeated failures according to policy before the next tool call executes.
|
|
17
14
|
|
|
18
15
|
<p align="center">
|
|
19
|
-
<img src="docs/media/thumbgate-demo.gif" alt="ThumbGate
|
|
16
|
+
<img src="docs/media/thumbgate-demo.gif" alt="ThumbGate gating an AI agent's dangerous commands (rm -rf, force-push, chmod 777) in real time — hard-blocking destructive deletes, flagging the rest, while letting safe commands through" width="820" />
|
|
20
17
|
</p>
|
|
21
18
|
|
|
22
19
|
```
|
|
@@ -80,7 +77,7 @@ Each is a thin wrapper over an existing MCP tool or CLI command — **no new enf
|
|
|
80
77
|
|
|
81
78
|
## 🎬 90-second demo
|
|
82
79
|
|
|
83
|
-
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.
|
|
80
|
+
Watch the force-push scenario: agent tries to `git push --force`, one thumbs-down, next session it's flagged and logged — and hard-blocked when you run with `THUMBGATE_STRICT_ENFORCEMENT=1` — zero tokens spent on the repeat.
|
|
84
81
|
|
|
85
82
|
[**▶ Watch the 90-second demo**](https://thumbgate.ai/#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)
|
|
86
83
|
|
|
@@ -101,6 +98,16 @@ The buying question is simple: **what repeated AI mistake would be worth blockin
|
|
|
101
98
|
|
|
102
99
|
---
|
|
103
100
|
|
|
101
|
+
## Ideal customer
|
|
102
|
+
|
|
103
|
+
The first high-value customer is an enterprise engineering, security, or platform leader whose team already uses AI coding agents in high-blast-radius workflows: finance, healthcare, insurance, public sector, critical infrastructure, manufacturing, or any audited software-delivery environment.
|
|
104
|
+
|
|
105
|
+
The pain is security and operational risk; the buying context is enterprise AI-agent governance. ThumbGate owns the enforcement boundary: known-bad agent actions are flagged or blocked before shell, repo, CI/CD, SaaS, or cloud tool calls execute.
|
|
106
|
+
|
|
107
|
+
For partners building detection or coordination layers, ThumbGate is the downstream enforcement surface. Detection systems identify drift, stale shared reality, or risky workflow intent; ThumbGate turns the approved finding into a PreToolUse prevention rule with auditable execution evidence.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
104
111
|
## The Problem — the bill nobody talks about
|
|
105
112
|
|
|
106
113
|
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:
|
|
@@ -124,11 +131,11 @@ That's ~$0.21 in tokens just to fix the same mistake three times — multiplied
|
|
|
124
131
|
|
|
125
132
|
```
|
|
126
133
|
Session 1: Agent force-pushes to main. You 👎 it. +4,200 tokens
|
|
127
|
-
Session 2:
|
|
128
|
-
Session 3+:
|
|
134
|
+
Session 2: ⚠️ Gate flags the force-push. Zero round-trip. +0 tokens
|
|
135
|
+
Session 3+: Warned every time (hard-blocked under strict). +0 tokens
|
|
129
136
|
```
|
|
130
137
|
|
|
131
|
-
One thumbs-down. The PreToolUse hook
|
|
138
|
+
One thumbs-down. The PreToolUse hook catches the call **before** it reaches the model — no input tokens, no output tokens, no retry loop. Catastrophic classes (secret exfiltration, `rm -rf`, supply-chain) hard-block by default; the rest warn-and-log by default and hard-block under `THUMBGATE_STRICT_ENFORCEMENT=1`. The dashboard tracks **tokens saved this week** as a live counter so you can see exactly what your prevention rules are worth. Mark a review checkpoint once, and the dashboard narrows the next pass to only the feedback, lessons, and check blocks that landed since your last review.
|
|
132
139
|
|
|
133
140
|
ThumbGate doesn't make your agent smarter. It makes your agent *cheaper to be wrong with.*
|
|
134
141
|
|
|
@@ -153,7 +160,7 @@ Then point your agent at it — add `Read .thumbgate/BRAIN.md first` to your `CL
|
|
|
153
160
|
## Guardrails — do NOT repeat these (prevention rules)
|
|
154
161
|
- Never run DROP on production tables
|
|
155
162
|
## Active enforcement (gates)
|
|
156
|
-
- `DROP.*production` → block
|
|
163
|
+
- `DROP.*production` → warn + log (hard-block under strict enforcement)
|
|
157
164
|
```
|
|
158
165
|
|
|
159
166
|
Same idea the SEO world is now calling a *"client brain"* — persistent context that AI reads before doing the work — applied to **engineering**: the institutional memory that stops your coding agent from relearning the same lesson on your dime.
|
|
@@ -170,9 +177,9 @@ npx thumbgate capture down "Never run DROP on production tables"
|
|
|
170
177
|
That single command creates a prevention rule. Next time any AI agent tries to run `DROP` on production:
|
|
171
178
|
|
|
172
179
|
```
|
|
173
|
-
|
|
180
|
+
⚠️ Check fired: "Never run DROP on production tables"
|
|
174
181
|
Pattern: DROP.*production
|
|
175
|
-
Verdict: BLOCK
|
|
182
|
+
Verdict: WARN + LOG (BLOCK when THUMBGATE_STRICT_ENFORCEMENT=1)
|
|
176
183
|
```
|
|
177
184
|
|
|
178
185
|
---
|
|
@@ -196,14 +203,14 @@ Where retrieval is needed (an agent is about to run a destructive command not on
|
|
|
196
203
|
Rules stay in local ThumbGate runtime state.
|
|
197
204
|
|
|
198
205
|
### Layer 3: Pre-Action Interception
|
|
199
|
-
Before any agent action executes, ThumbGate's `PreToolUse` hook intercepts the command and evaluates it against all active checks. This happens
|
|
206
|
+
Before any agent action executes, ThumbGate's `PreToolUse` hook intercepts the command and evaluates it against all active checks. This happens in the hook path on every tool call, so no decision goes unlogged. Catastrophic classes hard-block by default; other rules warn-and-log by default and hard-block under `THUMBGATE_STRICT_ENFORCEMENT=1`.
|
|
200
207
|
|
|
201
|
-
### Layer 4: Multi-Agent Distribution (
|
|
208
|
+
### Layer 4: Multi-Agent Distribution (why not a hand-rolled hook?)
|
|
202
209
|
Claude Code already ships `permissions.deny` and `PreToolUse` hooks. Cursor and Codex have their own. So why ThumbGate over a hand-written hook?
|
|
203
210
|
|
|
204
211
|
Two things hand-written hooks structurally cannot do:
|
|
205
212
|
|
|
206
|
-
1. **Cross-agent propagation.** A `permissions.deny` pattern lives in one agent's config and stays there. ThumbGate's checks distribute across every connected agent over MCP stdio — thumbs-down once in Cursor, the same pattern blocks on Claude Code, Codex, Gemini CLI, Cline, OpenCode, Amp in the next session, no copy-paste between configs.
|
|
213
|
+
1. **Cross-agent propagation.** A `permissions.deny` pattern lives in one agent's config and stays there. ThumbGate's checks distribute across every connected agent over MCP stdio — thumbs-down once in Cursor, the same pattern fires (and hard-blocks under strict enforcement) on Claude Code, Codex, Gemini CLI, Cline, OpenCode, Amp in the next session, no copy-paste between configs.
|
|
207
214
|
2. **Learning loop.** A hand-written hook covers exactly the patterns you wrote. ThumbGate promotes every thumbs-down into a fresh rule, tunes existing rules' confidence weights from outcomes (Thompson Sampling, see Layer 2), and pulls semantically-near patterns into scope via local embeddings. The rule corpus sharpens without an operator hand-writing a regex for every new mistake shape.
|
|
208
215
|
|
|
209
216
|
Hand-rolled hooks are the right tool for a small, static denylist you maintain by hand. ThumbGate is the right tool when you want corrections from any agent to harden every agent automatically.
|
|
@@ -220,7 +227,8 @@ flowchart LR
|
|
|
220
227
|
B -- "exact match" --> D["Deterministic gate decision<br/>(no model, on-device)"]
|
|
221
228
|
B -- "no exact match, but<br/>semantically near a<br/>blocked pattern" --> C["Local CPU embeddings<br/>bge-small via LanceDB<br/>(no external API)"]
|
|
222
229
|
C --> D
|
|
223
|
-
D -- "
|
|
230
|
+
D -- "catastrophic class" --> E["⛔ Hard-block before execution"]
|
|
231
|
+
D -- "other known-bad" --> G["⚠️ Warn + log<br/>(hard-block under strict)"]
|
|
224
232
|
D -- "safe" --> F["✓ Allow"]
|
|
225
233
|
```
|
|
226
234
|
|
|
@@ -266,6 +274,7 @@ Each recommendation ships with the benchmark commands to run next: feedback-deri
|
|
|
266
274
|
| **Gemini CLI** | `npx thumbgate init --agent gemini` |
|
|
267
275
|
| **Amp** | `npx thumbgate init --agent amp` |
|
|
268
276
|
| **Cline** (Roo Code successor) | `npx thumbgate init --agent cline` |
|
|
277
|
+
| **OpenCode** | `npx thumbgate init --agent opencode` |
|
|
269
278
|
| **Claude Desktop** | [Download extension bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb) |
|
|
270
279
|
| **Any MCP agent** | `npx thumbgate serve` |
|
|
271
280
|
|
|
@@ -322,8 +331,10 @@ ChatGPT is the advice, checkpointing, and typed-feedback surface; ThumbGate's ha
|
|
|
322
331
|
👎 on a bad ──► Feedback becomes ──► Next time the
|
|
323
332
|
agent action a saved lesson agent tries the
|
|
324
333
|
and a block rule same thing:
|
|
325
|
-
👍 on a good ──► Good pattern gets
|
|
326
|
-
agent action reinforced
|
|
334
|
+
👍 on a good ──► Good pattern gets 🚦 flagged + logged
|
|
335
|
+
agent action reinforced (hard-blocked for
|
|
336
|
+
catastrophic classes /
|
|
337
|
+
strict mode, or ✅ allowed)
|
|
327
338
|
```
|
|
328
339
|
|
|
329
340
|
No manual rule-writing. No config files. Your reactions teach the agent what your team actually wants.
|
|
@@ -333,7 +344,7 @@ No manual rule-writing. No config files. Your reactions teach the agent what you
|
|
|
333
344
|
ThumbGate sells three concrete outcomes:
|
|
334
345
|
|
|
335
346
|
- **Prevent expensive AI mistakes** — catch bad commands, destructive database actions, unsafe publishes, and risky API calls before they run.
|
|
336
|
-
- **Make AI stop repeating mistakes** — fix it once, turn the lesson into a rule, and
|
|
347
|
+
- **Make AI stop repeating mistakes** — fix it once, turn the lesson into a rule, and catch the repeat before the next tool call lands (warn-and-log by default, hard-block for catastrophic classes or under strict enforcement).
|
|
337
348
|
- **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.
|
|
338
349
|
- **Measure prompts instead of rewriting them blindly** — use `thumbgate eval --from-feedback`, proof lanes, ThumbGate Bench, and `self-heal:check` to evaluate whether prompts and workflows actually improved behavior.
|
|
339
350
|
|
|
@@ -342,31 +353,38 @@ ThumbGate sells three concrete outcomes:
|
|
|
342
353
|
## Use Cases
|
|
343
354
|
|
|
344
355
|
### Developer Workflows
|
|
345
|
-
- **
|
|
356
|
+
- **Catch force-push to main** — Check flags `git push --force` on protected branches before it runs, and hard-blocks it under `THUMBGATE_STRICT_ENFORCEMENT=1`
|
|
346
357
|
- **Prevent repeated migration failures** — Each mistake becomes a searchable lesson that fires before the next attempt
|
|
347
358
|
- **Block unauthorized file edits** — Control which files agents can touch with path-based rules
|
|
348
359
|
- **Memory across sessions** — The agent remembers your feedback from yesterday
|
|
349
360
|
- **Shared team safety** — One developer's thumbs-down protects the whole team
|
|
350
361
|
- **Auto-improving without feedback** — Self-improvement mode evaluates outcomes and generates rules automatically
|
|
351
362
|
|
|
352
|
-
### Enterprise & Regulated Industries
|
|
353
|
-
|
|
354
|
-
-
|
|
355
|
-
- **Healthcare** — Prevent AI agents from providing medical diagnoses, enforce HIPAA-compliant data routing, require clinician review before patient-facing content
|
|
356
|
-
- **Audit trail** — Every gate decision (block, allow, reroute) is preserved with rule version, timestamp, and reviewer path for compliance review
|
|
363
|
+
### Enterprise & Regulated Industries (roadmap / templates)
|
|
364
|
+
|
|
365
|
+
These are policy-template directions on the roadmap, available on request — not yet exercised by a paying customer. They build on the same gate engine:
|
|
357
366
|
|
|
358
|
-
|
|
367
|
+
- **Legal AI intake governance** — templates targeting unauthorized practice of law (ABA Rule 5.5), conflict-of-interest clearance before fact collection (Rules 1.7/1.9/1.10), and keeping privileged content inside firm boundaries (Rule 1.6)
|
|
368
|
+
- **Financial compliance** — gate templates for AI-generated trade recommendations, unauthorized disclosures, and approval chains before customer-facing outputs
|
|
369
|
+
- **Healthcare** — templates to keep AI agents from providing medical diagnoses, route data along HIPAA-compliant paths, and require clinician review before patient-facing content
|
|
370
|
+
- **Audit trail** — every gate decision (block, warn, allow, reroute) is preserved with rule version, timestamp, and reviewer path for compliance review
|
|
371
|
+
|
|
372
|
+
[Talk to us about regulated templates →](https://thumbgate.ai/dashboard)
|
|
359
373
|
|
|
360
374
|
---
|
|
361
375
|
|
|
362
376
|
## Built-in Checks
|
|
363
377
|
|
|
364
378
|
```
|
|
365
|
-
⛔
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
379
|
+
⛔ env-file-edit → hard-blocks .env secret exposure (default)
|
|
380
|
+
⚠️ force-push → flags git push --force (hard-block under strict)
|
|
381
|
+
⚠️ protected-branch → flags direct push to main (hard-block under strict)
|
|
382
|
+
⚠️ unresolved-threads → flags push with open reviews (hard-block under strict)
|
|
383
|
+
⚠️ package-lock-reset → flags destructive lock edits (hard-block under strict)
|
|
384
|
+
|
|
385
|
+
Every check fires and logs on every match. Catastrophic classes (secret
|
|
386
|
+
exfiltration, rm -rf, supply-chain) hard-block by default; the rest warn-and-log
|
|
387
|
+
by default and hard-block under THUMBGATE_STRICT_ENFORCEMENT=1.
|
|
370
388
|
|
|
371
389
|
+ custom prevention rules for project-specific failures
|
|
372
390
|
```
|
|
@@ -438,14 +456,14 @@ If you change MCP or hook settings, restart the affected agent session so Claude
|
|
|
438
456
|
| Shared hosted lesson DB | — | — | ✅ |
|
|
439
457
|
| Org-wide dashboard | — | — | ✅ |
|
|
440
458
|
| Approval + audit proof | — | — | ✅ |
|
|
441
|
-
| Regulatory gate templates | — | — |
|
|
442
|
-
| Custom policy layers (firm/practice-area) | — | — |
|
|
443
|
-
| Compliance audit export | — | — |
|
|
459
|
+
| Regulatory gate templates (roadmap / on request) | — | — | 🛣️ |
|
|
460
|
+
| Custom policy layers (firm/practice-area, roadmap) | — | — | 🛣️ |
|
|
461
|
+
| Compliance audit export (roadmap) | — | — | 🛣️ |
|
|
444
462
|
| Dedicated onboarding + SLA | — | — | ✅ |
|
|
445
463
|
|
|
446
464
|
The free tier gives you 2 feedback captures/day (10 total) and up to 3 active auto-promoted prevention rules — enough to make ThumbGate part of your daily flow before you upgrade. MCP integrations for all agents (Claude Code, Cursor, Codex, Gemini, Amp, Cline, OpenCode) ship free.
|
|
447
465
|
|
|
448
|
-
Pro ($19/mo or $149/yr) removes the rule cap and adds history-aware lesson recall, lesson search, DPO export, and a personal dashboard. Enterprise (custom pricing, scoped after intake) adds a shared hosted lesson DB, org dashboard, and shared enforcement across the org, plus
|
|
466
|
+
Pro ($19/mo or $149/yr) removes the rule cap and adds history-aware lesson recall, lesson search, DPO export, and a personal dashboard. Enterprise (custom pricing, scoped after intake) adds a shared hosted lesson DB, org dashboard, and shared enforcement across the org, plus dedicated onboarding with SLA. Regulatory gate templates (legal intake, financial compliance, healthcare), custom policy layers scoped to firm/practice-area, and compliance audit export are on the roadmap, available on request — not yet exercised by a paying customer.
|
|
449
467
|
|
|
450
468
|
**Best first paid motion for teams:** the **Workflow Hardening Sprint** — qualify one repeated failure before committing to a full rollout. **[Start intake →](https://thumbgate.ai/?utm_source=github&utm_medium=readme&utm_campaign=team_rollout#workflow-sprint-intake)**
|
|
451
469
|
|
|
@@ -603,20 +621,20 @@ npx thumbgate setup-vertex
|
|
|
603
621
|
|
|
604
622
|
This command does **not** create or verify a live Dialogflow CX agent. Dialogflow is only relevant when a customer wants ThumbGate guard adapters in front of their own production DFCX agents. On current Google Cloud CLI installs, the old alpha gcloud CX command group is not available; verify Conversational Agents / Dialogflow CX with the Google Cloud console or the official Dialogflow CX REST API (`projects.locations.agents`) before claiming a live DFCX deployment.
|
|
605
623
|
|
|
606
|
-
###
|
|
607
|
-
Google Cloud budget alerts are "alert-only" and do not stop API traffic, risking unexpected bill shock. ThumbGate
|
|
608
|
-
* **
|
|
609
|
-
* **
|
|
624
|
+
### Cost Containment ($10/mo Cap — roadmap)
|
|
625
|
+
Google Cloud budget alerts are "alert-only" and do not stop API traffic, risking unexpected bill shock. ThumbGate's design addresses this on the client side (no paying customer has exercised it yet):
|
|
626
|
+
* **Local token ledger:** ThumbGate maintains a lightweight, local token ledger intended to halt outgoing API traffic as monthly token spend approaches a configurable cap (e.g. **$10**, ~500k tokens of Gemini 1.5 Flash).
|
|
627
|
+
* **No extra shutdown plumbing:** the local ThumbGate-side stop condition needs no Pub/Sub or Cloud Functions. You still need normal Google Cloud billing/API setup and live-agent verification for DFCX pilots.
|
|
610
628
|
|
|
611
629
|
---
|
|
612
630
|
|
|
613
631
|
## FAQ
|
|
614
632
|
|
|
615
633
|
**Is ThumbGate a model fine-tuning tool?**
|
|
616
|
-
No. ThumbGate does not update model weights. It captures feedback, stores lessons, injects context at runtime, and
|
|
634
|
+
No. ThumbGate does not update model weights. It captures feedback, stores lessons, injects context at runtime, and flags bad actions before they execute — hard-blocking the catastrophic classes by default and every rule under strict enforcement.
|
|
617
635
|
|
|
618
636
|
**How is this different from CLAUDE.md or .cursorrules?**
|
|
619
|
-
Those are suggestions the agent can ignore. ThumbGate checks are enforced — they
|
|
637
|
+
Those are suggestions the agent can ignore. ThumbGate checks are enforced at the hook path — they fire and log on every match, hard-block the catastrophic classes by default (and every rule under `THUMBGATE_STRICT_ENFORCEMENT=1`), and warn-and-log the rest. They also auto-generate from feedback instead of requiring manual writing.
|
|
620
638
|
|
|
621
639
|
**Does it work with my agent?**
|
|
622
640
|
If it supports MCP or pre-action hooks, yes. Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, Amp, Cline, OpenCode all work out of the box.
|
|
@@ -630,7 +648,7 @@ Pro ($19/mo or $149/yr) removes the rule cap and adds history-aware lesson recal
|
|
|
630
648
|
|
|
631
649
|
## Docs
|
|
632
650
|
|
|
633
|
-
- [**ThumbGate for Federal Agencies**](docs/FEDERAL.md) — pilot-ready posture, NIST 800-53 control mapping, OMB M-24-10 / EO 14110 alignment
|
|
651
|
+
- [**ThumbGate for Federal Agencies**](docs/FEDERAL.md) — pilot-ready posture, NIST 800-53 control mapping, OMB M-24-10 / EO 14110 alignment. Landing page: [thumbgate.ai/federal](https://thumbgate.ai/federal).
|
|
634
652
|
- [First Dollar Playbook](docs/FIRST_DOLLAR_PLAYBOOK.md) — turning one painful workflow into the next booked pilot
|
|
635
653
|
- [Commercial Truth](docs/COMMERCIAL_TRUTH.md) — pricing, claims, what we don't say
|
|
636
654
|
- [Goal Contracts](docs/GOAL_CONTRACTS.md) — evidence-before-done contracts for multi-agent handoffs
|
|
@@ -642,7 +660,7 @@ Pro ($19/mo or $149/yr) removes the rule cap and adds history-aware lesson recal
|
|
|
642
660
|
- [Ready for Agent Intake](https://github.com/IgorGanapolsky/ThumbGate/issues/new?template=ready-for-agent.yml) — ready-for-agent intake template
|
|
643
661
|
- [SEO Guide: Claude Code Guardrails](docs/learn/claude-code-guardrails.md)
|
|
644
662
|
- [Unsupervised Learning Signals](docs/UL.md) — silent-failure clustering (**on by default** as of 2026-05-21; opt out via `THUMBGATE_SILENT_FAILURE_CLUSTERING=0`; only meaningfully active on workspaces with ≥ 50 tool calls/day)
|
|
645
|
-
- [ThumbGate-Core](https://github.com/IgorGanapolsky/ThumbGate-Core) —
|
|
663
|
+
- [ThumbGate-Core](https://github.com/IgorGanapolsky/ThumbGate-Core) — staging repo for pre-release features plus a handful of internal cache scripts that can't ship publicly. It is **not** the moat: intelligence, ranking, and synthesis land in this public repo by default (~212 of 216 Core scripts already ship publicly). The moat is hosted services + adapter compatibility + dashboard + support — see [MOAT.md](MOAT.md).
|
|
646
664
|
|
|
647
665
|
---
|
|
648
666
|
|
|
@@ -665,7 +683,7 @@ ThumbGate is free and MIT-licensed forever. For teams that need more:
|
|
|
665
683
|
|
|
666
684
|
I'm **Igor Ganapolsky** — I designed and maintain ThumbGate. If you're shipping **payments, AI agents, or Android features** and want them built by someone demonstrably careful with production and with money, I take a small number of **freelance / contract** engagements.
|
|
667
685
|
|
|
668
|
-
ThumbGate is the receipt, not the pitch: it
|
|
686
|
+
ThumbGate is the receipt, not the pitch: it hard-blocks the catastrophic classes by default (and every rule under strict enforcement), logs every decision, and publishes a [threat model](THREAT_MODEL.md) stating exactly what it enforces and what it can't contain. Documenting where my own guardrails end is the standard I hold client work to.
|
|
669
687
|
|
|
670
688
|
- **Payments** — Stripe / Stripe Connect: destination charges, split payouts, escrow & milestone release, 3DS/SCA, idempotent webhooks, reconciliation.
|
|
671
689
|
- **Applied AI / agents** — tool-use guardrails, MCP servers, orchestration, and evaluation loops (the engineering behind this repo).
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"thumbgate": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--yes", "--package", "thumbgate@1.
|
|
5
|
+
"args": ["--yes", "--package", "thumbgate@1.28.0", "thumbgate", "serve"]
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
9
|
"preToolUse": {
|
|
10
10
|
"command": "npx",
|
|
11
|
-
"args": ["--yes", "--package", "thumbgate@1.
|
|
11
|
+
"args": ["--yes", "--package", "thumbgate@1.28.0", "thumbgate", "gate-check"]
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|