thumbgate 1.27.20 → 1.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/.claude-plugin/plugin.json +2 -1
  2. package/.well-known/mcp/server-card.json +1 -1
  3. package/README.md +124 -129
  4. package/adapters/claude/.mcp.json +2 -2
  5. package/adapters/mcp/server-stdio.js +18 -33
  6. package/adapters/opencode/opencode.json +1 -1
  7. package/bin/cli.js +95 -78
  8. package/bin/postinstall.js +1 -1
  9. package/config/entitlement-public-keys.json +6 -0
  10. package/config/gates/default.json +3 -3
  11. package/config/github-about.json +2 -5
  12. package/config/merge-quality-checks.json +3 -0
  13. package/config/post-deploy-marketing-pages.json +1 -1
  14. package/hooks/hooks.json +38 -0
  15. package/package.json +28 -10
  16. package/public/about.html +1 -4
  17. package/public/agent-manager.html +6 -6
  18. package/public/agents-cost-savings.html +3 -3
  19. package/public/ai-malpractice-prevention.html +1 -1
  20. package/public/blog.html +12 -9
  21. package/public/chatgpt-app.html +3 -3
  22. package/public/codex-enterprise.html +3 -3
  23. package/public/codex-plugin.html +5 -5
  24. package/public/compare.html +10 -10
  25. package/public/dashboard.html +1 -1
  26. package/public/diagnostic.html +23 -1
  27. package/public/federal.html +2 -2
  28. package/public/guide.html +14 -14
  29. package/public/index.html +202 -220
  30. package/public/install.html +14 -14
  31. package/public/learn.html +4 -17
  32. package/public/numbers.html +2 -2
  33. package/public/partner-intake.html +198 -0
  34. package/public/pricing.html +61 -31
  35. package/public/pro.html +2 -2
  36. package/scripts/agent-reward-model.js +13 -0
  37. package/scripts/bayes-optimal-gate.js +6 -1
  38. package/scripts/billing.js +815 -137
  39. package/scripts/checkout-attribution-reference.js +85 -0
  40. package/scripts/claude-feedback-sync.js +23 -6
  41. package/scripts/cli-feedback.js +33 -8
  42. package/scripts/commercial-offer.js +3 -3
  43. package/scripts/entitlement.js +250 -0
  44. package/scripts/export-databricks-bundle.js +5 -0
  45. package/scripts/export-dpo-pairs.js +6 -0
  46. package/scripts/export-hf-dataset.js +5 -0
  47. package/scripts/feedback-loop.js +290 -1
  48. package/scripts/feedback-quality.js +25 -26
  49. package/scripts/feedback-sanitizer.js +151 -3
  50. package/scripts/gates-engine.js +134 -43
  51. package/scripts/hosted-config.js +9 -2
  52. package/scripts/imperative-detector.js +85 -0
  53. package/scripts/intervention-policy.js +13 -0
  54. package/scripts/mailer/resend-mailer.js +11 -5
  55. package/scripts/pr-manager.js +9 -22
  56. package/scripts/pro-local-dashboard.js +198 -0
  57. package/scripts/risk-scorer.js +6 -0
  58. package/scripts/secret-scanner.js +363 -68
  59. package/scripts/self-protection.js +21 -36
  60. package/scripts/seo-gsd.js +2 -2
  61. package/scripts/thompson-sampling.js +11 -2
  62. package/src/api/server.js +202 -22
  63. package/public/assets/brand/github-social-preview.png +0 -0
@@ -252,7 +252,7 @@ footer { padding: 32px 0 44px; color: var(--muted); }
252
252
  <option>We need an independent proof checklist first</option>
253
253
  </select>
254
254
  <button type="submit" data-revenue-cta data-cta-id="diagnostic_page_submit" data-cta-placement="intake">Submit for diagnostic scope</button>
255
- <p class="hint">Ready to pay now? Use the $499 diagnostic checkout above. If the workflow needs fit review first, submit it here and we will route you to the diagnostic or sprint only when the scope is real.</p>
255
+ <p class="hint" data-diagnostic-payment-hint>Ready to pay now? Use the $499 diagnostic checkout above. If the workflow needs fit review first, submit it here and we will route you to the diagnostic or sprint only when the scope is real.</p>
256
256
  </form>
257
257
  </div>
258
258
  <section>
@@ -295,6 +295,28 @@ footer { padding: 32px 0 44px; color: var(--muted); }
295
295
  <script>
