thumbgate 1.21.2 → 1.23.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.
Files changed (37) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.well-known/mcp/server-card.json +1 -1
  4. package/README.md +1 -0
  5. package/adapters/chatgpt/openapi.yaml +10 -0
  6. package/adapters/claude/.mcp.json +2 -2
  7. package/adapters/mcp/server-stdio.js +109 -1
  8. package/adapters/opencode/opencode.json +1 -1
  9. package/bin/cli.js +247 -30
  10. package/config/mcp-allowlists.json +12 -6
  11. package/openapi/openapi.yaml +10 -0
  12. package/package.json +29 -5
  13. package/public/agent-manager.html +1 -1
  14. package/public/agents-cost-savings.html +151 -0
  15. package/public/ai-malpractice-prevention.html +183 -0
  16. package/public/codex-enterprise.html +123 -0
  17. package/public/codex-plugin.html +1 -1
  18. package/public/dashboard.html +18 -5
  19. package/public/index.html +13 -6
  20. package/public/lessons.html +34 -0
  21. package/public/numbers.html +2 -2
  22. package/public/pricing.html +1 -1
  23. package/scripts/auto-wire-hooks.js +14 -0
  24. package/scripts/build-metadata.js +32 -13
  25. package/scripts/cli-telemetry.js +6 -1
  26. package/scripts/gate-stats.js +89 -0
  27. package/scripts/gates-engine.js +133 -6
  28. package/scripts/hook-runtime.js +9 -3
  29. package/scripts/meta-agent-loop.js +32 -0
  30. package/scripts/pro-local-dashboard.js +4 -4
  31. package/scripts/rate-limiter.js +7 -1
  32. package/scripts/self-healing-check.js +193 -0
  33. package/scripts/silent-failure-cluster.js +512 -0
  34. package/scripts/telemetry-analytics.js +38 -0
  35. package/scripts/tool-registry.js +18 -0
  36. package/scripts/workflow-sentinel.js +6 -1
  37. package/src/api/server.js +311 -36
@@ -68,7 +68,8 @@
68
68
  "perplexity_search",
69
69
  "perplexity_ask",
70
70
  "perplexity_research",
71
- "perplexity_reason"
71
+ "perplexity_reason",
72
+ "suggest_fix"
72
73
  ],
73
74
  "essential": [
74
75
  "capture_feedback",
@@ -104,7 +105,8 @@
104
105
  "report_product_issue",
105
106
  "require_evidence_for_claim",
106
107
  "session_report",
107
- "generate_operator_artifact"
108
+ "generate_operator_artifact",
109
+ "suggest_fix"
108
110
  ],
109
111
  "commerce": [
110
112
  "capture_feedback",
@@ -123,7 +125,8 @@
123
125
  "workflow_sentinel",
124
126
  "prevention_rules",
125
127
  "feedback_stats",
126
- "feedback_summary"
128
+ "feedback_summary",
129
+ "suggest_fix"
127
130
  ],
128
131
  "readonly": [
129
132
  "recall",
@@ -164,7 +167,8 @@
164
167
  "session_report",
165
168
  "generate_operator_artifact",
166
169
  "perplexity_search",
167
- "perplexity_ask"
170
+ "perplexity_ask",
171
+ "suggest_fix"
168
172
  ],
169
173
  "dispatch": [
170
174
  "recall",
@@ -204,7 +208,8 @@
204
208
  "session_report",
205
209
  "generate_operator_artifact",
206
210
  "perplexity_search",
207
- "perplexity_ask"
211
+ "perplexity_ask",
212
+ "suggest_fix"
208
213
  ],
209
214
  "locked": [
210
215
  "feedback_summary",
@@ -228,7 +233,8 @@
228
233
  "workflow_sentinel",
229
234
  "settings_status",
230
235
  "native_messaging_audit",
231
- "generate_operator_artifact"
236
+ "generate_operator_artifact",
237
+ "suggest_fix"
232
238
  ]
233
239
  }
234
240
  }
@@ -72,6 +72,11 @@ components:
72
72
  description: Optional domain tags. If omitted, ThumbGate infers one from the feedback text before promotion.
73
73
  skill:
74
74
  type: string
75
+ source:
76
+ type: string
77
+ enum: [chatgpt_gpt]
78
+ default: chatgpt_gpt
79
+ description: Attribution marker for ThumbGate analytics. The published ThumbGate GPT should send `chatgpt_gpt` so owner dashboards can distinguish GPT Action calls from local API calls.
75
80
  IntentPlanRequest:
76
81
  type: object
77
82
  required: [intentId]
@@ -880,6 +885,11 @@ paths:
880
885
  toolName:
881
886
  type: string
882
887
  description: Tool name is optional when provider-native tool call payload is supplied.
888
+ source:
889
+ type: string
890
+ enum: [chatgpt_gpt]
891
+ default: chatgpt_gpt
892
+ description: Attribution marker for ThumbGate analytics. The published ThumbGate GPT should send `chatgpt_gpt` so owner dashboards can distinguish GPT Action calls from local API calls.
883
893
  provider:
884
894
  type: string
885
895
  model:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.21.2",
3
+ "version": "1.23.0",
4
4
  "description": "ThumbGate self-improving agent governance: thumbs-up/down turns every mistake into a prevention rule and blocks repeat patterns. 33 pre-action checks, budget enforcement, and self-protection for Claude Code, Cursor, Codex, Gemini CLI, and Amp.",
5
5
  "homepage": "https://thumbgate-production.up.railway.app",
