thumbgate 1.14.1 → 1.16.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-plugin/marketplace.json +6 -6
- package/.claude-plugin/plugin.json +3 -3
- package/.well-known/llms.txt +5 -5
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +60 -35
- package/adapters/chatgpt/openapi.yaml +118 -2
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/mcp/server-stdio.js +217 -84
- package/adapters/opencode/opencode.json +1 -1
- package/bench/prompt-eval-suite.json +5 -1
- package/bin/cli.js +211 -8
- package/config/enforcement.json +59 -7
- package/config/evals/agent-safety-eval.json +338 -22
- package/config/gates/default.json +33 -0
- package/config/gates/routine.json +43 -0
- package/config/github-about.json +3 -3
- package/config/mcp-allowlists.json +4 -0
- package/config/merge-quality-checks.json +2 -1
- package/config/model-candidates.json +131 -0
- package/openapi/openapi.yaml +118 -2
- package/package.json +70 -51
- package/public/blog.html +7 -7
- package/public/codex-plugin.html +13 -7
- package/public/compare.html +29 -23
- package/public/dashboard.html +105 -12
- package/public/guide.html +28 -28
- package/public/index.html +233 -97
- package/public/learn.html +87 -20
- package/public/lessons.html +26 -2
- package/public/numbers.html +271 -0
- package/public/pro.html +89 -19
- package/scripts/agent-audit-trace.js +55 -0
- package/scripts/agent-memory-lifecycle.js +96 -0
- package/scripts/agent-readiness-plan.js +118 -0
- package/scripts/agentic-data-pipeline.js +21 -1
- package/scripts/agents-sdk-sandbox-plan.js +57 -0
- package/scripts/ai-org-governance.js +98 -0
- package/scripts/ai-search-distribution.js +43 -0
- package/scripts/artifact-agent-plan.js +81 -0
- package/scripts/billing.js +27 -8
- package/scripts/cli-feedback.js +2 -1
- package/scripts/cli-schema.js +60 -5
- package/scripts/code-mode-mcp-plan.js +71 -0
- package/scripts/commercial-offer.js +1 -1
- package/scripts/context-engine.js +1 -2
- package/scripts/context-manager.js +4 -1
- package/scripts/contextfs.js +214 -32
- package/scripts/dashboard-render-spec.js +1 -1
- package/scripts/dashboard.js +275 -9
- package/scripts/decision-journal.js +13 -3
- package/scripts/document-workflow-governance.js +62 -0
- package/scripts/enterprise-agent-rollout.js +34 -0
- package/scripts/experience-replay-governance.js +69 -0
- package/scripts/export-hf-dataset.js +1 -1
- package/scripts/feedback-loop.js +141 -9
- package/scripts/feedback-to-rules.js +17 -23
- package/scripts/gates-engine.js +4 -6
- package/scripts/growth-campaigns.js +49 -0
- package/scripts/harness-selector.js +145 -1
- package/scripts/hybrid-supervisor-agent.js +64 -0
- package/scripts/inference-cache-policy.js +72 -0
- package/scripts/inference-economics.js +53 -0
- package/scripts/internal-agent-bootstrap.js +12 -2
- package/scripts/knowledge-layer-plan.js +108 -0
- package/scripts/lesson-canonical.js +181 -0
- package/scripts/lesson-db.js +71 -10
- package/scripts/lesson-inference.js +183 -44
- package/scripts/lesson-search.js +4 -1
- package/scripts/lesson-synthesis.js +23 -2
- package/scripts/llm-client.js +157 -26
- package/scripts/mailer/resend-mailer.js +112 -1
- package/scripts/mcp-transport-strategy.js +66 -0
- package/scripts/memory-store-governance.js +60 -0
- package/scripts/meta-agent-loop.js +7 -13
- package/scripts/model-access-eligibility.js +38 -0
- package/scripts/model-migration-readiness.js +55 -0
- package/scripts/native-messaging-audit.js +514 -0
- package/scripts/operational-integrity.js +96 -3
- package/scripts/otel-declarative-config.js +56 -0
- package/scripts/perplexity-client.js +1 -1
- package/scripts/post-training-governance.js +34 -0
- package/scripts/pr-manager.js +47 -7
- package/scripts/private-core-boundary.js +72 -0
- package/scripts/production-agent-readiness.js +40 -0
- package/scripts/profile-router.js +16 -1
- package/scripts/prompt-eval.js +564 -32
- package/scripts/prompt-programs.js +93 -0
- package/scripts/provider-action-normalizer.js +585 -0
- package/scripts/rule-validator.js +285 -0
- package/scripts/scaling-law-claims.js +60 -0
- package/scripts/security-scanner.js +1 -1
- package/scripts/self-distill-agent.js +7 -32
- package/scripts/seo-gsd.js +400 -43
- package/scripts/skill-rag-router.js +53 -0
- package/scripts/spec-gate.js +1 -1
- package/scripts/student-consistent-training.js +73 -0
- package/scripts/synthetic-data-provenance.js +98 -0
- package/scripts/task-context-result.js +81 -0
- package/scripts/telemetry-analytics.js +149 -0
- package/scripts/thompson-sampling.js +2 -2
- package/scripts/token-savings.js +7 -6
- package/scripts/token-tco.js +46 -0
- package/scripts/tool-registry.js +75 -3
- package/scripts/verification-loop.js +10 -1
- package/scripts/verifier-scoring.js +71 -0
- package/scripts/workflow-sentinel.js +284 -28
- package/scripts/workspace-agent-routines.js +118 -0
- package/skills/thumbgate/SKILL.md +1 -1
- package/src/api/server.js +434 -120
- package/.claude-plugin/README.md +0 -170
- package/adapters/README.md +0 -12
- package/scripts/analytics-report.js +0 -328
- package/scripts/autonomous-workflow.js +0 -377
- package/scripts/billing-setup.js +0 -109
- package/scripts/creator-campaigns.js +0 -239
- package/scripts/cross-encoder-reranker.js +0 -235
- package/scripts/daemon-manager.js +0 -108
- package/scripts/decision-trace.js +0 -354
- package/scripts/delegation-runtime.js +0 -896
- package/scripts/dispatch-brief.js +0 -159
- package/scripts/distribution-surfaces.js +0 -110
- package/scripts/feedback-history-distiller.js +0 -382
- package/scripts/funnel-analytics.js +0 -35
- package/scripts/history-distiller.js +0 -200
- package/scripts/hosted-job-launcher.js +0 -256
- package/scripts/intent-router.js +0 -392
- package/scripts/lesson-reranker.js +0 -263
- package/scripts/lesson-retrieval.js +0 -148
- package/scripts/managed-lesson-agent.js +0 -183
- package/scripts/operational-dashboard.js +0 -103
- package/scripts/operational-summary.js +0 -129
- package/scripts/operator-artifacts.js +0 -608
- package/scripts/optimize-context.js +0 -17
- package/scripts/org-dashboard.js +0 -206
- package/scripts/partner-orchestration.js +0 -146
- package/scripts/predictive-insights.js +0 -356
- package/scripts/pulse.js +0 -80
- package/scripts/reflector-agent.js +0 -221
- package/scripts/sales-pipeline.js +0 -681
- package/scripts/session-episode-store.js +0 -329
- package/scripts/session-health-sensor.js +0 -242
- package/scripts/session-report.js +0 -120
- package/scripts/swarm-coordinator.js +0 -81
- package/scripts/tool-kpi-tracker.js +0 -12
- package/scripts/webhook-delivery.js +0 -62
- package/scripts/workflow-sprint-intake.js +0 -475
- package/skills/agent-memory/SKILL.md +0 -97
- package/skills/solve-architecture-autonomy/SKILL.md +0 -17
- package/skills/solve-architecture-autonomy/tool.js +0 -33
- package/skills/thumbgate-feedback/SKILL.md +0 -49
package/public/compare.html
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Best Pre-Action
|
|
6
|
+
<title>Best Pre-Action Check Tools for AI Coding Agents (2026 Comparison)</title>
|
|
7
7
|
<!-- Privacy-friendly analytics by Plausible -->
|
|
8
8
|
<script defer data-domain="thumbgate-production.up.railway.app" src="https://plausible.io/js/script.js"></script>
|
|
9
|
-
<meta name="description" content="Compare pre-action
|
|
10
|
-
<meta name="keywords" content="AI agent safety, pre-action
|
|
11
|
-
<meta property="og:title" content="Best Pre-Action
|
|
12
|
-
<meta property="og:description" content="Compare pre-action
|
|
9
|
+
<meta name="description" content="Compare pre-action check tools that prevent AI coding agents from making costly mistakes. ThumbGate vs manual review vs post-hoc fixes.">
|
|
10
|
+
<meta name="keywords" content="AI agent safety, pre-action checks, AI coding agent comparison, ThumbGate vs manual review, AI agent guardrails, PreToolUse hooks, Claude Code safety, Codex safety, Gemini safety, Cursor rules alternative">
|
|
11
|
+
<meta property="og:title" content="Best Pre-Action Check Tools for AI Coding Agents (2026 Comparison)">
|
|
12
|
+
<meta property="og:description" content="Compare pre-action check tools that prevent AI coding agents from making costly mistakes. ThumbGate vs manual review vs post-hoc fixes.">
|
|
13
13
|
<meta property="og:type" content="article">
|
|
14
14
|
<meta property="og:url" content="https://thumbgate-production.up.railway.app/compare">
|
|
15
15
|
<link rel="canonical" href="https://thumbgate-production.up.railway.app/compare">
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
{
|
|
19
19
|
"@context": "https://schema.org",
|
|
20
20
|
"@type": "TechArticle",
|
|
21
|
-
"headline": "Best Pre-Action
|
|
22
|
-
"description": "Compare pre-action
|
|
21
|
+
"headline": "Best Pre-Action Check Tools for AI Coding Agents (2026 Comparison)",
|
|
22
|
+
"description": "Compare pre-action check tools that prevent AI coding agents from making costly mistakes. ThumbGate vs manual review vs post-hoc fixes vs Cursor rules vs linters.",
|
|
23
23
|
"author": {
|
|
24
24
|
"@type": "Person",
|
|
25
25
|
"name": "Igor Ganapolsky",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"mainEntity": [
|
|
44
44
|
{
|
|
45
45
|
"@type": "Question",
|
|
46
|
-
"name": "What is a pre-action
|
|
46
|
+
"name": "What is a pre-action check for AI coding agents?",
|
|
47
47
|
"acceptedAnswer": {
|
|
48
48
|
"@type": "Answer",
|
|
49
|
-
"text": "A pre-action
|
|
49
|
+
"text": "A pre-action check is an enforcement layer that intercepts AI agent tool calls before they execute. Unlike prompt rules that agents can ignore, pre-action checks physically block dangerous actions such as force-pushing to main, deleting production files, or committing code with failing tests. ThumbGate implements pre-action checks via PreToolUse hooks that fire before every tool call."
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"name": "Does ThumbGate work with Claude Code?",
|
|
55
55
|
"acceptedAnswer": {
|
|
56
56
|
"@type": "Answer",
|
|
57
|
-
"text": "Yes. ThumbGate works with Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode, and any MCP-compatible agent. Run npx thumbgate init --agent claude-code to auto-configure PreToolUse hooks in your .claude/settings.json."
|
|
57
|
+
"text": "Yes. ThumbGate works with Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, OpenCode, and any MCP-compatible agent. Run npx thumbgate init --agent claude-code to auto-configure PreToolUse hooks in your .claude/settings.json."
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"name": "Can ThumbGate learn from mistakes automatically?",
|
|
79
79
|
"acceptedAnswer": {
|
|
80
80
|
"@type": "Answer",
|
|
81
|
-
"text": "Yes. When your AI agent makes a mistake, you give a thumbs-down with context. After repeated failures with the same pattern, ThumbGate auto-generates a prevention rule and wires it as a pre-action
|
|
81
|
+
"text": "Yes. When your AI agent makes a mistake, you give a thumbs-down with context. After repeated failures with the same pattern, ThumbGate auto-generates a prevention rule and wires it as a pre-action check. Checks adapt their sensitivity over time using Thompson Sampling, a Bayesian multi-armed bandit algorithm."
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
]
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class="container">
|
|
147
147
|
<p class="breadcrumb"><a href="/">Home</a> / Compare</p>
|
|
148
148
|
|
|
149
|
-
<h1>Best Pre-Action
|
|
149
|
+
<h1>Best Pre-Action Check Tools for AI Coding Agents (2026 Comparison)</h1>
|
|
150
150
|
<p style="color:var(--muted);">Your AI coding agent force-pushed to main again. Which tool actually prevents that? We compared the five most common approaches to AI agent safety.</p>
|
|
151
151
|
|
|
152
152
|
<h2>Comparison Table</h2>
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
<td class="no">No</td>
|
|
210
210
|
</tr>
|
|
211
211
|
<tr>
|
|
212
|
-
<td>Real-time pre-action
|
|
212
|
+
<td>Real-time pre-action checks</td>
|
|
213
213
|
<td class="yes">Yes -- fires before every tool call</td>
|
|
214
214
|
<td class="no">No -- asynchronous review</td>
|
|
215
215
|
<td class="no">No -- reactive only</td>
|
|
@@ -238,11 +238,17 @@
|
|
|
238
238
|
<h2>Why ThumbGate Wins</h2>
|
|
239
239
|
<ul>
|
|
240
240
|
<li><strong>Enforcement, not suggestions.</strong> Prompt rules in CLAUDE.md or .cursorrules are instructions the agent can ignore. ThumbGate intercepts tool calls at the PreToolUse hook level and physically blocks dangerous actions before they execute.</li>
|
|
241
|
-
<li><strong>Learns and adapts automatically.</strong> Every thumbs-down becomes a data point. After repeated failures with the same pattern, ThumbGate auto-generates a prevention rule.
|
|
242
|
-
<li><strong>Works across all major AI coding agents.</strong> One install command covers Claude Code, Cursor, Codex, Gemini CLI, Amp, and OpenCode. No per-agent configuration needed.</li>
|
|
241
|
+
<li><strong>Learns and adapts automatically.</strong> Every thumbs-down becomes a data point. After repeated failures with the same pattern, ThumbGate auto-generates a prevention rule. Checks adapt their sensitivity over time using Thompson Sampling -- aggressive checks that over-block get tuned down, effective checks get reinforced.</li>
|
|
242
|
+
<li><strong>Works across all major AI coding agents.</strong> One install command covers Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, and OpenCode. No per-agent configuration needed.</li>
|
|
243
243
|
<li><strong>Prevention is cheaper than recovery.</strong> Manual code review catches mistakes after the PR. Git revert catches them after the push. ThumbGate catches them before the tool call executes -- saving the time, context switches, and cleanup cost of undoing damage.</li>
|
|
244
244
|
</ul>
|
|
245
245
|
|
|
246
|
+
<div class="card">
|
|
247
|
+
<h3>Evaluating bigger orchestration platforms?</h3>
|
|
248
|
+
<p>Journey orchestration and AI workflow routing are different from execution enforcement. If you are comparing ThumbGate to a broader AI orchestration stack, start here.</p>
|
|
249
|
+
<p><a href="/compare/ai-experience-orchestration" class="cta">Read orchestration vs enforcement</a></p>
|
|
250
|
+
</div>
|
|
251
|
+
|
|
246
252
|
<h2>How It Works</h2>
|
|
247
253
|
<div class="step-grid">
|
|
248
254
|
<div class="step-card">
|
|
@@ -252,8 +258,8 @@
|
|
|
252
258
|
</div>
|
|
253
259
|
<div class="step-card">
|
|
254
260
|
<div class="step-number">2</div>
|
|
255
|
-
<h3>
|
|
256
|
-
<p>Every tool call your agent makes passes through a pre-action
|
|
261
|
+
<h3>Check</h3>
|
|
262
|
+
<p>Every tool call your agent makes passes through a pre-action check. Known-bad patterns are blocked before execution. Good actions pass through instantly.</p>
|
|
257
263
|
</div>
|
|
258
264
|
<div class="step-card">
|
|
259
265
|
<div class="step-number">3</div>
|
|
@@ -276,18 +282,18 @@
|
|
|
276
282
|
<h2>Frequently Asked Questions</h2>
|
|
277
283
|
|
|
278
284
|
<div class="card">
|
|
279
|
-
<h3>What is a pre-action
|
|
280
|
-
<p>A pre-action
|
|
285
|
+
<h3>What is a pre-action check?</h3>
|
|
286
|
+
<p>A pre-action check is an enforcement layer that intercepts AI agent tool calls before they execute. Unlike prompt rules that agents can ignore, pre-action checks physically block dangerous actions such as force-pushing to main, deleting production files, or committing code with failing tests.</p>
|
|
281
287
|
</div>
|
|
282
288
|
|
|
283
289
|
<div class="card">
|
|
284
290
|
<h3>Does ThumbGate work with Claude Code?</h3>
|
|
285
|
-
<p>Yes. ThumbGate works with Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode, and any MCP-compatible agent. Run <code>npx thumbgate init --agent claude-code</code> to auto-configure PreToolUse hooks.</p>
|
|
291
|
+
<p>Yes. ThumbGate works with Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, OpenCode, and any MCP-compatible agent. Run <code>npx thumbgate init --agent claude-code</code> to auto-configure PreToolUse hooks.</p>
|
|
286
292
|
</div>
|
|
287
293
|
|
|
288
294
|
<div class="card">
|
|
289
295
|
<h3>Is ThumbGate free?</h3>
|
|
290
|
-
<p>ThumbGate has a free tier that includes local enforcement with 3 daily feedback captures, 5 lesson searches, unlimited recall, and pre-action
|
|
296
|
+
<p>ThumbGate has a free tier that includes local enforcement with 3 daily feedback captures, 5 lesson searches, unlimited recall, and pre-action check blocking. Pro ($19/mo or $149/yr) adds a personal local dashboard and DPO export. Team rollout ($49/seat/mo) adds a shared lesson database and org dashboard.</p>
|
|
291
297
|
</div>
|
|
292
298
|
|
|
293
299
|
<div class="card">
|
|
@@ -297,13 +303,13 @@
|
|
|
297
303
|
|
|
298
304
|
<div class="card">
|
|
299
305
|
<h3>Can ThumbGate learn from mistakes automatically?</h3>
|
|
300
|
-
<p>Yes. When your AI agent makes a mistake, give a thumbs-down with context. In the current Claude auto-capture path, vague negative signals can reuse up to 8 prior recorded entries plus the failed tool call, then stay linked to a 60-second follow-up session. After repeated failures with the same pattern, ThumbGate auto-generates a prevention rule and wires it as a pre-action
|
|
306
|
+
<p>Yes. When your AI agent makes a mistake, give a thumbs-down with context. In the current Claude auto-capture path, vague negative signals can reuse up to 8 prior recorded entries plus the failed tool call, then stay linked to a 60-second follow-up session. After repeated failures with the same pattern, ThumbGate auto-generates a prevention rule and wires it as a pre-action check. Checks adapt over time using Thompson Sampling, a Bayesian multi-armed bandit algorithm.</p>
|
|
301
307
|
</div>
|
|
302
308
|
|
|
303
309
|
</div>
|
|
304
310
|
|
|
305
311
|
<footer>
|
|
306
|
-
<p>ThumbGate -- Pre-action
|
|
312
|
+
<p>ThumbGate -- Pre-action checks for AI coding agents</p>
|
|
307
313
|
<p><a href="https://github.com/IgorGanapolsky/ThumbGate">GitHub</a> | <a href="https://www.npmjs.com/package/thumbgate">npm</a> | <a href="/guide">Guide</a> | <a href="/dashboard">Dashboard</a></p>
|
|
308
314
|
</footer>
|
|
309
315
|
</body>
|
package/public/dashboard.html
CHANGED
|
@@ -4,13 +4,33 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>ThumbGate Dashboard — Gate Stats, Approval Rate, Prevention Impact</title>
|
|
7
|
-
<meta name="description" content="Live dashboard showing gate enforcement stats, approval rate trends, prevention impact, and system health for ThumbGate pre-action
|
|
7
|
+
<meta name="description" content="Live dashboard showing gate enforcement stats, approval rate trends, prevention impact, and system health for ThumbGate pre-action checks.">
|
|
8
8
|
<link rel="canonical" href="https://thumbgate-production.up.railway.app/dashboard">
|
|
9
9
|
<link rel="icon" type="image/png" href="/thumbgate-icon.png">
|
|
10
10
|
<link rel="apple-touch-icon" href="/assets/brand/thumbgate-mark.svg">
|
|
11
11
|
<meta name="robots" content="noindex">
|
|
12
12
|
<!-- Privacy-friendly analytics by Plausible -->
|
|
13
13
|
<script defer data-domain="thumbgate-production.up.railway.app" src="https://plausible.io/js/script.js"></script>
|
|
14
|
+
<script type="application/ld+json">
|
|
15
|
+
{
|
|
16
|
+
"@context": "https://schema.org",
|
|
17
|
+
"@type": "WebApplication",
|
|
18
|
+
"name": "ThumbGate Dashboard",
|
|
19
|
+
"applicationCategory": "DeveloperApplication",
|
|
20
|
+
"operatingSystem": "Cross-platform",
|
|
21
|
+
"url": "https://thumbgate-production.up.railway.app/dashboard",
|
|
22
|
+
"dateModified": "2026-04-20",
|
|
23
|
+
"creator": {
|
|
24
|
+
"@type": "Person",
|
|
25
|
+
"name": "Igor Ganapolsky",
|
|
26
|
+
"url": "https://github.com/IgorGanapolsky",
|
|
27
|
+
"sameAs": [
|
|
28
|
+
"https://github.com/IgorGanapolsky",
|
|
29
|
+
"https://www.linkedin.com/in/igorganapolsky"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
14
34
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.7/dist/chart.umd.min.js"></script>
|
|
15
35
|
<style>
|
|
16
36
|
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
|
|
@@ -200,7 +220,8 @@
|
|
|
200
220
|
|
|
201
221
|
<div style="margin:0 0 24px;padding:24px;background:linear-gradient(135deg,rgba(34,211,238,0.08),rgba(74,222,128,0.05));border:1px solid rgba(34,211,238,0.2);border-radius:12px;">
|
|
202
222
|
<h1 style="font-size:22px;font-weight:700;margin-bottom:8px;letter-spacing:-0.02em;">🔍 Operations Dashboard</h1>
|
|
203
|
-
<p style="font-size:
|
|
223
|
+
<p style="font-size:12px;color:var(--text-muted);margin-bottom:8px;">Updated: <time datetime="2026-04-20">2026-04-20</time> · by <a href="https://github.com/IgorGanapolsky" style="color:inherit;">Igor Ganapolsky</a></p>
|
|
224
|
+
<p style="font-size:14px;color:var(--text-muted);line-height:1.6;max-width:700px;">What's happening right now? Search memories, inspect active checks, manage your team, and export training data. <span style="color:var(--cyan);font-weight:600;">This is your control plane for AI agent behavior.</span></p>
|
|
204
225
|
<div style="display:flex;gap:16px;margin-top:12px;font-size:12px;color:var(--text-muted);">
|
|
205
226
|
<span>🔍 <strong style="color:var(--text);">Search</strong> — find any memory</span>
|
|
206
227
|
<span>🛡️ <strong style="color:var(--text);">Gates</strong> — what's blocking</span>
|
|
@@ -211,7 +232,7 @@
|
|
|
211
232
|
|
|
212
233
|
<div class="demo-banner" id="demoBanner" style="display:none;">
|
|
213
234
|
<span>📊 <strong>Demo Mode</strong> — sample data. Pro unlocks your personal dashboard with search, DPO export, and gate analytics.</span>
|
|
214
|
-
<a href="
|
|
235
|
+
<a href="/go/pro?utm_source=dashboard_demo" rel="noopener" style="background:#b85c2d;color:#fff;padding:6px 14px;border-radius:8px;text-decoration:none;font-weight:700;white-space:nowrap;">Start 7-day free trial</a>
|
|
215
236
|
</div>
|
|
216
237
|
|
|
217
238
|
<!-- STATS -->
|
|
@@ -219,7 +240,7 @@
|
|
|
219
240
|
<a class="stat-card" data-card-action="all" onclick="selectCard(this,'all')" href="/lessons" style="cursor:pointer;text-decoration:none;color:inherit;display:block;" title="Click to view all feedback → Lessons page"><div class="stat-label">Total Feedback</div><div class="stat-value cyan" id="statTotal">—</div></a>
|
|
220
241
|
<a class="stat-card" data-card-action="up" onclick="selectCard(this,'up')" href="/lessons?signal=positive" style="cursor:pointer;text-decoration:none;color:inherit;display:block;" title="Click to view positive feedback → Lessons page"><div class="stat-label">👍 Positive</div><div class="stat-value green" id="statPositive">—</div></a>
|
|
221
242
|
<a class="stat-card" data-card-action="down" onclick="selectCard(this,'down')" href="/lessons?signal=negative" style="cursor:pointer;text-decoration:none;color:inherit;display:block;" title="Click to view negative feedback → Lessons page"><div class="stat-label">👎 Negative</div><div class="stat-value red" id="statNegative">—</div></a>
|
|
222
|
-
<a class="stat-card" data-card-action="gates" onclick="selectCard(this,'gates');return false;" href="#" style="cursor:pointer;text-decoration:none;color:inherit;display:block;" title="Click to view active
|
|
243
|
+
<a class="stat-card" data-card-action="gates" onclick="selectCard(this,'gates');return false;" href="#" style="cursor:pointer;text-decoration:none;color:inherit;display:block;" title="Click to view active checks"><div class="stat-label">Active Gates</div><div class="stat-value cyan" id="statGates">—</div></a>
|
|
223
244
|
</div>
|
|
224
245
|
|
|
225
246
|
<div class="panel" id="reviewDeltaPanel" style="margin-bottom:20px;">
|
|
@@ -282,7 +303,7 @@
|
|
|
282
303
|
<!-- GATES TAB -->
|
|
283
304
|
<div class="tab-content" id="tab-gates">
|
|
284
305
|
<div class="gates-section">
|
|
285
|
-
<h2>Active Pre-Action
|
|
306
|
+
<h2>Active Pre-Action Checks</h2>
|
|
286
307
|
<div id="gatesList"><div class="loading">Loading gates...</div></div>
|
|
287
308
|
</div>
|
|
288
309
|
</div>
|
|
@@ -424,7 +445,7 @@
|
|
|
424
445
|
<div>
|
|
425
446
|
<div style="font-size:32px;margin-bottom:8px;">🛡️</div>
|
|
426
447
|
<div style="font-size:13px;font-weight:600;margin-bottom:4px;">3. Gate Promoted</div>
|
|
427
|
-
<div style="font-size:12px;color:var(--text-muted);">Repeated lessons auto-promote into pre-action
|
|
448
|
+
<div style="font-size:12px;color:var(--text-muted);">Repeated lessons auto-promote into pre-action checks</div>
|
|
428
449
|
</div>
|
|
429
450
|
<div>
|
|
430
451
|
<div style="font-size:32px;margin-bottom:8px;">🚫</div>
|
|
@@ -502,6 +523,10 @@ async function connect(options) {
|
|
|
502
523
|
renderStats(data);
|
|
503
524
|
setSelectedCard('all');
|
|
504
525
|
await loadDashboardData();
|
|
526
|
+
// Open a live-events stream so feedback/rule-regen events surface
|
|
527
|
+
// without a manual refresh. Non-fatal: if the browser doesn't support
|
|
528
|
+
// ReadableStream over fetch (very old), we simply stay on the polled path.
|
|
529
|
+
subscribeToLiveEvents();
|
|
505
530
|
} catch (e) {
|
|
506
531
|
status.className = 'auth-status err';
|
|
507
532
|
status.textContent = '✗ ' + e.message;
|
|
@@ -735,6 +760,74 @@ async function loadDashboardData() {
|
|
|
735
760
|
} catch (e) { /* insights degrade gracefully */ }
|
|
736
761
|
}
|
|
737
762
|
|
|
763
|
+
// Live-events SSE subscription. We use fetch() + ReadableStream instead of
|
|
764
|
+
// the native EventSource because EventSource can't attach our Bearer auth
|
|
765
|
+
// header. On any event we re-fetch the stats/dashboard summary — cheap, and
|
|
766
|
+
// avoids having to duplicate rendering logic per event type.
|
|
767
|
+
var __liveEventsController = null;
|
|
768
|
+
async function subscribeToLiveEvents() {
|
|
769
|
+
if (__liveEventsController) {
|
|
770
|
+
try { __liveEventsController.abort(); } catch (_) { /* already aborted */ }
|
|
771
|
+
}
|
|
772
|
+
if (typeof AbortController === 'undefined' || !window.fetch) return;
|
|
773
|
+
var controller = new AbortController();
|
|
774
|
+
__liveEventsController = controller;
|
|
775
|
+
try {
|
|
776
|
+
var res = await fetch('/v1/events', {
|
|
777
|
+
headers: { 'Authorization': 'Bearer ' + API_KEY },
|
|
778
|
+
signal: controller.signal,
|
|
779
|
+
});
|
|
780
|
+
if (!res.ok || !res.body || !res.body.getReader) return;
|
|
781
|
+
var reader = res.body.getReader();
|
|
782
|
+
var decoder = new TextDecoder('utf-8');
|
|
783
|
+
var buffer = '';
|
|
784
|
+
while (true) {
|
|
785
|
+
var chunk = await reader.read();
|
|
786
|
+
if (chunk.done) break;
|
|
787
|
+
buffer += decoder.decode(chunk.value, { stream: true });
|
|
788
|
+
var frames = buffer.split('\n\n');
|
|
789
|
+
buffer = frames.pop() || '';
|
|
790
|
+
for (var i = 0; i < frames.length; i++) {
|
|
791
|
+
handleLiveEventFrame(frames[i]);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
} catch (e) {
|
|
795
|
+
// AbortError fires on logout/reconnect — not worth surfacing to the user.
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
function handleLiveEventFrame(frame) {
|
|
800
|
+
if (!frame || frame.charAt(0) === ':') return; // heartbeat comment
|
|
801
|
+
var eventName = 'message';
|
|
802
|
+
var dataLines = [];
|
|
803
|
+
var lines = frame.split('\n');
|
|
804
|
+
for (var i = 0; i < lines.length; i++) {
|
|
805
|
+
var line = lines[i];
|
|
806
|
+
if (line.indexOf('event:') === 0) eventName = line.slice(6).trim();
|
|
807
|
+
else if (line.indexOf('data:') === 0) dataLines.push(line.slice(5).trim());
|
|
808
|
+
}
|
|
809
|
+
if (!dataLines.length) return;
|
|
810
|
+
var payload;
|
|
811
|
+
try { payload = JSON.parse(dataLines.join('\n')); } catch (_) { return; }
|
|
812
|
+
onLiveEvent(eventName, payload);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
function onLiveEvent(eventName, payload) {
|
|
816
|
+
// All events currently boil down to "something changed, re-pull summary".
|
|
817
|
+
// When we add richer partial updates we can branch on eventName here.
|
|
818
|
+
if (eventName === 'connected') return;
|
|
819
|
+
refreshStatsOnly();
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
async function refreshStatsOnly() {
|
|
823
|
+
try {
|
|
824
|
+
var res = await fetch('/v1/feedback/stats', { headers: getHeaders() });
|
|
825
|
+
if (!res.ok) return;
|
|
826
|
+
var data = await res.json();
|
|
827
|
+
renderStats(data);
|
|
828
|
+
} catch (_) { /* ignore transient errors */ }
|
|
829
|
+
}
|
|
830
|
+
|
|
738
831
|
function formatReviewTimestamp(value) {
|
|
739
832
|
if (!value) return 'Not reviewed yet';
|
|
740
833
|
var date = new Date(value);
|
|
@@ -803,7 +896,7 @@ function renderDashboardData(data) {
|
|
|
803
896
|
const gateStats = data.gateStats || {};
|
|
804
897
|
document.getElementById('statGates').textContent = gates.length || gateStats.totalGates || 0;
|
|
805
898
|
if (!gates.length) {
|
|
806
|
-
document.getElementById('gatesList').innerHTML = '<div class="empty">No active
|
|
899
|
+
document.getElementById('gatesList').innerHTML = '<div class="empty">No active checks</div>';
|
|
807
900
|
} else {
|
|
808
901
|
document.getElementById('gatesList').innerHTML = gates.map(function(g) {
|
|
809
902
|
const action = g.action || 'block';
|
|
@@ -1126,7 +1219,7 @@ function renderTemplates(templateLibrary) {
|
|
|
1126
1219
|
'<div class="template-pattern">' + escHtml(template.pattern || '') + '</div>' +
|
|
1127
1220
|
'</div>';
|
|
1128
1221
|
}).join('')
|
|
1129
|
-
: '<div class="empty">No
|
|
1222
|
+
: '<div class="empty">No check templates available</div>';
|
|
1130
1223
|
}
|
|
1131
1224
|
|
|
1132
1225
|
document.addEventListener('click', function(event) {
|
|
@@ -1190,9 +1283,9 @@ function loadDemo() {
|
|
|
1190
1283
|
document.getElementById('reviewCheckpointBtn').textContent = 'Connect to save your own review checkpoint';
|
|
1191
1284
|
// Sample memories — realistic scenarios from real agent-driven development
|
|
1192
1285
|
var demoResults = [
|
|
1193
|
-
{ signal: 'down', title: 'Claimed fix worked without running tests', context: 'Agent announced "fixed and pushed" but never ran the test suite. CI failed on 3 tests.
|
|
1194
|
-
{ signal: 'down', title: 'Force-pushed to main and lost teammate commits', context: 'Used git push --force on main to fix a rebase. Overwrote 3 commits from another team member. Had to recover from reflog.
|
|
1195
|
-
{ signal: 'up', title: 'Pre-action
|
|
1286
|
+
{ signal: 'down', title: 'Claimed fix worked without running tests', context: 'Agent announced "fixed and pushed" but never ran the test suite. CI failed on 3 tests. Check now requires test evidence before any completion claim.', tags: ['anti-lying', 'verification-gap', 'ci', 'trust-breach'], timestamp: '2025-06-22T10:20:00Z' },
|
|
1287
|
+
{ signal: 'down', title: 'Force-pushed to main and lost teammate commits', context: 'Used git push --force on main to fix a rebase. Overwrote 3 commits from another team member. Had to recover from reflog. Check now blocks all --force pushes to protected branches.', tags: ['git', 'destructive', 'auto-blocked'], timestamp: '2025-06-20T09:15:00Z' },
|
|
1288
|
+
{ signal: 'up', title: 'Pre-action check caught .env commit', context: 'Check blocked a git add that included .env with production API keys. Saved from leaking secrets to a public repo.', tags: ['security', 'prevention', 'secrets'], timestamp: '2025-06-19T11:30:00Z' },
|
|
1196
1289
|
{ signal: 'down', title: 'PR scope creep — 72 changed files for a 2-file fix', context: 'Agent included unrelated formatting changes, config files, and lock file updates in a PR that should have touched 2 files. User had to manually separate the changes.', tags: ['pr-scope', 'scope-creep', 'user-frustration', 'git-workflow'], timestamp: '2025-06-18T14:30:00Z' },
|
|
1197
1290
|
{ signal: 'up', title: 'Full PR review cycle with on-device verification', context: 'Fixed 3 review findings, verified on physical Android device with fresh debug build, confirmed Delete Account flow end-to-end before marking PR ready.', tags: ['pr-review', 'on-device-verification', 'evidence-based', 'metric:ROI'], timestamp: '2025-06-17T16:45:00Z' },
|
|
1198
1291
|
{ signal: 'down', title: 'Claimed Figma compliance without visual verification', context: 'Said UI matched Figma designs without actually checking. User pointed out wrong colors, missing spacing, and incorrect font weights. Should have used screenshot comparison.', tags: ['anti-lying', 'figma', 'visual-verification', 'trust-breach'], timestamp: '2025-06-16T08:05:00Z' },
|
|
@@ -1216,7 +1309,7 @@ function loadDemo() {
|
|
|
1216
1309
|
'<span style="color:#ffb98a;font-weight:700;">Live demo data below.</span> ' +
|
|
1217
1310
|
'Point ThumbGate at your own feedback to see <em>your</em> gates, lessons, and team signals — no signup required.' +
|
|
1218
1311
|
'</div>' +
|
|
1219
|
-
'<a href="
|
|
1312
|
+
'<a href="/go/pro?utm_source=dashboard_live" rel="noopener" ' +
|
|
1220
1313
|
'style="flex:none;background:#b85c2d;color:#fff;padding:8px 18px;border-radius:8px;text-decoration:none;font-weight:700;font-size:13px;white-space:nowrap;">Go Pro — $19/mo</a>' +
|
|
1221
1314
|
'</div>';
|
|
1222
1315
|
document.getElementById('searchResults').innerHTML = upgradeBanner + teaserHtml;
|
package/public/guide.html
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<title>How to Stop AI Coding Agents From Repeating Mistakes — ThumbGate Guide</title>
|
|
7
7
|
<!-- Privacy-friendly analytics by Plausible -->
|
|
8
8
|
<script defer data-domain="thumbgate-production.up.railway.app" src="https://plausible.io/js/script.js"></script>
|
|
9
|
-
<meta name="description" content="The complete guide to preventing AI coding agent mistakes with pre-action
|
|
10
|
-
<meta name="keywords" content="AI agent mistakes, Claude Code force push, AI coding agent memory, MCP server guardrails, pre-action
|
|
9
|
+
<meta name="description" content="The complete guide to preventing AI coding agent mistakes with pre-action checks, history-aware lesson distillation, and automatic prevention rules.">
|
|
10
|
+
<meta name="keywords" content="AI agent mistakes, Claude Code force push, AI coding agent memory, MCP server guardrails, pre-action checks, vibe coding safety, PreToolUse hooks, ThumbGate, SpecLock alternative, Mem0 alternative">
|
|
11
11
|
<meta property="og:title" content="How to Stop AI Coding Agents From Repeating Mistakes">
|
|
12
|
-
<meta property="og:description" content="Pre-action
|
|
12
|
+
<meta property="og:description" content="Pre-action checks that physically block AI agents from repeating known mistakes. The complete guide.">
|
|
13
13
|
<meta property="og:type" content="article">
|
|
14
14
|
<meta property="og:url" content="https://thumbgate-production.up.railway.app/guide">
|
|
15
15
|
<link rel="canonical" href="https://thumbgate-production.up.railway.app/guide">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@context": "https://schema.org",
|
|
20
20
|
"@type": "TechArticle",
|
|
21
21
|
"headline": "How to Stop AI Coding Agents From Repeating Mistakes",
|
|
22
|
-
"description": "Complete guide to preventing AI agent mistakes with pre-action
|
|
22
|
+
"description": "Complete guide to preventing AI agent mistakes with pre-action checks, feedback capture, history-aware lesson distillation, and automatic prevention rule generation.",
|
|
23
23
|
"author": {
|
|
24
24
|
"@type": "Person",
|
|
25
25
|
"name": "Igor Ganapolsky",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"about": [
|
|
37
37
|
{"@type": "Thing", "name": "AI coding agents"},
|
|
38
38
|
{"@type": "Thing", "name": "Model Context Protocol"},
|
|
39
|
-
{"@type": "Thing", "name": "pre-action
|
|
39
|
+
{"@type": "Thing", "name": "pre-action checks"}
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
</script>
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"@type": "HowToStep",
|
|
65
65
|
"position": 3,
|
|
66
66
|
"name": "Feedback auto-promotes to prevention rules",
|
|
67
|
-
"text": "After repeated failures, ThumbGate generates a prevention rule and wires it as a pre-action
|
|
67
|
+
"text": "After repeated failures, ThumbGate generates a prevention rule and wires it as a pre-action check."
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"@type": "HowToStep",
|
|
71
71
|
"position": 4,
|
|
72
|
-
"name": "
|
|
72
|
+
"name": "Checks block mistakes before they happen",
|
|
73
73
|
"text": "PreToolUse hooks intercept tool calls and check them against known failure patterns. Bad actions are blocked before execution."
|
|
74
74
|
}
|
|
75
75
|
]
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"name": "How do I stop my AI coding agent from repeating mistakes?",
|
|
87
87
|
"acceptedAnswer": {
|
|
88
88
|
"@type": "Answer",
|
|
89
|
-
"text": "Install ThumbGate (npx thumbgate init). When your agent makes a mistake, give it a thumbs-down with context. ThumbGate captures the feedback, and after repeated failures, auto-generates a prevention rule. Pre-action
|
|
89
|
+
"text": "Install ThumbGate (npx thumbgate init). When your agent makes a mistake, give it a thumbs-down with context. ThumbGate captures the feedback, and after repeated failures, auto-generates a prevention rule. Pre-action checks then block the same mistake before it executes in future sessions."
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
"name": "Why does my Claude Code agent keep force-pushing to main?",
|
|
95
95
|
"acceptedAnswer": {
|
|
96
96
|
"@type": "Answer",
|
|
97
|
-
"text": "Because prompt rules are suggestions the agent can ignore. ThumbGate solves this with enforcement: a PreToolUse hook fires before every tool call and checks it against known failure patterns. If the action matches a
|
|
97
|
+
"text": "Because prompt rules are suggestions the agent can ignore. ThumbGate solves this with enforcement: a PreToolUse hook fires before every tool call and checks it against known failure patterns. If the action matches a check (like git push --force to main), it is physically blocked before execution."
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
"@type": "Question",
|
|
102
|
-
"name": "What is the difference between pre-action
|
|
102
|
+
"name": "What is the difference between pre-action checks and prompt rules?",
|
|
103
103
|
"acceptedAnswer": {
|
|
104
104
|
"@type": "Answer",
|
|
105
|
-
"text": "Prompt rules (like CLAUDE.md or .cursorrules) are instructions the agent may ignore. Pre-action
|
|
105
|
+
"text": "Prompt rules (like CLAUDE.md or .cursorrules) are instructions the agent may ignore. Pre-action checks are enforcement: they intercept the tool call at the PreToolUse hook level and block it before execution. Checks are auto-generated from feedback and use Thompson Sampling to adapt their sensitivity."
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
{
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"name": "Does AI agent memory persist across sessions?",
|
|
127
127
|
"acceptedAnswer": {
|
|
128
128
|
"@type": "Answer",
|
|
129
|
-
"text": "With ThumbGate, yes. Feedback is stored in a local SQLite database with FTS5 indexing. Prevention rules and
|
|
129
|
+
"text": "With ThumbGate, yes. Feedback is stored in a local SQLite database with FTS5 indexing. Prevention rules and checks persist across sessions. The recall tool injects relevant context at session start, and session handoff preserves continuity."
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
{
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"name": "How do I set up PreToolUse hooks in Claude Code?",
|
|
135
135
|
"acceptedAnswer": {
|
|
136
136
|
"@type": "Answer",
|
|
137
|
-
"text": "Run npx thumbgate init --agent claude-code. This auto-configures PreToolUse hooks in your .claude/settings.json. The hooks fire before every tool call and check it against your prevention rules and
|
|
137
|
+
"text": "Run npx thumbgate init --agent claude-code. This auto-configures PreToolUse hooks in your .claude/settings.json. The hooks fire before every tool call and check it against your prevention rules and checks."
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
{
|
|
@@ -201,14 +201,14 @@
|
|
|
201
201
|
<p class="breadcrumb"><a href="/">Home</a> / Guide</p>
|
|
202
202
|
|
|
203
203
|
<h1>How to Stop AI Coding Agents From Repeating Mistakes</h1>
|
|
204
|
-
<p style="color:var(--muted);">The complete guide to pre-action
|
|
204
|
+
<p style="color:var(--muted);">The complete guide to pre-action checks, feedback capture, history-aware lesson distillation, and automatic prevention rules.</p>
|
|
205
205
|
|
|
206
206
|
<h2>The Problem</h2>
|
|
207
207
|
<p>Your AI coding agent force-pushes to main. You correct it. Next session, it force-pushes again. You add a rule to CLAUDE.md. It ignores it. You lose an afternoon reverting.</p>
|
|
208
208
|
<p>This happens because <strong>prompt rules are suggestions</strong>. The agent can read them, forget them, or override them. There is no enforcement at the tool-call level.</p>
|
|
209
209
|
|
|
210
|
-
<h2>The Fix: Pre-Action
|
|
211
|
-
<p>ThumbGate adds an enforcement layer between your agent and its tools. When the agent tries to execute a tool call, a <code>PreToolUse</code> hook fires <em>before</em> the action runs. The hook checks the call against known failure patterns. If it matches a
|
|
210
|
+
<h2>The Fix: Pre-Action Checks</h2>
|
|
211
|
+
<p>ThumbGate adds an enforcement layer between your agent and its tools. When the agent tries to execute a tool call, a <code>PreToolUse</code> hook fires <em>before</em> the action runs. The hook checks the call against known failure patterns. If it matches a check, the action is blocked.</p>
|
|
212
212
|
|
|
213
213
|
<div class="card">
|
|
214
214
|
<h3>Before ThumbGate</h3>
|
|
@@ -216,9 +216,9 @@
|
|
|
216
216
|
Result: Force-pushed. You lose 3 commits. Again.</code></pre>
|
|
217
217
|
<h3>After ThumbGate</h3>
|
|
218
218
|
<pre><code>Agent: git push --force origin main
|
|
219
|
-
[
|
|
219
|
+
[check] Blocked: no-force-push (confidence: 0.94)
|
|
220
220
|
Agent: git push origin feature-branch
|
|
221
|
-
[
|
|
221
|
+
[check] Passed</code></pre>
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<h2>Install (One Command)</h2>
|
|
@@ -249,11 +249,11 @@ npx thumbgate init --agent gemini</code></pre>
|
|
|
249
249
|
<h3>2. Feedback auto-promotes to prevention rules</h3>
|
|
250
250
|
<p>After repeated failures with the same pattern, ThumbGate generates a prevention rule automatically. No manual rule writing needed.</p>
|
|
251
251
|
|
|
252
|
-
<h3>3. Rules become
|
|
253
|
-
<p>Prevention rules are enforced as pre-action
|
|
252
|
+
<h3>3. Rules become checks</h3>
|
|
253
|
+
<p>Prevention rules are enforced as pre-action checks. The check fires at the <code>PreToolUse</code> hook level — inside the agent's runtime, before the tool call executes.</p>
|
|
254
254
|
|
|
255
|
-
<h3>4.
|
|
256
|
-
<p>
|
|
255
|
+
<h3>4. Checks adapt via Thompson Sampling</h3>
|
|
256
|
+
<p>Checks that block too aggressively (high false-positive rate) get their confidence reduced automatically. Checks that catch real mistakes get reinforced. This is Bayesian multi-armed bandit optimization, not static rules.</p>
|
|
257
257
|
|
|
258
258
|
<h2>Memory That Persists Across Sessions</h2>
|
|
259
259
|
<p>ThumbGate stores feedback in a local SQLite database with FTS5 full-text indexing. Lookups are sub-millisecond even at tens of thousands of entries. Old entries that contradict newer evidence are auto-pruned via Bayesian belief decay.</p>
|
|
@@ -273,9 +273,9 @@ npx thumbgate init --agent gemini</code></pre>
|
|
|
273
273
|
<li><code>reflect_on_feedback</code> proposes a reusable rule from the same transcript when the failure pattern is obvious.</li>
|
|
274
274
|
</ul>
|
|
275
275
|
|
|
276
|
-
<h2>Pre-Action
|
|
276
|
+
<h2>Pre-Action Checks vs Prompt Rules</h2>
|
|
277
277
|
<table class="comparison-table">
|
|
278
|
-
<tr><th>Feature</th><th>Prompt Rules</th><th>Pre-Action
|
|
278
|
+
<tr><th>Feature</th><th>Prompt Rules</th><th>Pre-Action Checks</th></tr>
|
|
279
279
|
<tr><td>Where they live</td><td>CLAUDE.md, .cursorrules</td><td>PreToolUse hooks</td></tr>
|
|
280
280
|
<tr><td>Enforcement</td><td>Suggestion (can be ignored)</td><td>Blocks execution</td></tr>
|
|
281
281
|
<tr><td>When they fire</td><td>At prompt load</td><td>Before every tool call</td></tr>
|
|
@@ -287,7 +287,7 @@ npx thumbgate init --agent gemini</code></pre>
|
|
|
287
287
|
<h2>ThumbGate vs Alternatives</h2>
|
|
288
288
|
<table class="comparison-table">
|
|
289
289
|
<tr><th>Feature</th><th>ThumbGate</th><th>SpecLock</th><th>Mem0</th></tr>
|
|
290
|
-
<tr><td>Blocks mistakes before execution</td><td>Yes — PreToolUse
|
|
290
|
+
<tr><td>Blocks mistakes before execution</td><td>Yes — PreToolUse checks</td><td>Yes — Patch Firewall</td><td>No</td></tr>
|
|
291
291
|
<tr><td>Learns from feedback</td><td>Yes — thumbs up/down</td><td>No — manual specs</td><td>Yes — auto-capture</td></tr>
|
|
292
292
|
<tr><td>Auto-generates rules</td><td>Yes — from repeated failures</td><td>No</td><td>No</td></tr>
|
|
293
293
|
<tr><td>Agent support</td><td>Claude Code, Codex, Gemini, Amp, Cursor, OpenCode</td><td>Claude Code, Cursor, Windsurf, Cline</td><td>Claude, Cursor</td></tr>
|
|
@@ -298,13 +298,13 @@ npx thumbgate init --agent gemini</code></pre>
|
|
|
298
298
|
<h2>Common Scenarios</h2>
|
|
299
299
|
|
|
300
300
|
<h3>Agent keeps deleting files</h3>
|
|
301
|
-
<p>Give a thumbs-down: "deleted production config file." After 2-3 occurrences, ThumbGate generates a
|
|
301
|
+
<p>Give a thumbs-down: "deleted production config file." After 2-3 occurrences, ThumbGate generates a check that blocks <code>rm</code> commands targeting config files.</p>
|
|
302
302
|
|
|
303
303
|
<h3>Agent ignores test failures</h3>
|
|
304
|
-
<p>Give a thumbs-down: "committed code with failing tests." ThumbGate learns the pattern and
|
|
304
|
+
<p>Give a thumbs-down: "committed code with failing tests." ThumbGate learns the pattern and checks future commits when test results show failures.</p>
|
|
305
305
|
|
|
306
306
|
<h3>Agent uses wrong API endpoint</h3>
|
|
307
|
-
<p>Give a thumbs-down: "called staging API in production code." The
|
|
307
|
+
<p>Give a thumbs-down: "called staging API in production code." The check blocks tool calls that reference staging URLs in production contexts.</p>
|
|
308
308
|
|
|
309
309
|
<h2>Get Started</h2>
|
|
310
310
|
<pre><code>npx thumbgate init</code></pre>
|