296
296
  (function () {
297
297
  const search = new URLSearchParams(window.location.search);
298
+ const paidCta = document.querySelector('[data-cta-id="diagnostic_hero_paid"]');
299
+ const inboundSource = search.get('utm_source') || search.get('source');
300
+ const isAiventyxTraffic = String(inboundSource || '').trim().toLowerCase() === 'aiventyx';
301
+ if (paidCta && isAiventyxTraffic) {
302
+ paidCta.remove();
303
+ const paymentHint = document.querySelector('[data-diagnostic-payment-hint]');
304
+ if (paymentHint) {
305
+ paymentHint.textContent = 'Submit the workflow here. Aiventyx will collect payment on its checkout once the scope is accepted.';
306
+ }
307
+ } else if (paidCta) {
308
+ const href = new URL(paidCta.getAttribute('href'), window.location.origin);
309
+ const passthrough = /^(utm_(source|medium|campaign|content|term)|source|acquisition_id|visitor_id|session_id|visitor_session_id|install_id|trace_id|creator|community|post_id|comment_id|campaign_variant|offer_code|referrer_host)$/i;
310
+ for (const [key, value] of search.entries()) {
311
+ if (!passthrough.test(key) || !value.trim()) continue;
312
+ href.searchParams.set(key, value.trim());
313
+ }
314
+ if (inboundSource && inboundSource.trim()) {
315
+ href.searchParams.set('utm_source', inboundSource.trim());
316
+ }
317
+ paidCta.setAttribute('href', `${href.pathname}${href.search}${href.hash}`);
318
+ }
319
+
298
320
  const form = document.querySelector('[data-diagnostic-intake-form]');
299
321
  if (form) {
300
322
  for (const [key, value] of search.entries()) {
@@ -223,7 +223,7 @@ __GA_BOOTSTRAP__
223
223
  </div>
224
224
  <div class="card">
225
225
  <h3>Repeated-failure prevention</h3>
226
- <p>A thumbs-down from an agency engineer becomes a permanent prevention rule. The same risky action never reaches the model on the next attempt — relevant for cost control and for documenting "we did not let the agent do X" in incident review.</p>
226
+ <p>A thumbs-down from an agency engineer becomes a prevention rule. On the next attempt that risky action is flagged and logged and hard-blocked for the highest-risk classes or under strict enforcement mode — relevant for cost control and for documenting "we did not let the agent do X" in incident review.</p>
227
227
  </div>
228
228
  <div class="card">
229
229
  <h3>Vendor-neutral</h3>
@@ -268,7 +268,7 @@ __GA_BOOTSTRAP__
268
268
  <tr><th>Family</th><th>Control</th><th>How ThumbGate supports it</th></tr>
269
269
  </thead>
270
270
  <tbody>
271
- <tr><td>AC</td><td><code>AC-3</code> Access Enforcement</td><td>PreToolUse hook blocks tool calls that violate policy regardless of operator intent.</td></tr>
271
+ <tr><td>AC</td><td><code>AC-3</code> Access Enforcement</td><td>PreToolUse hook flags and logs tool calls that violate policy regardless of operator intent, and hard-blocks them under strict enforcement mode.</td></tr>
272
272
  <tr><td>AC</td><td><code>AC-6</code> Least Privilege</td><td>Per-gate scopes bind agent actions to declared task scope.</td></tr>
273
273
  <tr><td>AU</td><td><code>AU-2 / AU-3 / AU-12</code> Audit Logging</td><td>Every gate decision logged with full payload, PII-redacted, exportable to agency SIEM.</td></tr>
274
274
  <tr><td>CM</td><td><code>CM-3</code> Configuration Change Control</td><td>Branch governance gate requires <code>releaseVersion</code> declaration before release/publish actions.</td></tr>
package/public/guide.html CHANGED
@@ -9,7 +9,7 @@
9
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
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 checks that physically block AI agents from repeating known mistakes. The complete guide.">
12
+ <meta property="og:description" content="Pre-action checks that flag and log known agent mistakes and hard-block the catastrophic ones. The complete guide.">
13
13
  <meta property="og:type" content="article">
14
14
  <meta property="og:url" content="https://thumbgate.ai/guide">
15
15
  <link rel="canonical" href="https://thumbgate.ai/guide">
@@ -69,8 +69,8 @@
69
69
  {
70
70
  "@type": "HowToStep",
71
71
  "position": 4,
72
- "name": "Checks block mistakes before they happen",
73
- "text": "PreToolUse hooks intercept tool calls and check them against known failure patterns. Bad actions are blocked before execution."
72
+ "name": "Checks flag mistakes before they happen",
73
+ "text": "PreToolUse hooks intercept tool calls and check them against known failure patterns. Risky actions are flagged and logged before execution; catastrophic ones (secret exfiltration, destructive deletes) are hard-blocked, and any rule can hard-block under strict mode."
74
74
  }
75
75
  ]
76
76
  }
@@ -94,7 +94,7 @@
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 check (like git push --force to main), it is physically blocked before execution."
97
+ "text": "Because prompt rules are suggestions the agent can ignore. ThumbGate adds enforcement: a PreToolUse hook fires before every tool call and checks it against known failure patterns. When the action matches a check (like git push --force to main), it is flagged and logged before execution — and hard-blocked when strict enforcement (THUMBGATE_STRICT_ENFORCEMENT=1) is on. Catastrophic actions such as secret exfiltration and destructive deletes are hard-blocked by default."
98
98
  }
99
99
  },