6
6
  "repository": {
@@ -162,10 +162,12 @@
162
162
  "scripts/security-scanner.js",
163
163
  "scripts/self-distill-agent.js",
164
164
  "scripts/self-heal.js",
165
+ "scripts/self-healing-check.js",
165
166
  "scripts/semantic-dedup.js",
166
167
  "scripts/semantic-layer.js",
167
168
  "scripts/seo-gsd.js",
168
169
  "scripts/settings-hierarchy.js",
170
+ "scripts/silent-failure-cluster.js",
169
171
  "scripts/single-use-credential-gate.js",
170
172
  "scripts/skill-generator.js",
171
173
  "scripts/skill-rag-router.js",
@@ -223,6 +225,9 @@
223
225
  "openapi/",
224
226
  "public/agent-manager.html",
225
227
  "public/blog.html",
228
+ "public/codex-enterprise.html",
229
+ "public/agents-cost-savings.html",
230
+ "public/ai-malpractice-prevention.html",
226
231
  "public/codex-plugin.html",
227
232
  "public/compare.html",
228
233
  "public/dashboard.html",
@@ -333,7 +338,7 @@
333
338
  "social:prospect:bluesky:dry": "node scripts/social-bluesky-prospecting.js --dry-run",
334
339
  "social:reply-publish:bluesky:dry": "node scripts/social-reply-monitor-bluesky.js --publish-approved --dry-run",
335
340
  "test:python": "python3 -m pytest tests/*.py",
336
- "test": "npm run test:python && npm run test:schema && npm run test:loop && npm run test:dpo && npm run test:kto && npm run test:api && npm run test:proof && npm run test:e2e && npm run test:rlaif && npm run test:attribution && npm run test:quality && npm run test:intelligence && npm run test:training-export && npm run test:deployment && npm run test:operational-integrity && npm run test:workflow && npm run test:billing && npm run test:cli && npm run test:watcher && npm run test:autoresearch && npm run test:ops && npm run test:session-analyzer && npm run test:tessl && npm run test:gates && npm run test:evoskill && npm run test:gates-hardening && npm run test:workers && npm run test:social-analytics && npm run test:memalign && npm run test:xmemory-lite && npm run test:filesystem-search && npm run test:zernio && npm run test:platform-limits && npm run test:post-video && npm run test:post-everywhere-instagram && npm run test:post-everywhere-channels && npm run test:post-everywhere-zernio-default && npm run test:zernio-canonical-pollers && npm run test:zernio-status && npm run test:obsidian-export && npm run test:lesson-db && npm run test:lesson-rotation && npm run test:memory-dedup && npm run test:feedback-quality && npm run test:sync-version && npm run test:check-congruence && npm run test:tool-registry && npm run test:feedback-to-rules && npm run test:memory-firewall && npm run test:memory-scope-readiness && npm run test:belief-update && npm run test:hosted-config && npm run test:operational-summary && npm run test:operational-dashboard && npm run test:operator-artifacts && npm run test:operator-key-auth && npm run test:cloudflare-sandbox && npm run test:mcp-config && npm run test:plan-gate && npm run test:pulse && npm run test:semantic-layer && npm run test:data-pipeline && npm run test:optimize-context && npm run test:principle-extractor && npm run test:analytics-window && npm run test:funnel-analytics && npm run test:experiment-tracker && npm run test:build-metadata && npm run test:context-engine && npm run test:hf-papers && npm run test:marketing-experiment && npm run test:seo-gsd && npm run test:verify-run && npm run test:export-dpo-pairs && npm run test:export-hf-dataset && npm run test:license && npm run test:bot-detector && npm run test:audit-pr-bot-contamination && npm run test:stripe-bootstrap-saas-catalog && npm run test:postinstall && npm run test:funnel-invariants && npm run test:cli-telemetry && npm run test:pro-parity && npm run test:model-tier-router && npm run test:computer-use-firewall && npm run test:skill-exporter && npm run test:statusline && npm run test:evolution && npm run test:org-dashboard && npm run test:multi-hop-recall && npm run test:synthetic-dpo && npm run test:thumbgate-skill && npm run test:learn-hub && npm run test:feedback-fallback && npm run test:metaclaw && npm run test:server-lock && npm run test:control-tower && npm run test:pii-scanner && npm run test:data-governance && npm run test:lesson-inference && npm run test:semantic-dedup && npm run test:fs-utils && npm run test:cli-schema && npm run test:explore && npm run test:lesson-reranker && npm run test:lesson-retrieval && npm run test:cross-encoder && npm run test:reflector-agent && npm run test:feedback-session && npm run test:feedback-history-distiller && npm run test:hallucination-detector && npm run test:history-distiller && npm run test:predictive-insights && npm run test:prove-predictive-insights && npm run test:statusbar-cli && npm run test:generate-instagram-card && npm run test:instagram-thumbgate-post && npm run test:publish-instagram-thumbgate && npm run test:lesson-synthesis && npm run test:lesson-canonical && npm run test:background-governance && npm run test:memory-migration && npm run test:prompt-dlp && npm run test:ephemeral-store && npm run test:agent-security && npm run test:skill-progressive && npm run test:per-step-scoring && npm run test:weekly-auto-post && npm run test:social-post-hourly && npm run test:social-quality-gate && npm run test:a2ui-engine && npm run test:gate-satisfy && npm run test:money-watcher && npm run test:budget && npm run test:quick-start && npm run test:utm && npm run test:product-feedback && npm run test:feedback-root-consolidator && npm run test:engagement-audit && npm run test:install-growth-automation && npm run test:publish-thumbgate-launch && npm run test:community-course-platform-launch-kit && npm run test:reconcile-thumbgate-campaign && npm run test:reddit-publisher && npm run test:schedule-thumbgate-campaign && npm run test:social-reply-monitor && npm run test:social-dedupe-cleanup && npm run test:sync-launch-assets && npm run test:ai-search-visibility && npm run test:perplexity && npm run test:security-scanner && npm run test:llm-client && npm run test:managed-lesson-agent && npm run test:self-distill && npm run test:meta-agent && npm run test:harness-selector && npm run test:thumbgate-bench && npm run test:seo-guides && npm run test:enforcement-loop && npm run test:cli-agent-experience && npm run test:bot-detection && npm run test:checkout-archived-product-guard && npm run test:postgres-guard && npm run test:checkout-bot-guard && npm run test:checkout-pro-confirmation-gate && npm run test:session-health && npm run test:session-episodes && npm run test:spec-gate && npm run test:decision-trace && npm run test:dashboard-insights && npm run test:telemetry-tracked-link-slug && npm run test:prompt-eval && npm run test:demo-voiceover && npm run test:gate-coherence && npm run test:gate-eval && npm run test:high-roi && npm run test:public-static-assets && npm run test:token-savings && npm run test:numbers-page && npm run test:workflow-gate-checkpoint && npm run test:lesson-export-import && npm run test:landing-page-claims && npm run test:competitive-positioning-marketing && npm run test:medium-weekly && npm run test:dashboard-deeplink-e2e && npm run test:public-package-parity && npm run test:token-savings-dashboard && npm run test:cursor-wiring && npm run test:pretooluse-injection && npm run test:recent-corrective-context && npm run test:durability-step && npm run test:mailer && npm run test:brand-assets && npm run test:enforcement-teeth && npm run test:bayes-optimal-gate && npm run test:swarm-coordinator && npm run test:session-report && npm run test:agent-reasoning-traces && npm run test:judge-reward && npm run test:llm-behavior-monitor && npm run test:prompting-os && npm run test:single-use-credential-gate && npm run test:structured-prompt-driven && npm run test:require-evidence-gate && npm run test:rule-validator && npm run test:bluesky-atproto && npm run test:social-reply-monitor-bluesky && npm run test:bluesky-delete-replies && npm run test:architect-kit-memory-bridge && npm run test:sonar-review-hotspots && npm run test:actionable-remediations && npm run test:gemini-embedding-policy && npm run test:agent-design-governance && npm run test:public-core-boundary && npm run test:hook-stop-verify-deploy && npm run test:hook-stop-anti-claim && npm run test:plausible-server-events && npm run test:activation-tracker && npm run test:unified-revenue-rollup && npm run test:conversion-rate-stats && npm run test:external-customer-audit && npm run test:telemetry-export && npm run test:stripe-checkout-diagnostic && npm run test:stripe-business-identity-probe && npm run test:revenue-observability-doctor && npm run test:public-bundle-ratchet && npm run test:stripe-payment-link-update && npm run test:ci-cd-hygiene-audit && npm run test:verify-marketing-pages-deployed && npm run test:install-email-capture",
341
+ "test": "npm run test:python && npm run test:schema && npm run test:loop && npm run test:dpo && npm run test:kto && npm run test:api && npm run test:proof && npm run test:e2e && npm run test:rlaif && npm run test:attribution && npm run test:quality && npm run test:intelligence && npm run test:training-export && npm run test:deployment && npm run test:operational-integrity && npm run test:workflow && npm run test:billing && npm run test:cli && npm run test:watcher && npm run test:autoresearch && npm run test:ops && npm run test:session-analyzer && npm run test:tessl && npm run test:gates && npm run test:evoskill && npm run test:gates-hardening && npm run test:workers && npm run test:social-analytics && npm run test:memalign && npm run test:xmemory-lite && npm run test:filesystem-search && npm run test:zernio && npm run test:platform-limits && npm run test:post-video && npm run test:post-everywhere-instagram && npm run test:post-everywhere-channels && npm run test:post-everywhere-zernio-default && npm run test:zernio-canonical-pollers && npm run test:zernio-status && npm run test:obsidian-export && npm run test:lesson-db && npm run test:lesson-rotation && npm run test:memory-dedup && npm run test:feedback-quality && npm run test:sync-version && npm run test:check-congruence && npm run test:tool-registry && npm run test:feedback-to-rules && npm run test:memory-firewall && npm run test:memory-scope-readiness && npm run test:belief-update && npm run test:hosted-config && npm run test:operational-summary && npm run test:operational-dashboard && npm run test:operator-artifacts && npm run test:operator-key-auth && npm run test:cloudflare-sandbox && npm run test:mcp-config && npm run test:plan-gate && npm run test:pulse && npm run test:semantic-layer && npm run test:data-pipeline && npm run test:optimize-context && npm run test:principle-extractor && npm run test:analytics-window && npm run test:funnel-analytics && npm run test:experiment-tracker && npm run test:build-metadata && npm run test:context-engine && npm run test:hf-papers && npm run test:marketing-experiment && npm run test:seo-gsd && npm run test:verify-run && npm run test:export-dpo-pairs && npm run test:export-hf-dataset && npm run test:license && npm run test:bot-detector && npm run test:audit-pr-bot-contamination && npm run test:stripe-bootstrap-saas-catalog && npm run test:postinstall && npm run test:funnel-invariants && npm run test:cli-telemetry && npm run test:pro-parity && npm run test:model-tier-router && npm run test:computer-use-firewall && npm run test:skill-exporter && npm run test:statusline && npm run test:evolution && npm run test:org-dashboard && npm run test:multi-hop-recall && npm run test:synthetic-dpo && npm run test:thumbgate-skill && npm run test:learn-hub && npm run test:feedback-fallback && npm run test:metaclaw && npm run test:server-lock && npm run test:control-tower && npm run test:pii-scanner && npm run test:data-governance && npm run test:lesson-inference && npm run test:semantic-dedup && npm run test:fs-utils && npm run test:cli-schema && npm run test:explore && npm run test:lesson-reranker && npm run test:lesson-retrieval && npm run test:cross-encoder && npm run test:reflector-agent && npm run test:feedback-session && npm run test:feedback-history-distiller && npm run test:hallucination-detector && npm run test:history-distiller && npm run test:predictive-insights && npm run test:prove-predictive-insights && npm run test:statusbar-cli && npm run test:generate-instagram-card && npm run test:instagram-thumbgate-post && npm run test:publish-instagram-thumbgate && npm run test:lesson-synthesis && npm run test:lesson-canonical && npm run test:background-governance && npm run test:memory-migration && npm run test:prompt-dlp && npm run test:ephemeral-store && npm run test:agent-security && npm run test:skill-progressive && npm run test:per-step-scoring && npm run test:weekly-auto-post && npm run test:social-post-hourly && npm run test:social-quality-gate && npm run test:a2ui-engine && npm run test:gate-satisfy && npm run test:money-watcher && npm run test:budget && npm run test:quick-start && npm run test:utm && npm run test:product-feedback && npm run test:feedback-root-consolidator && npm run test:engagement-audit && npm run test:install-growth-automation && npm run test:publish-thumbgate-launch && npm run test:community-course-platform-launch-kit && npm run test:reconcile-thumbgate-campaign && npm run test:reddit-publisher && npm run test:schedule-thumbgate-campaign && npm run test:social-reply-monitor && npm run test:social-dedupe-cleanup && npm run test:sync-launch-assets && npm run test:ai-search-visibility && npm run test:perplexity && npm run test:security-scanner && npm run test:llm-client && npm run test:managed-lesson-agent && npm run test:self-distill && npm run test:meta-agent && npm run test:harness-selector && npm run test:thumbgate-bench && npm run test:seo-guides && npm run test:enforcement-loop && npm run test:cli-agent-experience && npm run test:bot-detection && npm run test:checkout-archived-product-guard && npm run test:postgres-guard && npm run test:checkout-bot-guard && npm run test:checkout-pro-confirmation-gate && npm run test:session-health && npm run test:session-episodes && npm run test:spec-gate && npm run test:decision-trace && npm run test:dashboard-insights && npm run test:telemetry-tracked-link-slug && npm run test:prompt-eval && npm run test:demo-voiceover && npm run test:gate-coherence && npm run test:gate-eval && npm run test:high-roi && npm run test:public-static-assets && npm run test:token-savings && npm run test:numbers-page && npm run test:workflow-gate-checkpoint && npm run test:lesson-export-import && npm run test:landing-page-claims && npm run test:competitive-positioning-marketing && npm run test:medium-weekly && npm run test:dashboard-deeplink-e2e && npm run test:public-package-parity && npm run test:token-savings-dashboard && npm run test:cursor-wiring && npm run test:pretooluse-injection && npm run test:recent-corrective-context && npm run test:durability-step && npm run test:mailer && npm run test:brand-assets && npm run test:enforcement-teeth && npm run test:bayes-optimal-gate && npm run test:swarm-coordinator && npm run test:session-report && npm run test:agent-reasoning-traces && npm run test:judge-reward && npm run test:llm-behavior-monitor && npm run test:prompting-os && npm run test:single-use-credential-gate && npm run test:structured-prompt-driven && npm run test:require-evidence-gate && npm run test:rule-validator && npm run test:bluesky-atproto && npm run test:social-reply-monitor-bluesky && npm run test:bluesky-delete-replies && npm run test:architect-kit-memory-bridge && npm run test:sonar-review-hotspots && npm run test:actionable-remediations && npm run test:gemini-embedding-policy && npm run test:agent-design-governance && npm run test:public-core-boundary && npm run test:hook-stop-verify-deploy && npm run test:hook-stop-anti-claim && npm run test:plausible-server-events && npm run test:activation-tracker && npm run test:unified-revenue-rollup && npm run test:conversion-rate-stats && npm run test:external-customer-audit && npm run test:telemetry-export && npm run test:stripe-checkout-diagnostic && npm run test:stripe-business-identity-probe && npm run test:revenue-observability-doctor && npm run test:public-bundle-ratchet && npm run test:stripe-payment-link-update && npm run test:ci-cd-hygiene-audit && npm run test:verify-marketing-pages-deployed && npm run test:install-email-capture && npm run test:install-shim && npm run test:hook-runtime-subcommands && npm run test:implementation-notes && npm run test:daily-block-cap && npm run test:free-to-paid-conversion-units && npm run test:metrics-real-endpoint && npm run test:cli-trial-and-help && npm run test:cost-cli && npm run test:silent-failure-cluster",
337
342
  "test:hook-stop-verify-deploy": "node --test tests/hook-stop-verify-deploy.test.js",
338
343
  "test:hook-stop-anti-claim": "node --test tests/hook-stop-anti-claim.test.js",
339
344
  "test:plausible-server-events": "node --test tests/plausible-server-events.test.js",
@@ -443,10 +448,10 @@
443
448
  "test:evolution": "node --test tests/workspace-evolver.test.js",
444
449
  "test:watcher": "node --test tests/jsonl-watcher.test.js",
445
450
  "test:autoresearch": "node --test tests/autoresearch.test.js",
446
- "test:ops": "node --test tests/adk-consolidator.test.js tests/anthropic-partner-strategy.test.js tests/auto-promote-gates.test.js tests/auto-wire-hooks.test.js tests/claude-skill.test.js tests/codegraph-context.test.js tests/commercial-signals.test.js tests/decision-journal.test.js tests/delegation-runtime.test.js tests/disagreement-mining.test.js tests/failure-diagnostics.test.js tests/gate-stats.test.js tests/git-hook-installer.test.js tests/github-billing.test.js tests/intervention-policy.test.js tests/markdown-escape.test.js tests/mcp-tools-gates.test.js tests/native-messaging-audit.test.js tests/project-bayes-e2e.test.js tests/project-bayes.test.js tests/rate-limiter.test.js tests/schedule-manager.test.js tests/session-handoff.test.js tests/skill-generator.test.js tests/smart-learning.test.js tests/spike-and-sink.test.js tests/stripe-revenue.test.js tests/stripe-webhook-route.test.js tests/stripe-webhook-rotation.test.js tests/train-from-feedback.test.js tests/workflow-hardening-sprint.test.js tests/workflow-sentinel.test.js tests/test-suite-parity.test.js tests/a2ui-engine.test.js tests/webhook-delivery.test.js",
451
+ "test:ops": "node --test tests/adk-consolidator.test.js tests/anthropic-partner-strategy.test.js tests/auto-promote-gates.test.js tests/auto-wire-hooks.test.js tests/claude-skill.test.js tests/codegraph-context.test.js tests/commercial-signals.test.js tests/decision-journal.test.js tests/delegation-runtime.test.js tests/disagreement-mining.test.js tests/failure-diagnostics.test.js tests/gate-stats.test.js tests/gates-engine-upgrade-cta.test.js tests/git-hook-installer.test.js tests/github-billing.test.js tests/intervention-policy.test.js tests/markdown-escape.test.js tests/mcp-tools-gates.test.js tests/native-messaging-audit.test.js tests/project-bayes-e2e.test.js tests/project-bayes.test.js tests/rate-limiter.test.js tests/schedule-manager.test.js tests/session-handoff.test.js tests/skill-generator.test.js tests/smart-learning.test.js tests/spike-and-sink.test.js tests/stripe-revenue.test.js tests/stripe-webhook-route.test.js tests/stripe-webhook-rotation.test.js tests/train-from-feedback.test.js tests/workflow-hardening-sprint.test.js tests/workflow-sentinel.test.js tests/test-suite-parity.test.js tests/a2ui-engine.test.js tests/webhook-delivery.test.js tests/auto-context-packs.test.js tests/daily-block-cap.test.js",
447
452
  "test:session-analyzer": "node --test tests/session-analyzer.test.js",
448
453
  "test:tessl": "node --test tests/tessl-export.test.js",
449
- "test:gates": "node --test tests/gate-templates.test.js tests/gates-engine.test.js tests/claim-verification.test.js tests/secret-scanner.test.js tests/secret-fixture-safety.test.js tests/prompt-guard.test.js tests/audit-trail.test.js tests/profile-router.test.js tests/workflow-sentinel.test.js tests/docker-sandbox-planner.test.js",
454
+ "test:gates": "node --test tests/gate-templates.test.js tests/gates-engine.test.js tests/claim-verification.test.js tests/secret-scanner.test.js tests/secret-fixture-safety.test.js tests/prompt-guard.test.js tests/audit-trail.test.js tests/profile-router.test.js tests/workflow-sentinel.test.js tests/docker-sandbox-planner.test.js tests/mcp-tools-suggest-fix.test.js",
450
455
  "test:budget": "node --test tests/budget-enforcer.test.js",
451
456
  "test:workers": "npm --prefix workers ci && npm --prefix workers test",
452
457
  "test:evoskill": "node --test tests/evoskill.test.js",
@@ -598,6 +603,7 @@
598
603
  "agent:schedule": "node scripts/schedule-manager.js install --label managed-lesson-agent --spec 'daily 02:00' --command 'npm run agent:run' --workingDirectory .",
599
604
  "feedback:rules:llm": "node scripts/feedback-to-rules.js --llm",
600
605
  "test:self-distill": "node --test tests/self-distill-agent.test.js",
606
+ "test:silent-failure-cluster": "node --test tests/silent-failure-cluster.test.js",
601
607
  "test:seo-guides": "node --test tests/seo-guides.test.js",
602
608
  "self-distill:run": "node scripts/self-distill-agent.js",
603
609
  "self-distill:dry": "node scripts/self-distill-agent.js --dry-run",
@@ -632,6 +638,7 @@
632
638
  "test:high-roi": "node --test tests/high-roi.test.js tests/model-candidates.test.js tests/autonomous-workflow.test.js tests/high-roi-agent-workflows.test.js tests/interaction-model.test.js tests/interaction-model-e2e.test.js tests/code-graph-guardrails.test.js tests/proxy-pointer-rag-guardrails.test.js tests/rag-precision-guardrails.test.js tests/ai-engineering-stack-guardrails.test.js tests/long-running-agent-context-guardrails.test.js tests/reasoning-efficiency-guardrails.test.js tests/deepseek-v4-runtime-guardrails.test.js tests/upstream-contribution-engine.test.js tests/proactive-agent-eval-guardrails.test.js tests/reward-hacking-guardrails.test.js tests/chatgpt-ads-readiness-pack.test.js tests/oss-pr-opportunity-scout.test.js tests/agent-design-governance.test.js tests/gemini-embedding-policy.test.js tests/openclaw-agent-governance-kit.test.js",
633
639
  "test:public-static-assets": "node --test tests/public-static-assets.test.js",
634
640
  "test:token-savings": "node --test tests/token-savings.test.js",
641
+ "test:cost-cli": "node --test tests/cost-cli.test.js",
635
642
  "test:numbers-page": "node --test tests/numbers-page.test.js",
636
643
  "test:workflow-gate-checkpoint": "node --test tests/workflow-gate-checkpoint.test.js tests/autonomous-workflow.test.js",
637
644
  "workflow:autonomous": "node scripts/autonomous-workflow.js",
@@ -640,6 +647,10 @@
640
647
  "test:competitive-positioning-marketing": "node --test tests/competitive-positioning-marketing.test.js tests/knowledge-graph-guardrails.test.js tests/supply-chain-guardrails.test.js",
641
648
  "test:medium-weekly": "node --test tests/medium-weekly.test.js",
642
649
  "test:dashboard-deeplink-e2e": "node --test tests/dashboard-deeplink-e2e.test.js",
650
+ "test:e2e:playwright": "playwright test",
651
+ "test:e2e:playwright:headed": "playwright test --headed",
652
+ "test:e2e:playwright:ui": "playwright test --ui",
653
+ "test:e2e:playwright:report": "playwright show-report",
643
654
  "test:public-package-parity": "node --test tests/public-package-parity.test.js",
644
655
  "prepare": "bash bin/install-hooks.sh >/dev/null 2>&1 || true",
645
656
  "install:hooks": "bash bin/install-hooks.sh",
@@ -656,7 +667,19 @@
656
667
  "test:stripe-payment-link-update": "node --test tests/stripe-payment-link-update.test.js",
657
668
  "test:verify-marketing-pages-deployed": "node --test tests/verify-marketing-pages-deployed.test.js",
658
669
  "verify:marketing-pages": "node scripts/verify-marketing-pages-deployed.js",
659
- "test:install-email-capture": "node --test tests/install-email-capture.test.js"
670
+ "test:install-email-capture": "node --test tests/install-email-capture.test.js",
671
+ "test:install-shim": "node --test tests/install-shim.test.js",
672
+ "test:hook-runtime-subcommands": "node --test tests/hook-runtime-subcommands.test.js",
673
+ "test:implementation-notes": "node --test tests/implementation-notes.test.js",
674
+ "test:daily-block-cap": "node --test tests/daily-block-cap.test.js",
675
+ "test:free-to-paid-conversion-units": "node --test tests/free-to-paid-conversion-units.test.js",
676
+ "test:metrics-real-endpoint": "node --test tests/metrics-real-endpoint.test.js",
677
+ "test:cli-trial-and-help": "node --test tests/cli-trial-and-help.test.js",
678
+ "test:lessons-page-clickability": "playwright test tests/e2e/lessons-page-clickability.spec.js",
679
+ "test:index-page-clickability": "playwright test tests/e2e/index-page-clickability.spec.js",
680
+ "test:dashboard-page-clickability": "playwright test tests/e2e/dashboard-page-clickability.spec.js",
681
+ "test:agent-manager-page-clickability": "playwright test tests/e2e/agent-manager-page-clickability.spec.js",
682
+ "test:pricing-page-clickability": "playwright test tests/e2e/pricing-page-clickability.spec.js"
660
683
  },