100
100
  {
@@ -102,7 +102,7 @@
102
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 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."
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 act on it before execution — flagging and logging by default, hard-blocking catastrophic actions and anything under strict mode. Checks are auto-generated from feedback and use Thompson Sampling to adapt their sensitivity."
106
106
  }
107
107
  },
108
108
  {
@@ -110,7 +110,7 @@
110
110
  "name": "How does ThumbGate compare to SpecLock?",
111
111
  "acceptedAnswer": {
112
112
  "@type": "Answer",
113
- "text": "SpecLock requires manually writing constraints or compiling them from a PRD. ThumbGate learns automatically from thumbs-up/down feedback and auto-generates prevention rules from repeated failures. SpecLock locks files from modification; ThumbGate blocks specific actions before they execute."
113
+ "text": "SpecLock requires manually writing constraints or compiling them from a PRD. ThumbGate learns automatically from thumbs-up/down feedback and auto-generates prevention rules from repeated failures. SpecLock locks files from modification; ThumbGate flags specific actions before they execute and hard-blocks the catastrophic ones (or any rule under strict mode)."
114
114
  }
115
115
  },
116
116
  {
@@ -118,7 +118,7 @@
118
118
  "name": "How does ThumbGate compare to Mem0?",
119
119
  "acceptedAnswer": {
120
120
  "@type": "Answer",
121
- "text": "Mem0 is cloud-hosted memory for AI apps. ThumbGate is local-first enforcement. Mem0 remembers context but cannot block actions. ThumbGate captures feedback, promotes it to prevention rules, and physically blocks tool calls that match known failure patterns."
121
+ "text": "Mem0 is cloud-hosted memory for AI apps. ThumbGate is local-first enforcement. Mem0 remembers context but does not gate actions. ThumbGate captures feedback, promotes it to prevention rules, and flags tool calls that match known failure patterns — hard-blocking the catastrophic ones (or any rule under strict mode)."
122
122
  }
123
123
  },