661
684
  "keywords": [
662
685
  "mcp",
@@ -731,6 +754,7 @@
731
754
  "devDependencies": {
732
755
  "@changesets/changelog-github": "^0.7.0",
733
756
  "@changesets/cli": "^2.31.0",
757
+ "@playwright/test": "^1.60.0",
734
758
  "c8": "^11.0.0",
735
759
  "undici": "^8.2.0"
736
760
  }
@@ -76,7 +76,7 @@
76
76
  </tr>
77
77
  <tr>
78
78
  <td><strong>Plugin marketplace</strong><br>Deciding which Claude Code / Cursor / Codex plugins are blessed and which are not.</td>
79
- <td>ThumbGate ships as a Claude Code plugin, a Cursor extension, a Codex plugin, and a Gemini CLI hook. One install, every supported agent. Adapter compatibility matrix kept current as runtimes change.</td>
79
+ <td>ThumbGate ships as a Claude Code plugin, a Cursor extension (Marketplace listing pending Cursor's review since 2026-05-19; runtime install works today via <code>npx thumbgate init --agent cursor</code>), a Codex plugin, and a Gemini CLI hook. One install, every supported agent. Adapter compatibility matrix kept current as runtimes change.</td>
80
80
  </tr>
81
81
  <tr>
82
82
  <td><strong>Permissions policy</strong><br>What an agent is allowed to execute, against which surfaces, with which evidence required.</td>
@@ -0,0 +1,151 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>FinOps for AI Agents — ThumbGate prevents the spend FinOps tools just report on</title>
7
+ <script defer data-domain="thumbgate-production.up.railway.app" src="https://plausible.io/js/script.js"></script>
8
+ <meta name="description" content="Most FinOps platforms report on AI agent spend after it happens. ThumbGate is the runtime layer that prevents the wasted tool calls in the first place — and prints the dollar amount you saved.">
9
+ <meta property="og:title" content="FinOps for AI Agents — Prevention, Not Reporting">
10
+ <meta property="og:description" content="Cost dashboards tell you what your agents wasted last week. ThumbGate's PreToolUse gates stop the wasted tool calls before they fire — and `thumbgate cost` shows you the dollar amount.">
11
+ <meta property="og:type" content="article">
12
+ <meta property="og:image" content="https://thumbgate-production.up.railway.app/og.png">
13
+ <link rel="canonical" href="https://thumbgate-production.up.railway.app/agents-cost-savings">
14
+ <script type="application/ld+json">
15
+ {
16
+ "@context": "https://schema.org",
17
+ "@type": "TechArticle",
18
+ "headline": "FinOps for AI Agents — Prevention vs. Reporting",
19
+ "description": "Cost dashboards report agent spend after it happens. ThumbGate's runtime gates prevent the wasted tool calls in the first place, and `thumbgate cost` prints the dollar amount saved.",
20
+ "datePublished": "2026-05-21",
21
+ "dateModified": "2026-05-21",
22
+ "author": { "@type": "Person", "name": "Igor Ganapolsky", "url": "https://github.com/IgorGanapolsky" },
23
+ "publisher": { "@type": "Organization", "name": "ThumbGate", "url": "https://thumbgate-production.up.railway.app" },
24
+ "about": [
25
+ { "@type": "Thing", "name": "FinOps for AI" },
26
+ { "@type": "Thing", "name": "Agent Cost Optimization" },
27
+ { "@type": "Thing", "name": "LLM Token Savings" },
28
+ { "@type": "Thing", "name": "PreToolUse Gates" }
29
+ ]
30
+ }
31
+ </script>
32
+ <style>
33
+ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
34
+ :root { --bg:#0a0a0b; --card:#161618; --border:#222225; --text:#e8e8ec; --muted:#8b8b94; --cyan:#22d3ee; --green:#34d399; }
35
+ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
36
+ .container { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
37
+ nav { padding: 1rem 2rem; border-bottom: 1px solid var(--border); display:flex; gap:1.5rem; flex-wrap:wrap; }
38
+ nav a { color: var(--muted); text-decoration:none; font-size:0.9rem; }
39
+ nav .brand { color: var(--text); font-weight:700; }
40
+ .pill { display:inline-block; font-size:0.75rem; letter-spacing:0.08em; text-transform:uppercase; color:var(--cyan); background:rgba(34,211,238,0.08); border:1px solid rgba(34,211,238,0.2); padding:4px 12px; border-radius:100px; margin-top:1.5rem; font-weight:600; }
41
+ h1 { font-size:2.2rem; line-height:1.15; margin:1rem 0 1rem; }
42
+ h2 { font-size:1.45rem; margin:2.2rem 0 1rem; color:var(--cyan); }
43
+ h3 { margin:0.6rem 0; font-size:1rem; }
44
+ p, li { margin-bottom:0.75rem; }
45
+ ul, ol { padding-left:1.25rem; }
46
+ .card { background: var(--card); border:1px solid var(--border); border-radius:12px; padding:1.25rem; margin:1rem 0; }
47
+ .grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin:1rem 0; }
48
+ .grid .card h3 { color:var(--cyan); }
49
+ .cta { display:inline-block; background:var(--cyan); color:#000; padding:0.8rem 1.2rem; border-radius:8px; text-decoration:none; font-weight:700; }
50
+ .secondary { color:var(--cyan); text-decoration:underline; margin-left:1rem; }
51
+ .quote { border-left:3px solid var(--cyan); padding:0.75rem 1rem; margin:1rem 0; color:var(--muted); font-style:italic; }
52
+ code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background:#0f0f11; border:1px solid var(--border); border-radius:6px; padding:0.15rem 0.4rem; font-size:0.9rem; }
53
+ pre { padding:0.85rem 1rem; overflow-x:auto; }
54
+ .footer-links { margin-top:2.5rem; padding-top:1.25rem; border-top:1px solid var(--border); color:var(--muted); font-size:0.9rem; }
55
+ .footer-links a { color:var(--cyan); text-decoration:none; }
56
+ table.compare { width:100%; border-collapse:collapse; margin:1rem 0; }
57
+ table.compare th, table.compare td { padding:0.6rem 0.8rem; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
58
+ table.compare th { color:var(--cyan); font-size:0.85rem; text-transform:uppercase; letter-spacing:0.05em; }
59
+ .savings-num { color:var(--green); font-weight:700; }
60
+ </style>
61
+ </head>
62
+ <body>
63
+ <nav>
64
+ <a href="/" class="brand">ThumbGate</a>
65
+ <a href="/guide">Guide</a>
66
+ <a href="/agent-manager">Agent Manager</a>
67
+ <a href="/codex-enterprise">Codex Enterprise</a>
68
+ <a href="/dashboard">Dashboard demo</a>
69
+ <a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
70
+ </nav>
71
+ <div class="container">
72
+ <span class="pill">FinOps for AI agents</span>
73
+ <h1>Cost dashboards tell you what your agents wasted last week. ThumbGate stops the waste before it fires.</h1>
74
+ <p>Most AI-spend platforms — Finout, Vantage, the new "AI FinOps Assistant" wave — focus on <em>showing you the bill after the agent ran</em>: cost allocation, anomaly detection, unit economics finance can trust. A few (Helicone's rate limits, Revenium's Economic Control) add coarse runtime enforcement keyed off $ thresholds or request counts. None of them stop the wasted tool call by understanding <em>why</em> it would have failed.</p>
75
+ <p>That's the layer ThumbGate occupies. Every PreToolUse gate that fires is a Claude / GPT call your agent <em>did not</em> make — input tokens you didn't spend, output tokens you didn't spend, retry loop you didn't trigger. The savings are computable, conservative, and now surfaced as a number on your CLI.</p>
76
+
77
+ <div class="quote">"74% of CIOs say their role will be at risk if their company does not deliver measurable business gains from AI within the next two years." — <a href="https://www.cio.com/article/4172555/how-it-teams-are-putting-ai-agents-to-work.html" target="_blank" rel="noopener" style="color:var(--cyan);font-style:normal;">CIO Online, 2026</a></div>
78
+ <p>"Measurable" is the operative word. A token-spend dashboard tells finance how much got burned; it doesn't tell the CIO board what was averted. <code>thumbgate cost</code> prints a single conservative dollar figure backed by the gate-block count from <em>your</em> machine — not "what enterprises like you saved." That's the artifact that survives a 2026 budget review.</p>
79
+
80
+ <h2>One command, one number</h2>
81
+ <p>Once ThumbGate is installed and gates have been firing, this is what an operator sees:</p>
82
+ <pre><code>$ thumbgate cost
83
+
84
+ 💰 ThumbGate cost-savings — cumulative
85
+ ──────────────────────────────────────────────────
86
+ Tool calls blocked : 247
87
+ Tool calls warned : 12
88
+ Tool calls passed : 3,401
89
+ Top blocker : no-mocked-db (138 blocks)
90
+
91
+ Tokens you did NOT spend
92
+ Input : 494K
93
+ Output : 148K
94
+ Total : 642K
95
+
96
+ Estimated <span class="savings-num">$ saved : $3.95</span></code></pre>
97
+ <p>The methodology is intentionally conservative: 2,000 input + 600 output tokens per blocked call, a Sonnet-heavy model mix (80% Sonnet 4.5, 15% Opus 4.6, 5% Haiku 4.5), Anthropic published prices. The goal is "you almost certainly saved at least this much" — not "let's flatter ourselves." Override the mix with <code>--mix '&#123;"claude-sonnet-4-5":1.0&#125;'</code> if your stack is different.</p>
98
+
99
+ <h2>Prevention vs. reporting</h2>
100
+ <table class="compare">
101
+ <thead>
102
+ <tr><th>Capability</th><th>Reporting-layer FinOps</th><th>ThumbGate (runtime gates)</th></tr>
103
+ </thead>
104
+ <tbody>
105
+ <tr><td>See what agents spent last week</td><td>✅</td><td>Partial (via dashboard)</td></tr>
106
+ <tr><td>Allocate spend to teams / features</td><td>✅</td><td>Per-gate breakdown via <code>byGate</code></td></tr>
107
+ <tr><td>Stop a known-bad tool call before it hits the model</td><td>❌</td><td>✅ — PreToolUse gate fires, no API call made</td></tr>
108
+ <tr><td>Promote a one-off failure into a permanent gate</td><td>❌</td><td>✅ — feedback loop + lesson DB</td></tr>
109
+ <tr><td>Print conservative $ saved per day</td><td>❌</td><td>✅ — <code>thumbgate cost</code></td></tr>
110
+ <tr><td>K8s pod-level allocation, finance-grade reporting</td><td>✅ (that's their core)</td><td>❌ (not our layer)</td></tr>
111
+ </tbody>
112
+ </table>
113
+ <p>The two layers compose. ThumbGate prevents the wasted spend; a reporting FinOps tool tells finance what the remaining spend was for. Picking ThumbGate doesn't mean you don't also need cost visibility — it means the visibility number gets smaller.</p>
114
+
115
+ <h2>Why the savings are real, not theoretical</h2>
116
+ <ol>
117
+ <li><strong>Every block is one fewer round trip.</strong> A blocked tool call doesn't reach the model. There's no "ThumbGate intercepted but the request still cost you" — the agent's tool-call execution is replaced with the gate's verdict, and the agent's next reasoning step takes the verdict as context instead of the failed result.</li>
118
+ <li><strong>The avoided retry loop is the bulk of the saving.</strong> Failed tool calls don't just cost the call — they cost the model's next reasoning turn (which sees the failure and tries again), and often a third turn (which tries a different approach). Conservative 2k input + 600 output assumes one retry; in practice it's often more.</li>
119
+ <li><strong>The numbers come from your local <code>gate-stats.json</code>.</strong> Not from a marketing model, not from "what enterprises like you saved." Your machine, your gates, your blocks.</li>
120
+ </ol>
121
+
122
+ <h2>Get the number on your machine</h2>
123
+ <pre><code>npx thumbgate init # wire the PreToolUse hook
124
+ # ...let your agent run for a few hours...
125
+ npx thumbgate cost # see what the gates were worth</code></pre>
126
+ <p>Or as JSON, if you want to ship it to a dashboard:</p>
127
+ <pre><code>npx thumbgate cost --json | jq .savings.dollarsSaved</code></pre>
128
+
129
+ <div class="quote">"The category isn't 'FinOps for AI' — it's 'gates that stop the spend so FinOps has less to report on.' One sits behind the other."</div>
130
+
131
+ <div class="card">
132
+ <p><strong>The free CLI is real. The paid tier is the hosted dashboard, org-wide rule library, and the operator the Agent Manager doesn't have to be themselves.</strong></p>
133
+ <p>
134
+ <a href="/#workflow-sprint-intake?utm_source=website&amp;utm_medium=agents_cost_savings_page&amp;utm_campaign=finops_sprint&amp;cta_id=agents_cost_savings_sprint_intake&amp;cta_placement=agents_cost_savings_page" class="cta">Start the Workflow Hardening Sprint</a>
135
+ <a href="/checkout/pro?utm_source=website&amp;utm_medium=agents_cost_savings_page&amp;utm_campaign=pro_upgrade&amp;cta_id=agents_cost_savings_pro_checkout&amp;cta_placement=agents_cost_savings_page&amp;plan_id=pro" class="secondary">Or start Pro at $19/mo →</a>
136
+ </p>
137
+ </div>
138
+
139
+ <h2>Related reading</h2>
140
+ <ul>
141
+ <li><a href="/codex-enterprise">ThumbGate for Codex in the Enterprise</a> — the same prevention story for the OpenAI×Dell distribution wave.</li>
142
+ <li><a href="/agent-manager">ThumbGate for the Agent Manager</a> — the role inside the org that owns "what are our agents costing us."</li>
143
+ <li><a href="/dashboard">Dashboard demo</a> — the $ saved number rendered against demo data, so you can see the shape before installing.</li>
144
+ </ul>
145
+
146
+ <div class="footer-links">
147
+ Built for teams who watched their Claude bill spike, installed a FinOps dashboard, and realized the dashboard only told them <em>which</em> failed agent loop ran the meter — not how to stop it.
148
+ </div>
149
+ </div>
150
+ </body>
151
+ </html>
@@ -0,0 +1,183 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Malpractice Prevention for Law Firms — ThumbGate</title>
7
+ <script defer data-domain="thumbgate-production.up.railway.app" src="https://plausible.io/js/script.js"></script>
8
+ <meta name="description" content="Your AI intake agent can commit unauthorized practice of law, miss a conflict, or breach privilege — usually all three. ThumbGate physically blocks each at the tool-call boundary, with an audit trail your malpractice carrier can read.">
9
+ <meta property="og:title" content="AI Malpractice Prevention for Law Firms">
10
+ <meta property="og:description" content="Runtime governance for legal AI agents — block UPL, miss-conflict, and privilege breach at the tool-call boundary. ABA Formal Op. 512-ready audit trail.">
11
+ <meta property="og:type" content="article">
12
+ <meta property="og:image" content="https://thumbgate-production.up.railway.app/og.png">
13
+ <link rel="canonical" href="https://thumbgate-production.up.railway.app/ai-malpractice-prevention">
14
+ <script type="application/ld+json">
15
+ {
16
+ "@context": "https://schema.org",
17
+ "@type": "TechArticle",
18
+ "headline": "AI Malpractice Prevention for Law Firms",
19
+ "description": "ThumbGate is a runtime governance layer that physically blocks AI legal-assistant agents from committing unauthorized practice of law, missing conflicts, or breaching privilege.",
20
+ "datePublished": "2026-05-21",
21
+ "dateModified": "2026-05-21",
22
+ "author": { "@type": "Person", "name": "Igor Ganapolsky", "url": "https://github.com/IgorGanapolsky" },
23
+ "publisher": { "@type": "Organization", "name": "ThumbGate", "url": "https://thumbgate-production.up.railway.app" },
24
+ "about": [
25
+ { "@type": "Thing", "name": "Legal AI" },
26
+ { "@type": "Thing", "name": "Unauthorized Practice of Law" },
27
+ { "@type": "Thing", "name": "Attorney-Client Privilege" },
28
+ { "@type": "Thing", "name": "ABA Model Rules" },
29
+ { "@type": "Thing", "name": "Conflict of Interest Check" }
30
+ ]
31
+ }
32
+ </script>
33
+ <style>
34
+ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
35
+ :root { --bg:#0a0a0b; --card:#161618; --border:#222225; --text:#e8e8ec; --muted:#8b8b94; --cyan:#22d3ee; --red:#f87171; --green:#34d399; }
36
+ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
37
+ .container { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
38
+ nav { padding: 1rem 2rem; border-bottom: 1px solid var(--border); display:flex; gap:1.5rem; flex-wrap:wrap; }
39
+ nav a { color: var(--muted); text-decoration:none; font-size:0.9rem; }
40
+ nav .brand { color: var(--text); font-weight:700; }
41
+ .pill { display:inline-block; font-size:0.75rem; letter-spacing:0.08em; text-transform:uppercase; color:var(--cyan); background:rgba(34,211,238,0.08); border:1px solid rgba(34,211,238,0.2); padding:4px 12px; border-radius:100px; margin-top:1.5rem; font-weight:600; }
42
+ h1 { font-size:2.2rem; line-height:1.15; margin:1rem 0 1rem; }
43
+ h2 { font-size:1.45rem; margin:2.2rem 0 1rem; color:var(--cyan); }
44
+ h3 { margin:0.6rem 0; font-size:1rem; }
45
+ p, li { margin-bottom:0.75rem; }
46
+ ul, ol { padding-left:1.25rem; }
47
+ .card { background: var(--card); border:1px solid var(--border); border-radius:12px; padding:1.25rem; margin:1rem 0; }
48
+ .grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1rem; margin:1rem 0; }
49
+ .grid .card h3 { color:var(--cyan); }
50
+ .scenario { border-left:3px solid var(--red); padding:0.9rem 1.1rem; margin:1rem 0; background:rgba(248,113,113,0.04); border-radius:6px; }
51
+ .scenario .label { display:inline-block; font-size:0.7rem; letter-spacing:0.08em; text-transform:uppercase; color:var(--red); font-weight:700; margin-bottom:0.5rem; }
52
+ .scenario .resolve { display:inline-block; font-size:0.7rem; letter-spacing:0.08em; text-transform:uppercase; color:var(--green); font-weight:700; margin:0.6rem 0 0.3rem; }
53
+ .cta { display:inline-block; background:var(--cyan); color:#000; padding:0.8rem 1.2rem; border-radius:8px; text-decoration:none; font-weight:700; }
54
+ .secondary { color:var(--cyan); text-decoration:underline; margin-left:1rem; }
55
+ .quote { border-left:3px solid var(--cyan); padding:0.75rem 1rem; margin:1rem 0; color:var(--muted); font-style:italic; }
56
+ code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background:#0f0f11; border:1px solid var(--border); border-radius:6px; padding:0.15rem 0.4rem; font-size:0.9rem; }
57
+ pre { padding:0.85rem 1rem; overflow-x:auto; }
58
+ .footer-links { margin-top:2.5rem; padding-top:1.25rem; border-top:1px solid var(--border); color:var(--muted); font-size:0.9rem; }
59
+ .footer-links a { color:var(--cyan); text-decoration:none; }
60
+ table.compliance { width:100%; border-collapse:collapse; margin:1rem 0; font-size:0.95rem; }
61
+ table.compliance th, table.compliance td { padding:0.6rem 0.8rem; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
62
+ table.compliance th { color:var(--cyan); font-size:0.8rem; text-transform:uppercase; letter-spacing:0.05em; }
63
+ .rule-cite { color:var(--cyan); font-weight:600; }
64
+ </style>
65
+ </head>
66
+ <body>
67
+ <nav>
68
+ <a href="/" class="brand">ThumbGate</a>
69
+ <a href="/agent-manager">Agent Manager</a>
70
+ <a href="/codex-enterprise">Codex Enterprise</a>
71
+ <a href="/agents-cost-savings">FinOps for Agents</a>
72
+ <a href="/federal">Federal</a>
73
+ <a href="/dashboard">Dashboard demo</a>
74
+ <a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
75
+ </nav>
76
+ <div class="container">
77
+ <span class="pill">AI Malpractice Prevention</span>
78
+ <h1>Your AI intake agent can commit UPL, miss a conflict, or breach privilege — usually all three. ThumbGate prevents each at the tool-call boundary.</h1>
79
+ <p>2025 produced <strong>66 documented court sanctions against attorneys</strong> for AI-generated fake citations and related failures, with fines up to $31,000. That is just the public surface. The internal events — UPL-shaped responses from intake bots, conflict misses, privilege leaks to external LLM processors — are happening at every firm that deployed generative AI in the last 18 months, and most of them are not yet surfacing in OPR review or malpractice claims because the audit trail to catch them doesn't exist.</p>
80
+ <p>ThumbGate is the runtime layer that catches them <em>before</em> they happen. Every agent action — every API call, every document fetch, every drafted message — passes through a PreToolUse gate that fires before the action executes. Known-bad shapes are blocked with the audit trail your malpractice carrier and your OPR review actually want to read.</p>
81
+ <p>The framing matters: ThumbGate isn't another legal AI tool your innovation team has to vet. It's the <strong>vetting-collapse layer</strong> that sits between the agents you've already adopted — Harvey, Copilot, Legora, internal scripts, whatever a client mandates next quarter — and the tool calls those agents try to make. One control plane, every model, every matter, every output.</p>
82
+
83
+ <h2>The three failure modes ThumbGate prevents</h2>
84
+ <div class="grid">
85
+ <div class="card">
86
+ <h3>1. Unauthorized practice of law <span class="rule-cite">(Rule 5.5)</span></h3>
87
+ <p>The AI intake bot tells a prospect <em>"based on what you've described, you have a strong case for breach of fiduciary duty."</em> That's legal advice from a non-lawyer. Under Rule 5.5 — and under most state bar interpretations — the firm is on the hook. ThumbGate's UPL gate intercepts response candidates that match advice-shaped patterns (predictions, recommendations, outcome assertions) and replaces them with an intake hand-off to a licensed attorney.</p>
88
+ </div>
89
+ <div class="card">
90
+ <h3>2. Missed conflicts <span class="rule-cite">(Rules 1.7, 1.9, 1.10)</span></h3>
91
+ <p>The agent processes a new-client inquiry at 11pm on Sunday, schedules an intake call for Monday, sends a generic engagement letter — and only then runs the conflict check that finds the prospect is the opposing party in an existing matter. By then the firm has already received confidential information from the prospect. ThumbGate's conflict gate requires a positive clearance from the firm's adverse-parties list <em>before</em> the agent can accept any intake content beyond the initial routing question.</p>
92
+ </div>
93
+ <div class="card">
94
+ <h3>3. Privilege breach <span class="rule-cite">(Rule 1.6 + state evidence rules)</span></h3>
95
+ <p>An associate uses the firm's AI assistant to summarize a privileged deposition. The agent calls a public LLM endpoint to "improve the summary." Privileged content just left the firm's infrastructure to a third-party processor that has no equivalent privilege protection. ThumbGate's egress gate inspects every outbound API call from agents and blocks transmissions of content matching privilege-policy patterns (matter ID, client name, "Attorney Work Product" markers, custom firm classifiers) to non-approved processors.</p>
96
+ </div>
97
+ </div>
98
+
99
+ <h2>How the prevention actually works</h2>
100
+ <p>The mechanism is deliberately simple. ThumbGate sits between the agent and the world as a hook layer; every tool call the agent attempts (HTTP request, file read, database query, generated response delivery) passes through a <code>PreToolUse</code> gate first. The gate evaluates the proposed action against a lesson database built from your firm's own observed failures plus a library of legal-vertical defaults shipped with the product.</p>
101
+ <ul>
102
+ <li><strong>Promoted rules block known-bad shapes.</strong> When the same failure pattern recurs three or more times — silently, without a human even noticing — silent-failure clustering surfaces it as a candidate rule. A pre-promotion eval verifies precision before it joins the active gate set.</li>
103
+ <li><strong>Every block is logged with provenance.</strong> What was attempted, what rule fired, what corrective action the agent was redirected to. That log is the artifact your malpractice carrier and your OPR review actually want — not a vendor's "trust me" assurance.</li>
104
+ <li><strong>Nothing leaves your boundary.</strong> ThumbGate runs in-process or as a sidecar in your Azure / AWS tenant or on-prem. No client data, no privileged content, no matter metadata traverses our infrastructure. The hosted dashboard is optional and never receives privileged payloads — only counters and rule metadata.</li>
105
+ </ul>
106
+
107
+ <h2>Three scenarios from real firm pain</h2>
108
+
109
+ <div class="scenario">
110
+ <span class="label">Scenario 1 — after-hours UPL</span>
111
+ <p><strong>Without ThumbGate:</strong> Saturday 11 PM. An estate-planning prospect uses the firm's website AI assistant to ask "if I name my brother as executor but he lives in another state, does that cause problems?" The assistant, trained on legal content, replies with a 4-paragraph explanation of out-of-state-executor bonds and tax implications. That's legal advice. The firm's malpractice carrier finds out 8 months later when the prospect (who hired a different firm) sues over an estate dispute and the deposition surfaces the chatbot transcript.</p>
112
+ <span class="resolve">With ThumbGate</span>
113
+ <p>The UPL gate matches the response shape (jurisdictional analysis + recommendation) against the promoted rule for "advice-shaped output from non-attorney source." The assistant's response is intercepted before delivery and replaced with: <em>"That's a legal question that needs a licensed attorney in your state. I can book you a 30-min consult with one of our estate-planning attorneys — would Monday at 10 AM work?"</em> The intake gets scheduled, the firm captures the lead, no UPL ever occurs, and the audit log shows the firm prevented the failure mode.</p>
114
+ </div>
115
+
116
+ <div class="scenario">
117
+ <span class="label">Scenario 2 — adverse-party conflict miss</span>
118
+ <p><strong>Without ThumbGate:</strong> A junior associate uses the firm's AI document-fetcher agent to pull "all recent filings involving Acme Corporation" for due diligence on a new M&A engagement. The agent retrieves dozens of documents — including filings from a matter where the firm represents Acme's largest competitor. Privileged work product from the existing matter now sits in the associate's local cache. The firm has just created a screen problem at minimum; at worst, a disqualification motion six weeks later.</p>
119
+ <span class="resolve">With ThumbGate</span>
120
+ <p>The conflict gate fires on every document-fetch tool call. Before the fetch executes, it cross-references the requesting matter ID against the firm's adverse-parties list. The Acme-competitor matter is flagged. The fetch is blocked and the agent is redirected to: <em>"Acme Corporation appears as an adverse party in matter [REDACTED]. This fetch is blocked. Contact [matter-attorney email] to discuss whether an ethics screen is needed before proceeding."</em> No cross-contamination, no waiver risk.</p>
121
+ </div>
122
+
123
+ <div class="scenario">
124
+ <span class="label">Scenario 3 — egress privilege breach</span>
125
+ <p><strong>Without ThumbGate:</strong> A partner pastes a 200-page deposition transcript into the firm's "AI Brief Assistant" and asks for a summary. The Brief Assistant, under the hood, calls an external LLM API for the long-context summarization step because the in-house model's context window is too short. Privileged deposition content just left the firm's network to a vendor whose terms of service include "we may use submitted content to improve our models." Privilege waiver argument waiting to happen.</p>
126
+ <span class="resolve">With ThumbGate</span>
127
+ <p>The egress gate inspects every outbound API call. The deposition's metadata header includes the firm's "Attorney Work Product" marker. The call to the external LLM is blocked. The agent is redirected to a privilege-safe alternative: in-tenant summarization via the firm's Azure OpenAI deployment (which carries the firm's BAA) or chunked summarization that stays inside the model's context window. The transcript never leaves the firm's boundary; the audit log records the block.</p>
128
+ </div>
129
+
130
+ <h2>Compliance matrix — what ThumbGate maps to</h2>
131
+ <table class="compliance">
132
+ <thead>
133
+ <tr><th>Authority</th><th>Requirement</th><th>ThumbGate's mechanism</th></tr>
134
+ </thead>
135
+ <tbody>
136
+ <tr><td>ABA Model Rule 1.1 + cmt. 8</td><td>Competence in the benefits and risks of relevant technology</td><td>Audit trail of every agent action gives partners evidence of supervision-grade understanding</td></tr>
137
+ <tr><td>ABA Model Rule 1.6</td><td>Protect confidential information</td><td>Egress gate blocks outbound calls carrying client-confidential or privileged content to non-approved processors</td></tr>
138
+ <tr><td>ABA Model Rule 5.3</td><td>Supervise non-lawyer assistance, including AI tools</td><td>Per-call evidence + per-rule provenance is the supervision artifact</td></tr>
139
+ <tr><td>ABA Model Rule 5.5</td><td>No unauthorized practice of law</td><td>UPL gate intercepts advice-shaped output from non-attorney agents pre-delivery</td></tr>
140
+ <tr><td>ABA Formal Op. 512 (Jul 2024)</td><td>Verify AI output, protect confidentiality, consider client disclosure</td><td>Audit trail covers the verification + disclosure questions in one artifact</td></tr>
141
+ <tr><td>Rules 1.7 / 1.9 / 1.10</td><td>Conflict of interest screening</td><td>Conflict gate requires positive clearance against adverse-parties list before agent can accept intake content</td></tr>
142
+ </tbody>
143
+ </table>
144
+
145
+ <h2>Why this is the Chief Pricing & Innovation Officer's problem (not just the GC's)</h2>
146
+ <p>Every alternative-fee arrangement carries an implicit risk reserve against malpractice tail events. A single sanction, disqualification motion, or bar complaint compresses AFA margins for the entire vintage of matters affected. The events ThumbGate prevents are precisely the events that trigger reserves. Framed in pricing terms, the runtime gate is a <strong>reserve-cost reduction control</strong>: prevented sanctions are dollars not held against alternative-fee matter margins. The audit trail is the artifact the firm's malpractice carrier reads when arguing for a premium reduction at the next renewal.</p>
147
+ <p>Standardization gets easier the same way. Each new client mandate ("you must use Tool X for our matters, you may not use Tool Y") becomes a policy update at the gate, not a per-tool re-vetting cycle. The vetting work that takes calendar weeks today becomes a one-line rule in the gate config — applied across every existing agent without re-implementation.</p>
148
+
149
+ <h2>The deployment story (security committee's first objection answered first)</h2>
150
+ <ul>
151
+ <li><strong>Runs inside your boundary.</strong> ThumbGate is a Node.js process that runs as a sidecar in your Azure / AWS / on-prem environment. No client data, no privileged content, no matter metadata traverses our infrastructure.</li>
152
+ <li><strong>Microsoft 365 / Azure OpenAI compatible.</strong> If your firm is on the Microsoft stack, ThumbGate gates calls to your Azure OpenAI endpoint just as cleanly as it gates Anthropic, OpenAI public API, or any other LLM.</li>
153
+ <li><strong>BAA / DPA path.</strong> The optional hosted dashboard (analytics + rule library) carries a BAA. The runtime gate layer carries no BAA need because it never receives PHI / PII / privileged content — only counters and metadata.</li>
154
+ <li><strong>SOC 2 Type II in progress.</strong> Audit underway; final report Q3 2026. Pilot engagements can proceed under SOC 2 Type I + a Vendor Security Questionnaire response on file.</li>
155
+ <li><strong>No model lock-in.</strong> ThumbGate is vendor-neutral on the LLM. It works equally over Claude (Anthropic + AWS Bedrock), GPT-4 (OpenAI + Azure), Gemini, Llama-on-Mosaic, or any HTTP-callable model.</li>
156
+ </ul>
157
+
158
+ <h2>Pilot shape</h2>
159
+ <p>The recommended first engagement is a 30-day pilot focused on a single intake-channel and a single practice-area-specific conflict-list. Two of your attorneys, two of your IT/innovation staff, and one ThumbGate engineer running biweekly sync calls. Pilot deliverable: a documented set of promoted gate rules specific to your firm's risk profile, the audit-trail format reviewed by your malpractice carrier or OPR liaison, and a written go/no-go recommendation on firm-wide rollout. Investment for the pilot is positioned as a Workflow Hardening Sprint — fixed-scope, fixed-price, no per-attorney metering during evaluation.</p>
160
+
161
+ <div class="quote">"The job of legal-AI governance isn't 'tell the model to be more careful.' It's the tool-call boundary, with an audit trail that survives the deposition."</div>
162
+
163
+ <div class="card">
164
+ <p><strong>Next step: a 25-min walkthrough on a hypothetical intake-and-conflict scenario specific to your firm.</strong></p>
165
+ <p>
166
+ <a href="mailto:iganapolsky@gmail.com?subject=ThumbGate%20AI%20Malpractice%20Prevention%20-%20demo%20request&amp;body=Hi%20Igor%2C%0A%0AI%27m%20at%20%5Bfirm%5D%20and%20saw%20your%20AI%20malpractice%20prevention%20page.%20%0A%0AWe%27re%20evaluating%20how%20to%20govern%20our%20agentic%20legal-AI%20deployment%20and%20I%27d%20like%20to%20see%20a%20walkthrough.%20%0A%0AMy%20practice%20area%20is%3A%20%5B%5D%0AThe%20intake%20channel%20we%27re%20most%20worried%20about%3A%20%5B%5D%0A%0ABest%2C" class="cta">Book a 25-min walkthrough</a>
167
+ <a href="/agent-manager" class="secondary">Or read the Agent Manager role framing →</a>
168
+ </p>
169
+ </div>
170
+
171
+ <h2>Related reading</h2>
172
+ <ul>
173
+ <li><a href="/agents-cost-savings">FinOps for AI agents</a> — the cost-control composition for firms running multiple agents across matters.</li>
174
+ <li><a href="/federal">Federal / regulated workloads</a> — the same compliance bones (deployable inside your tenant, audit trail, SOC 2 path) that work for federal also satisfy law-firm professional-responsibility committees.</li>
175
+ <li><a href="/agent-manager">ThumbGate for the Agent Manager</a> — the role inside the firm that owns "what are our agents costing us, and what did we stop them from doing?"</li>
176
+ </ul>
177
+
178
+ <div class="footer-links">
179
+ Built for law firms whose Innovation function has been told to "make AI work in intake and document review" but hasn't been given the safety net that lets their partners sign off without losing sleep. ABA Formal Op. 512 is the bar; ThumbGate is the floor.
180
+ </div>
181
+ </div>
182
+ </body>
183
+ </html>