124
124
  {
@@ -223,7 +223,7 @@
223
223
  <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>
224
224
 
225
225
  <h2>The Fix: Pre-Action Checks</h2>
226
- <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>
226
+ <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 flagged and logged — and hard-blocked for secret exfiltration and guardrail-tampering by default (destructive deletes, force-push, and supply-chain warn by default) or when strict enforcement (<code>THUMBGATE_STRICT_ENFORCEMENT=1</code>) is on.</p>
227
227
 
228
228
  <div class="card">
229
229
  <h3>Before ThumbGate</h3>
@@ -231,7 +231,7 @@
231
231
  Result: Force-pushed. You lose 3 commits. Again.</code></pre>
232
232
  <h3>After ThumbGate</h3>
233
233
  <pre><code>Agent: git push --force origin main
234
- [check] Blocked: no-force-push (confidence: 0.94)
234
+ [check] Warn: no-force-push (confidence: 0.94) — hard-blocked under strict mode
235
235
  Agent: git push origin feature-branch
236
236
  [check] Passed</code></pre>
237
237
  </div>
@@ -257,7 +257,7 @@ npx thumbgate init --agent gemini</code></pre>
257
257
  <td><strong>Machine-wide</strong> (default)</td>
258
258
  <td><code>npx thumbgate init</code></td>
259
259
  <td><code>~/.claude/memory/feedback/</code> — <strong>one shared dashboard across every repo on the machine</strong></td>
260
- <td>Solo developer. A lesson learned in <code>repo-A</code> automatically blocks the same mistake in <code>repo-B</code>.</td>
260
+ <td>Solo developer. A lesson learned in <code>repo-A</code> automatically flags the same mistake in <code>repo-B</code>.</td>
261
261
  </tr>
262
262
  <tr>
263
263
  <td><strong>Per-project</strong></td>
@@ -315,7 +315,7 @@ npx thumbgate init --agent gemini</code></pre>
315
315
  <table class="comparison-table">
316
316
  <tr><th>Feature</th><th>Prompt Rules</th><th>Pre-Action Checks</th></tr>
317
317
  <tr><td>Where they live</td><td>CLAUDE.md, .cursorrules</td><td>PreToolUse hooks</td></tr>
318
- <tr><td>Enforcement</td><td>Suggestion (can be ignored)</td><td>Blocks execution</td></tr>
318
+ <tr><td>Enforcement</td><td>Suggestion (can be ignored)</td><td>Flags + logs; hard-blocks critical / strict mode</td></tr>
319
319
  <tr><td>When they fire</td><td>At prompt load</td><td>Before every tool call</td></tr>
320
320
  <tr><td>Auto-generated</td><td>No — hand-written</td><td>Yes — from feedback</td></tr>
321
321
  <tr><td>Adaptive</td><td>No</td><td>Yes — Thompson Sampling</td></tr>
@@ -325,7 +325,7 @@ npx thumbgate init --agent gemini</code></pre>
325
325
  <h2>ThumbGate vs Alternatives</h2>
326
326
  <table class="comparison-table">
327
327
  <tr><th>Feature</th><th>ThumbGate</th><th>SpecLock</th><th>Mem0</th></tr>
328
- <tr><td>Blocks mistakes before execution</td><td>Yes — PreToolUse checks</td><td>Yes — Patch Firewall</td><td>No</td></tr>
328
+ <tr><td>Flags mistakes before execution</td><td>Yes — PreToolUse checks (hard-blocks critical / strict mode)</td><td>Yes — Patch Firewall</td><td>No</td></tr>
329
329
  <tr><td>Learns from feedback</td><td>Yes — thumbs up/down</td><td>No — manual specs</td><td>Yes — auto-capture</td></tr>
330
330
  <tr><td>Auto-generates rules</td><td>Yes — from repeated failures</td><td>No</td><td>No</td></tr>
331
331
  <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>
@@ -342,7 +342,7 @@ npx thumbgate init --agent gemini</code></pre>
342
342
  <p>Give a thumbs-down: "committed code with failing tests." ThumbGate learns the pattern and checks future commits when test results show failures.</p>
343
343
 
344
344
  <h3>Agent uses wrong API endpoint</h3>
345
- <p>Give a thumbs-down: "called staging API in production code." The check blocks tool calls that reference staging URLs in production contexts.</p>
345
+ <p>Give a thumbs-down: "called staging API in production code." The check flags and logs tool calls that reference staging URLs in production contexts (and hard-blocks them under strict mode).</p>
346
346
 
347
347
  <h2>When ThumbGate becomes a paid decision</h2>
348
348
  <p>Stay on the free install path while one operator is proving the workflow locally. The paid motion starts when a workflow owner asks for proof, shared enforcement, or a safer rollout path.</p>
@@ -375,7 +375,7 @@ npx thumbgate init --agent gemini</code></pre>
375
375
  <a href="__SPRINT_DIAGNOSTIC_CHECKOUT_URL__" class="cta cta-secondary">Pay $499 diagnostic</a>
376
376
  <a href="__WORKFLOW_SPRINT_CHECKOUT_URL__" class="cta cta-secondary">Pay $1500 sprint</a>
377
377
  <a href="https://thumbgate.ai/#workflow-sprint-intake" class="cta cta-secondary">Send workflow first</a>
378
- <p style="color:var(--muted); font-size:0.85rem;">Free: 2 captures/day, 10 total captures, 3 active prevention rules, hook blocking. Pro: hosted sync, dashboard, recall, lesson search, unlimited captures/rules, DPO export. Enterprise: intake first, then custom pricing scoped to your rollout.</p>
378
+ <p style="color:var(--muted); font-size:0.85rem;">Free: 2 captures/day, 10 total captures, 3 active prevention rules, hook blocking. Pro: personal dashboard, recall, search, unlimited captures/rules, managed adapters, DPO export. Enterprise: shared hosted lessons, org visibility, custom rollout support.</p>
379
379
 
380
380
  </div>
381
381
  <script src="/js/buyer-intent.js"></script>