thumbgate 1.2.0 → 1.4.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 (160) hide show
  1. package/.claude-plugin/README.md +4 -4
  2. package/.claude-plugin/marketplace.json +32 -13
  3. package/.claude-plugin/plugin.json +15 -2
  4. package/.well-known/llms.txt +60 -0
  5. package/.well-known/mcp/server-card.json +1 -1
  6. package/README.md +133 -23
  7. package/adapters/README.md +1 -1
  8. package/adapters/chatgpt/openapi.yaml +168 -0
  9. package/adapters/claude/.mcp.json +2 -2
  10. package/adapters/codex/config.toml +2 -2
  11. package/adapters/mcp/server-stdio.js +85 -2
  12. package/adapters/opencode/opencode.json +1 -1
  13. package/bin/cli.js +215 -19
  14. package/bin/postinstall.js +8 -2
  15. package/config/budget.json +18 -0
  16. package/config/gates/code-edit.json +61 -0
  17. package/config/gates/db-write.json +61 -0
  18. package/config/gates/default.json +154 -3
  19. package/config/gates/deploy.json +61 -0
  20. package/config/github-about.json +2 -1
  21. package/config/merge-quality-checks.json +23 -0
  22. package/config/model-tiers.json +11 -0
  23. package/openapi/openapi.yaml +168 -0
  24. package/package.json +47 -13
  25. package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +1 -1
  26. package/plugins/claude-codex-bridge/.mcp.json +1 -1
  27. package/plugins/claude-codex-bridge/scripts/codex-bridge.js +1 -3
  28. package/plugins/codex-profile/.codex-plugin/plugin.json +1 -1
  29. package/plugins/codex-profile/.mcp.json +1 -1
  30. package/plugins/codex-profile/INSTALL.md +27 -4
  31. package/plugins/codex-profile/README.md +33 -9
  32. package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +1 -1
  33. package/plugins/cursor-marketplace/README.md +2 -2
  34. package/plugins/cursor-marketplace/commands/capture-feedback.md +2 -2
  35. package/plugins/cursor-marketplace/rules/feedback-capture.mdc +3 -3
  36. package/plugins/cursor-marketplace/skills/capture-feedback/SKILL.md +3 -2
  37. package/plugins/opencode-profile/INSTALL.md +1 -1
  38. package/public/blog.html +73 -0
  39. package/public/compare/mem0.html +189 -0
  40. package/public/compare/speclock.html +180 -0
  41. package/public/compare.html +12 -4
  42. package/public/guide.html +5 -5
  43. package/public/guides/claude-code-prevent-repeated-mistakes.html +161 -0
  44. package/public/guides/codex-cli-guardrails.html +158 -0
  45. package/public/guides/cursor-prevent-repeated-mistakes.html +161 -0
  46. package/public/guides/pre-action-gates.html +162 -0
  47. package/public/guides/stop-repeated-ai-agent-mistakes.html +159 -0
  48. package/public/index.html +169 -70
  49. package/public/learn/ai-agent-persistent-memory.html +1 -0
  50. package/public/lessons.html +334 -17
  51. package/public/llm-context.md +140 -0
  52. package/public/pro.html +24 -22
  53. package/scripts/__pycache__/train_from_feedback.cpython-312.pyc +0 -0
  54. package/scripts/access-anomaly-detector.js +1 -1
  55. package/scripts/adk-consolidator.js +1 -5
  56. package/scripts/agent-security-hardening.js +4 -6
  57. package/scripts/agentic-data-pipeline.js +1 -3
  58. package/scripts/async-job-runner.js +1 -5
  59. package/scripts/audit-trail.js +7 -5
  60. package/scripts/background-agent-governance.js +2 -10
  61. package/scripts/billing.js +2 -16
  62. package/scripts/budget-enforcer.js +173 -0
  63. package/scripts/build-codex-plugin.js +152 -0
  64. package/scripts/capture-railway-diagnostics.sh +97 -0
  65. package/scripts/check-congruence.js +133 -15
  66. package/scripts/claude-feedback-sync.js +320 -0
  67. package/scripts/cli-telemetry.js +4 -1
  68. package/scripts/commercial-offer.js +5 -7
  69. package/scripts/content-engine/linkedin-content-generator.js +154 -0
  70. package/scripts/content-engine/output/linkedin-memento-validation.md +17 -0
  71. package/scripts/content-engine/output/linkedin-posts-2026-04-09.md +175 -0
  72. package/scripts/content-engine/reddit-thread-finder.js +154 -0
  73. package/scripts/context-engine.js +21 -6
  74. package/scripts/contextfs.js +33 -44
  75. package/scripts/dashboard.js +104 -0
  76. package/scripts/decision-journal.js +341 -0
  77. package/scripts/delegation-runtime.js +1 -5
  78. package/scripts/distribution-surfaces.js +26 -0
  79. package/scripts/document-intake.js +927 -0
  80. package/scripts/ephemeral-agent-store.js +1 -8
  81. package/scripts/evolution-state.js +1 -5
  82. package/scripts/experiment-tracker.js +1 -5
  83. package/scripts/export-databricks-bundle.js +1 -5
  84. package/scripts/export-hf-dataset.js +1 -5
  85. package/scripts/export-training.js +1 -5
  86. package/scripts/feedback-attribution.js +1 -16
  87. package/scripts/feedback-history-distiller.js +1 -16
  88. package/scripts/feedback-loop.js +17 -5
  89. package/scripts/feedback-root-consolidator.js +2 -21
  90. package/scripts/feedback-session.js +49 -0
  91. package/scripts/feedback-to-rules.js +188 -28
  92. package/scripts/filesystem-search.js +1 -9
  93. package/scripts/fs-utils.js +104 -0
  94. package/scripts/gates-engine.js +149 -4
  95. package/scripts/github-about.js +32 -8
  96. package/scripts/gtm-revenue-loop.js +1 -5
  97. package/scripts/harness-selector.js +148 -0
  98. package/scripts/hosted-job-launcher.js +1 -5
  99. package/scripts/hybrid-feedback-context.js +7 -33
  100. package/scripts/intervention-policy.js +753 -0
  101. package/scripts/lesson-db.js +3 -18
  102. package/scripts/lesson-inference.js +194 -16
  103. package/scripts/lesson-retrieval.js +60 -24
  104. package/scripts/llm-client.js +59 -0
  105. package/scripts/local-model-profile.js +18 -2
  106. package/scripts/managed-lesson-agent.js +183 -0
  107. package/scripts/marketing-experiment.js +8 -22
  108. package/scripts/meta-agent-loop.js +624 -0
  109. package/scripts/metered-billing.js +1 -1
  110. package/scripts/model-tier-router.js +10 -1
  111. package/scripts/money-watcher.js +1 -4
  112. package/scripts/obsidian-export.js +1 -5
  113. package/scripts/operational-integrity.js +369 -34
  114. package/scripts/org-dashboard.js +6 -1
  115. package/scripts/per-step-scoring.js +2 -4
  116. package/scripts/pr-manager.js +201 -19
  117. package/scripts/pro-features.js +3 -2
  118. package/scripts/prompt-dlp.js +3 -3
  119. package/scripts/prove-adapters.js +2 -5
  120. package/scripts/prove-attribution.js +1 -5
  121. package/scripts/prove-automation.js +3 -5
  122. package/scripts/prove-cloudflare-sandbox.js +1 -3
  123. package/scripts/prove-data-pipeline.js +1 -3
  124. package/scripts/prove-intelligence.js +1 -3
  125. package/scripts/prove-lancedb.js +1 -5
  126. package/scripts/prove-local-intelligence.js +1 -3
  127. package/scripts/prove-packaged-runtime.js +326 -0
  128. package/scripts/prove-predictive-insights.js +1 -3
  129. package/scripts/prove-runtime.js +13 -0
  130. package/scripts/prove-training-export.js +1 -3
  131. package/scripts/prove-workflow-contract.js +1 -5
  132. package/scripts/rate-limiter.js +6 -4
  133. package/scripts/reddit-dm-outreach.js +14 -4
  134. package/scripts/schedule-manager.js +3 -5
  135. package/scripts/security-scanner.js +448 -0
  136. package/scripts/self-distill-agent.js +579 -0
  137. package/scripts/semantic-dedup.js +115 -0
  138. package/scripts/skill-exporter.js +1 -3
  139. package/scripts/skill-generator.js +1 -5
  140. package/scripts/social-analytics/engagement-audit.js +1 -18
  141. package/scripts/social-analytics/pollers/linkedin.js +26 -16
  142. package/scripts/social-analytics/publishers/linkedin.js +1 -1
  143. package/scripts/social-analytics/publishers/zernio.js +51 -0
  144. package/scripts/social-pipeline.js +1 -3
  145. package/scripts/social-post-hourly.js +47 -4
  146. package/scripts/statusline-links.js +6 -5
  147. package/scripts/statusline-local-stats.js +2 -0
  148. package/scripts/statusline.sh +38 -7
  149. package/scripts/sync-branch-protection.js +340 -0
  150. package/scripts/tessl-export.js +1 -3
  151. package/scripts/thumbgate-search.js +32 -1
  152. package/scripts/tool-kpi-tracker.js +1 -1
  153. package/scripts/tool-registry.js +108 -4
  154. package/scripts/vector-store.js +1 -5
  155. package/scripts/weekly-auto-post.js +1 -1
  156. package/scripts/workflow-sentinel.js +205 -4
  157. package/skills/thumbgate/SKILL.md +2 -2
  158. package/src/api/server.js +273 -4
  159. package/scripts/social-analytics/db/social-analytics.db-shm +0 -0
  160. /package/scripts/social-analytics/db/{social-analytics.db-wal → analytics.sqlite} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.2.0",
4
- "description": "ThumbGate Make your AI coding agent self-improving. Every mistake becomes a prevention rule that physically blocks the agent from repeating it. Feedback-driven enforcement via PreToolUse hooks, Thompson Sampling for adaptive gates, SQLite+FTS5 lesson DB, and LanceDB vector search. Your agent gets smarter with every session.",
3
+ "version": "1.4.0",
4
+ "description": "ThumbGate: self-improving agent governance for engineering teams. Three-tier approval routing (block/approve/log), shared enforcement, CI gates, and audit trails. Every mistake becomes a prevention rule. PreToolUse hooks, Thompson Sampling, SQLite+FTS5 lesson DB, and LanceDB vector search.",
5
5
  "homepage": "https://thumbgate-production.up.railway.app",
6
6
  "repository": {
7
7
  "type": "git",
@@ -37,6 +37,7 @@
37
37
  "changeset:status": "changeset status",
38
38
  "changeset:check": "node scripts/changeset-check.js",
39
39
  "build:claude-mcpb": "node scripts/build-claude-mcpb.js",
40
+ "build:codex-plugin": "node scripts/build-codex-plugin.js",
40
41
  "verify:quick": "node scripts/verify-run.js quick",
41
42
  "verify:full": "node scripts/verify-run.js full",
42
43
  "budget:status": "node scripts/budget-guard.js --status",
@@ -70,7 +71,7 @@
70
71
  "social:post-everywhere:dry": "node scripts/post-everywhere.js --dry-run",
71
72
  "social:reply-monitor": "node scripts/social-reply-monitor.js",
72
73
  "social:reply-monitor:dry": "node scripts/social-reply-monitor.js --dry-run",
73
- "test": "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: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: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:belief-update && npm run test:hosted-config && 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: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:lesson-retrieval && 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: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-quality-gate && npm run test:a2ui-engine && npm run test:gate-satisfy && npm run test:money-watcher && 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:reconcile-thumbgate-campaign && npm run test:reddit-publisher && npm run test:schedule-thumbgate-campaign && npm run test:social-reply-monitor && npm run test:sync-launch-assets && npm run test:ai-search-visibility",
74
+ "test": "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: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: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:belief-update && npm run test:hosted-config && 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: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:lesson-retrieval && 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: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:reconcile-thumbgate-campaign && npm run test:reddit-publisher && npm run test:schedule-thumbgate-campaign && npm run test:social-reply-monitor && npm run test:sync-launch-assets && npm run test:ai-search-visibility && 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:seo-guides",
74
75
  "test:feedback-fallback": "node --test tests/feedback-fallback.test.js",
75
76
  "test:metaclaw": "node --test tests/metaclaw-features.test.js",
76
77
  "test:server-lock": "node --test tests/server-stdio-lock.test.js",
@@ -78,7 +79,7 @@
78
79
  "test:multi-hop-recall": "node --test tests/multi-hop-recall.test.js",
79
80
  "test:synthetic-dpo": "node --test tests/synthetic-dpo.test.js",
80
81
  "test:thumbgate-skill": "node --test tests/thumbgate-skill.test.js",
81
- "test:statusline": "node --test tests/statusline.test.js tests/statusline-links.test.js",
82
+ "test:statusline": "node --test tests/claude-feedback-sync.test.js tests/statusline.test.js tests/statusline-links.test.js",
82
83
  "test:memory-dedup": "node --test tests/memory-dedup.test.js",
83
84
  "test:lesson-db": "node --test tests/lesson-db.test.js",
84
85
  "test:lesson-rotation": "node --test tests/lesson-rotation.test.js",
@@ -121,25 +122,26 @@
121
122
  "test:loop": "node scripts/feedback-loop.js --test",
122
123
  "test:dpo": "node scripts/export-dpo-pairs.js --test",
123
124
  "test:kto": "node --test tests/export-kto.test.js",
124
- "test:api": "node --test --test-concurrency=1 tests/api-server.test.js tests/api-auth-config.test.js tests/mcp-server.test.js tests/adapters.test.js tests/openapi-parity.test.js tests/budget-guard.test.js tests/context-manager.test.js tests/contextfs.test.js tests/job-api.test.js tests/pack-templates.test.js tests/dashboard.test.js tests/dashboard-render-spec.test.js tests/dashboard-html.test.js tests/agent-readiness.test.js tests/mcp-policy.test.js tests/subagent-profiles.test.js tests/intent-router.test.js tests/internal-agent-bootstrap.test.js tests/lesson-search.test.js tests/thumbgate-search.test.js tests/rubric-engine.test.js tests/self-healing-check.test.js tests/self-heal.test.js tests/feedback-schema.test.js tests/thompson-sampling.test.js tests/feedback-sequences.test.js tests/diversity-tracking.test.js tests/vector-store.test.js tests/feedback-attribution.test.js tests/hybrid-feedback-context.test.js tests/loop-closure.test.js tests/code-reasoning.test.js tests/feedback-loop.test.js tests/feedback-inbox-read.test.js tests/feedback-to-memory.test.js tests/test-coverage.test.js tests/version-metadata.test.js tests/claude-mcpb.test.js tests/claude-codex-bridge.test.js tests/cursor-plugin.test.js tests/codex-plugin.test.js tests/telemetry-analytics.test.js tests/public-landing.test.js tests/pro-landing.test.js tests/local-model-profile.test.js tests/risk-scorer.test.js tests/context-compaction.test.js tests/reminder-engine.test.js tests/post-to-x.test.js tests/verification-loop.test.js tests/async-job-runner.test.js tests/commerce-quality.test.js tests/recall-limit.test.js tests/problem-detail.test.js tests/natural-language-harness.test.js tests/settings-hierarchy.test.js",
125
- "test:proof": "node --test tests/prove-adapters.test.js tests/prove-attribution.test.js tests/prove-cloudflare-sandbox.test.js tests/prove-data-quality.test.js tests/prove-intelligence.test.js tests/prove-lancedb.test.js tests/prove-loop-closure.test.js tests/prove-subway-upgrades.test.js tests/prove-training-export.test.js tests/prove-local-intelligence.test.js tests/prove-workflow-contract.test.js tests/prove-autoresearch.test.js tests/prove-claim-verification.test.js tests/prove-data-pipeline.test.js tests/prove-evolution.test.js tests/prove-harnesses.test.js tests/prove-runtime.test.js tests/prove-seo-gsd.test.js tests/prove-settings.test.js tests/prove-xmemory.test.js && node --test tests/prove-automation.test.js",
125
+ "test:api": "node --test --test-concurrency=1 tests/api-server.test.js tests/api-auth-config.test.js tests/mcp-server.test.js tests/adapters.test.js tests/openapi-parity.test.js tests/budget-guard.test.js tests/context-manager.test.js tests/contextfs.test.js tests/job-api.test.js tests/pack-templates.test.js tests/dashboard.test.js tests/dashboard-render-spec.test.js tests/dashboard-html.test.js tests/agent-readiness.test.js tests/mcp-policy.test.js tests/subagent-profiles.test.js tests/intent-router.test.js tests/internal-agent-bootstrap.test.js tests/lesson-search.test.js tests/thumbgate-search.test.js tests/document-intake.test.js tests/rubric-engine.test.js tests/self-healing-check.test.js tests/self-heal.test.js tests/feedback-schema.test.js tests/thompson-sampling.test.js tests/feedback-sequences.test.js tests/diversity-tracking.test.js tests/vector-store.test.js tests/feedback-attribution.test.js tests/hybrid-feedback-context.test.js tests/loop-closure.test.js tests/code-reasoning.test.js tests/feedback-loop.test.js tests/feedback-inbox-read.test.js tests/feedback-to-memory.test.js tests/test-coverage.test.js tests/version-metadata.test.js tests/claude-mcpb.test.js tests/claude-codex-bridge.test.js tests/cursor-plugin.test.js tests/codex-plugin.test.js tests/telemetry-analytics.test.js tests/public-landing.test.js tests/lessons-page.test.js tests/pro-landing.test.js tests/local-model-profile.test.js tests/risk-scorer.test.js tests/context-compaction.test.js tests/reminder-engine.test.js tests/post-to-x.test.js tests/verification-loop.test.js tests/async-job-runner.test.js tests/commerce-quality.test.js tests/recall-limit.test.js tests/problem-detail.test.js tests/natural-language-harness.test.js tests/settings-hierarchy.test.js",
126
+ "test:proof": "node --test tests/prove-adapters.test.js tests/prove-attribution.test.js tests/prove-cloudflare-sandbox.test.js tests/prove-data-quality.test.js tests/prove-intelligence.test.js tests/prove-lancedb.test.js tests/prove-loop-closure.test.js tests/prove-subway-upgrades.test.js tests/prove-training-export.test.js tests/prove-local-intelligence.test.js tests/prove-workflow-contract.test.js tests/prove-autoresearch.test.js tests/prove-claim-verification.test.js tests/prove-data-pipeline.test.js tests/prove-evolution.test.js tests/prove-harnesses.test.js tests/prove-packaged-runtime.test.js tests/prove-runtime.test.js tests/prove-seo-gsd.test.js tests/prove-settings.test.js tests/prove-xmemory.test.js && node --test tests/prove-automation.test.js",
126
127
  "test:e2e": "node --test tests/e2e-pipeline.test.js tests/e2e-product-flows.test.js tests/e2e-coverage-contract.test.js",
127
128
  "test:rlaif": "node --test tests/rlaif-self-audit.test.js tests/dpo-optimizer.test.js tests/meta-policy.test.js",
128
129
  "test:attribution": "node --test tests/feedback-attribution.test.js tests/hybrid-feedback-context.test.js",
129
130
  "test:quality": "node --test tests/validate-feedback.test.js",
130
131
  "test:intelligence": "node --test tests/intelligence.test.js",
131
132
  "test:training-export": "node --test tests/training-export.test.js tests/databricks-export.test.js",
132
- "test:deployment": "node --test tests/deployment.test.js tests/deploy-policy.test.js tests/publish-decision.test.js tests/changeset-check.test.js",
133
- "test:operational-integrity": "node --test tests/operational-integrity.test.js",
134
- "test:workflow": "node --test tests/workflow-contract.test.js tests/social-marketing-assets.test.js tests/social-pipeline.test.js tests/positioning-contract.test.js tests/workflow-runs.test.js tests/workflow-sprint-intake.test.js tests/gtm-revenue-loop.test.js tests/enterprise-story.test.js",
133
+ "test:deployment": "node --test tests/deployment.test.js tests/deploy-policy.test.js tests/publish-decision.test.js tests/changeset-check.test.js tests/sonarcloud-workflow.test.js",
134
+ "test:operational-integrity": "node --test tests/operational-integrity.test.js tests/sync-branch-protection.test.js",
135
+ "test:workflow": "node --test tests/workflow-contract.test.js tests/social-marketing-assets.test.js tests/social-pipeline.test.js tests/positioning-contract.test.js tests/docs-claim-hygiene.test.js tests/workflow-runs.test.js tests/workflow-sprint-intake.test.js tests/gtm-revenue-loop.test.js tests/enterprise-story.test.js",
135
136
  "test:billing": "node --test tests/billing.test.js",
136
137
  "test:cli": "node --test tests/analytics-report.test.js tests/creator-campaigns.test.js tests/cli.test.js tests/codex-bridge-script.test.js tests/dispatch-brief.test.js tests/feedback-normalize.test.js tests/install-mcp.test.js tests/pr-manager.test.js tests/pro-local-dashboard.test.js tests/published-cli.test.js tests/revenue-status.test.js",
137
138
  "test:evolution": "node --test tests/workspace-evolver.test.js",
138
139
  "test:watcher": "node --test tests/jsonl-watcher.test.js",
139
140
  "test:autoresearch": "node --test tests/autoresearch.test.js",
140
- "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/delegation-runtime.test.js tests/disagreement-mining.test.js tests/failure-diagnostics.test.js tests/gate-stats.test.js tests/github-billing.test.js tests/markdown-escape.test.js tests/mcp-tools-gates.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-webhook-route.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",
141
+ "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/github-billing.test.js tests/intervention-policy.test.js tests/markdown-escape.test.js tests/mcp-tools-gates.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-webhook-route.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",
141
142
  "test:tessl": "node --test tests/tessl-export.test.js",
142
143
  "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/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",
144
+ "test:budget": "node --test tests/budget-enforcer.test.js",
143
145
  "test:workers": "npm --prefix workers ci && npm --prefix workers test",
144
146
  "test:evoskill": "node --test tests/evoskill.test.js",
145
147
  "test:gates-hardening": "node --test tests/gates-hardening.test.js",
@@ -157,6 +159,8 @@
157
159
  "adk:consolidate": "node scripts/adk-consolidator.js",
158
160
  "adk:watch": "node scripts/adk-consolidator.js --watch",
159
161
  "pr:manage": "node scripts/pr-manager.js",
162
+ "branch-protection:check": "node scripts/sync-branch-protection.js --check",
163
+ "branch-protection:sync": "node scripts/sync-branch-protection.js",
160
164
  "self-heal:run": "node scripts/self-heal.js",
161
165
  "self-heal:check": "node scripts/self-healing-check.js",
162
166
  "skill:verify": "node scripts/tessl-export.js verify",
@@ -176,6 +180,7 @@
176
180
  "prove:harnesses": "node scripts/prove-harnesses.js",
177
181
  "prove:local-intelligence": "node scripts/prove-local-intelligence.js",
178
182
  "prove:runtime": "node scripts/prove-runtime.js",
183
+ "prove:packaged-runtime": "node scripts/prove-packaged-runtime.js",
179
184
  "prove:settings": "node scripts/prove-settings.js",
180
185
  "prove:seo-gsd": "node scripts/prove-seo-gsd.js",
181
186
  "prove:tessl": "node scripts/prove-tessl.js",
@@ -220,10 +225,12 @@
220
225
  "test:skill-progressive": "node --test tests/skill-progressive-disclosure.test.js",
221
226
  "test:per-step-scoring": "node --test tests/per-step-scoring.test.js",
222
227
  "test:weekly-auto-post": "node --test tests/weekly-auto-post.test.js",
228
+ "test:social-post-hourly": "node --test tests/social-post-hourly.test.js",
223
229
  "test:social-quality-gate": "node --test tests/social-quality-gate.test.js",
224
230
  "test:a2ui-engine": "node --test tests/a2ui-engine.test.js",
225
231
  "test:gate-satisfy": "node --test tests/gate-satisfy.test.js",
226
232
  "test:money-watcher": "node --test tests/money-watcher.test.js",
233
+ "test:quick-start": "node --test tests/quick-start.test.js",
227
234
  "test:utm": "node --test tests/utm.test.js",
228
235
  "test:product-feedback": "node --test tests/product-feedback.test.js",
229
236
  "test:feedback-root-consolidator": "node --test tests/feedback-root-consolidator.test.js",
@@ -241,7 +248,25 @@
241
248
  "test:sync-launch-assets": "node --test tests/sync-launch-assets.test.js",
242
249
  "test:reddit-publisher": "node --test tests/reddit-publisher.test.js",
243
250
  "test:engagement-audit": "node --test tests/engagement-audit.test.js",
244
- "test:ai-search-visibility": "node --test tests/ai-search-visibility.test.js"
251
+ "test:ai-search-visibility": "node --test tests/ai-search-visibility.test.js",
252
+ "test:security-scanner": "node --test tests/security-scanner.test.js",
253
+ "test:llm-client": "node --test tests/llm-client.test.js",
254
+ "test:managed-lesson-agent": "node --test tests/managed-lesson-agent.test.js",
255
+ "agent:run": "node scripts/managed-lesson-agent.js",
256
+ "agent:run:dry": "node scripts/managed-lesson-agent.js --dry-run",
257
+ "agent:schedule": "node scripts/schedule-manager.js install --label managed-lesson-agent --spec 'daily 02:00' --command 'npm run agent:run' --workingDirectory .",
258
+ "feedback:rules:llm": "node scripts/feedback-to-rules.js --llm",
259
+ "test:self-distill": "node --test tests/self-distill-agent.test.js",
260
+ "test:seo-guides": "node --test tests/seo-guides.test.js",
261
+ "self-distill:run": "node scripts/self-distill-agent.js",
262
+ "self-distill:dry": "node scripts/self-distill-agent.js --dry-run",
263
+ "meta-agent:run": "node scripts/meta-agent-loop.js",
264
+ "meta-agent:dry": "node scripts/meta-agent-loop.js --dry-run",
265
+ "meta-agent:status": "node scripts/meta-agent-loop.js --status",
266
+ "test:meta-agent": "node --test tests/meta-agent-loop.test.js",
267
+ "test:semantic-dedup": "node --test tests/semantic-dedup.test.js",
268
+ "test:fs-utils": "node --test tests/fs-utils.test.js",
269
+ "test:harness-selector": "node --test tests/harness-selector.test.js"
245
270
  },
246
271
  "keywords": [
247
272
  "mcp",
@@ -271,7 +296,14 @@
271
296
  "cursor",
272
297
  "codex",
273
298
  "safety",
274
- "enforcement"
299
+ "enforcement",
300
+ "ai agent memory",
301
+ "repeated mistakes",
302
+ "agent error prevention",
303
+ "ai-authenticity",
304
+ "prevent-ai-slop",
305
+ "human-led-ai",
306
+ "ai-standards-enforcement"
275
307
  ],
276
308
  "author": "Igor Ganapolsky",
277
309
  "license": "MIT",
@@ -289,6 +321,7 @@
289
321
  "node": ">=18.18.0"
290
322
  },
291
323
  "dependencies": {
324
+ "@anthropic-ai/sdk": "^0.24.0",
292
325
  "@google/genai": "^1.48.0",
293
326
  "@huggingface/transformers": "^4.0.1",
294
327
  "@lancedb/lancedb": "^0.27.2",
@@ -306,6 +339,7 @@
306
339
  "mcpName": "io.github.IgorGanapolsky/thumbgate",
307
340
  "devDependencies": {
308
341
  "@changesets/changelog-github": "^0.5.1",
309
- "@changesets/cli": "^2.30.0"
342
+ "@changesets/cli": "^2.30.0",
343
+ "c8": "^11.0.0"
310
344
  }
311
345
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-bridge",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Run Codex review, adversarial review, and second-pass handoffs from Claude Code while keeping ThumbGate reliability memory in the loop.",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky",
@@ -5,7 +5,7 @@
5
5
  "args": [
6
6
  "--yes",
7
7
  "--package",
8
- "thumbgate@1.2.0",
8
+ "thumbgate@1.4.0",
9
9
  "thumbgate",
10
10
  "serve"
11
11
  ]
@@ -3,6 +3,7 @@
3
3
  const fs = require('node:fs');
4
4
  const path = require('node:path');
5
5
  const { spawnSync } = require('node:child_process');
6
+ const { ensureDir } = require('../../../scripts/fs-utils');
6
7
 
7
8
  function getPluginRoot() {
8
9
  return process.env.CLAUDE_PLUGIN_ROOT || path.resolve(__dirname, '..');
@@ -20,9 +21,6 @@ function getCodexBin() {
20
21
  return process.env.THUMBGATE_CODEX_BIN || 'codex';
21
22
  }
22
23
 
23
- function ensureDir(dirPath) {
24
- fs.mkdirSync(dirPath, { recursive: true });
25
- }
26
24
 
27
25
  function readJson(filePath) {
28
26
  return JSON.parse(fs.readFileSync(filePath, 'utf8'));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-profile",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "ThumbGate for Codex: pre-action gates, skill packs, hallucination detection, PII scanning, progressive disclosure (82% token savings), and MCP-backed reliability memory.",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky",
@@ -5,7 +5,7 @@
5
5
  "args": [
6
6
  "--yes",
7
7
  "--package",
8
- "thumbgate@1.2.0",
8
+ "thumbgate@1.4.0",
9
9
  "thumbgate",
10
10
  "serve"
11
11
  ]
@@ -1,6 +1,29 @@
1
1
  # ThumbGate for Codex
2
2
 
3
- ThumbGate now ships a repo-local Codex app plugin surface plus the version-pinned MCP profile. Use the plugin files when you want a distributable Codex artifact, or copy the TOML block for a manual install.
3
+ ThumbGate now ships a standalone Codex plugin bundle, a repo-local Codex app plugin surface, and the version-pinned MCP profile.
4
+
5
+ ## Option 1: Use the standalone release bundle
6
+
7
+ Download the latest bundle:
8
+
9
+ - `https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip`
10
+
11
+ Or build it from source:
12
+
13
+ ```bash
14
+ npm run build:codex-plugin
15
+ ```
16
+
17
+ After extracting `thumbgate-codex-plugin.zip`, the folder already contains:
18
+
19
+ - `.codex-plugin/plugin.json`
20
+ - `.mcp.json`
21
+ - `.agents/plugins/marketplace.json`
22
+ - `config.toml`
23
+
24
+ The bundled marketplace catalog points at `./`, so the extracted directory is a self-contained plugin root instead of a repo-relative stub.
25
+
26
+ ## Option 2: Use the repo-local plugin files
4
27
 
5
28
  ## Shipped plugin files
6
29
 
@@ -9,7 +32,7 @@ ThumbGate now ships a repo-local Codex app plugin surface plus the version-pinne
9
32
  - Codex marketplace entry: `.agents/plugins/marketplace.json`
10
33
  - Manual install profile: `adapters/codex/config.toml`
11
34
 
12
- ## One-Command Install
35
+ ## Option 3: Manual MCP install
13
36
 
14
37
  Add the MCP server block to your Codex config:
15
38
 
@@ -31,7 +54,7 @@ The following block is appended to `~/.codex/config.toml`:
31
54
  ```toml
32
55
  [mcp_servers.thumbgate]
33
56
  command = "npx"
34
- args = ["--yes", "--package", "thumbgate@1.2.0", "thumbgate", "serve"]
57
+ args = ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "serve"]
35
58
  ```
36
59
 
37
60
  The repo-local Codex app plugin ships the same runtime path through `plugins/codex-profile/.mcp.json`, so the manual config and plugin metadata stay aligned.
@@ -59,7 +82,7 @@ Then restart Codex. The `thumbgate` MCP server will appear in the tool list.
59
82
 
60
83
  - Codex with MCP support
61
84
  - Node.js 18+ in PATH
62
- - Config file at `~/.codex/config.toml`
85
+ - Config file at `~/.codex/config.toml` when using the manual MCP install path
63
86
 
64
87
  ## Uninstall
65
88
 
@@ -1,12 +1,14 @@
1
1
  # ThumbGate for Codex
2
2
 
3
- This directory is the repo-local Codex app plugin surface for ThumbGate.
3
+ ThumbGate now ships a standalone Codex plugin bundle in GitHub Releases, alongside the repo-local Codex profile in this repository.
4
4
 
5
- It packages the same ThumbGate runtime you already use elsewhere:
5
+ ## Release surfaces
6
6
 
7
- - `plugins/codex-profile/.codex-plugin/plugin.json` for Codex plugin metadata
8
- - `plugins/codex-profile/.mcp.json` for the MCP server launcher
9
- - `adapters/codex/config.toml` for the version-pinned manual install path
7
+ - Latest standalone bundle: `https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip`
8
+ - Versioned bundle pattern: `https://github.com/IgorGanapolsky/ThumbGate/releases/download/v<VERSION>/thumbgate-codex-plugin-v<VERSION>.zip`
9
+ - Source plugin manifest: `plugins/codex-profile/.codex-plugin/plugin.json`
10
+ - Source MCP config: `plugins/codex-profile/.mcp.json`
11
+ - Manual install profile: `adapters/codex/config.toml`
10
12
 
11
13
  ## What it does
12
14
 
@@ -14,11 +16,25 @@ It packages the same ThumbGate runtime you already use elsewhere:
14
16
  - captures thumbs-up/down feedback that survives session boundaries
15
17
  - reuses the same local-first MCP runtime as Claude, Cursor, Gemini, Amp, and OpenCode
16
18
 
19
+ ## What's inside the standalone bundle
20
+
21
+ - `.codex-plugin/plugin.json`
22
+ - `.mcp.json`
23
+ - `.agents/plugins/marketplace.json`
24
+ - `config.toml`
25
+ - `README.md`, `INSTALL.md`, and `AGENTS.md`
26
+
27
+ The bundled marketplace catalog rewrites the plugin path to `./`, so the extracted folder can act as a self-contained plugin root instead of depending on this repository layout.
28
+
17
29
  ## Install paths
18
30
 
19
- ### Codex app plugin
31
+ ### Standalone Codex plugin bundle
32
+
33
+ Download the latest `thumbgate-codex-plugin.zip`, unzip it, and point Codex at the extracted `thumbgate-codex-plugin/` directory when you want a standalone plugin release surface.
34
+
35
+ ### Repo-local Codex app plugin
20
36
 
21
- Use the repo-local Codex plugin metadata and MCP config in this folder when Codex is loading plugin surfaces from the repository.
37
+ Use the plugin metadata and MCP config in this folder when Codex is loading plugin surfaces directly from the repository.
22
38
 
23
39
  ### Manual install
24
40
 
@@ -29,9 +45,17 @@ That profile launches:
29
45
  ```toml
30
46
  [mcp_servers.thumbgate]
31
47
  command = "npx"
32
- args = ["--yes", "--package", "thumbgate@1.2.0", "thumbgate", "serve"]
48
+ args = ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "serve"]
49
+ ```
50
+
51
+ ### Build from source
52
+
53
+ Build the same standalone release bundle locally with:
54
+
55
+ ```bash
56
+ npm run build:codex-plugin
33
57
  ```
34
58
 
35
59
  ## Why this exists
36
60
 
37
- The Codex support story is no longer just "copy this config block." This folder is the shipped Codex plugin artifact for ThumbGate, so the repo can truthfully claim a Codex app plugin surface alongside the Claude Desktop bundle and Cursor plugin.
61
+ The Codex support story is no longer just "copy this config block." ThumbGate now has a direct-download Codex plugin bundle, a repo-local plugin surface, and a pinned manual MCP profile so release assets, install docs, and the runtime stay aligned.
@@ -2,7 +2,7 @@
2
2
  "name": "thumbgate",
3
3
  "displayName": "ThumbGate",
4
4
  "description": "👍👎 Thumbs down a mistake — your AI agent won't repeat it. Thumbs up good work — it remembers the pattern.",
5
- "version": "1.2.0",
5
+ "version": "1.4.0",
6
6
  "author": {
7
7
  "name": "Igor Ganapolsky"
8
8
  },
@@ -11,7 +11,7 @@ How it works:
11
11
 
12
12
  - 👎 **Thumbs down** a mistake — it gets blocked from happening again
13
13
  - 👍 **Thumbs up** good work — the agent remembers the pattern
14
- - **History-aware lesson distillation** — vague thumbs signals can be grounded in the last ~10 messages and failed tool call
14
+ - **History-aware lesson distillation** — vague thumbs-down signals can be grounded in up to 8 prior recorded entries and the failed tool call
15
15
  - **Cross-session memory** — lessons persist between conversations
16
16
  - **Automatic enforcement** — repeated failures become prevention rules
17
17
  - **Zero config** — install and start giving feedback
@@ -108,7 +108,7 @@ Or copy the plugin MCP config into `.cursor/mcp.json`:
108
108
 
109
109
  Use the `/capture-feedback` command or the `capture_feedback` MCP tool to send structured feedback directly to the ThumbGate memory system. Feedback drives prevention rule generation — repeated failure patterns are auto-promoted into enforceable gates.
110
110
 
111
- When the user only gives a quick `thumbs_down`, `wrong`, or `correct`, the Cursor plugin should include the last ~10 messages and the failed tool call in `chatHistory` so ThumbGate can propose the lesson automatically. If the explanation comes later, reuse the earlier event with `relatedFeedbackId` instead of creating an isolated duplicate.
111
+ When the user only gives a quick `thumbs_down`, `wrong`, or `correct`, the Cursor plugin should include up to 8 prior recorded entries and the failed tool call in `chatHistory` so ThumbGate can propose the lesson automatically. If the explanation comes later, reuse the earlier event with `relatedFeedbackId` so the linked 60-second follow-up session refines the same feedback record instead of creating an isolated duplicate.
112
112
 
113
113
  ## What makes this useful in Cursor
114
114
 
@@ -15,7 +15,7 @@ Invoke this command to record a feedback signal with context and tags. If the us
15
15
 
16
16
  1. Specify signal: `thumbs_up` or `thumbs_down`.
17
17
  2. If the user already gave a clear explanation, pass it as `context`.
18
- 3. If the explanation is vague or omitted, gather the last ~10 messages plus the failed tool call into `chatHistory`.
18
+ 3. If the explanation is vague or omitted, gather up to 8 prior recorded entries plus the failed tool call into `chatHistory`.
19
19
  4. Add tags for categorization.
20
20
  5. If this is a later clarification for an existing feedback event, include `relatedFeedbackId`.
21
21
  6. Call the `capture_feedback` MCP tool and show the proposed lesson or corrective rule back to the user.
@@ -30,4 +30,4 @@ Invoke this command to record a feedback signal with context and tags. If the us
30
30
  /capture-feedback thumbs_down
31
31
  ```
32
32
 
33
- In the second example, the command should rely on history-aware distillation instead of refusing the signal outright.
33
+ In the second example, the command should rely on history-aware distillation instead of refusing the signal outright. If the user adds more detail later, reuse `relatedFeedbackId` so the linked 60-second follow-up session updates the same record.
@@ -20,15 +20,15 @@ After any mistake, unexpected behavior, or completed task, prompt to capture str
20
20
  - `signal`: "thumbs_up" or "thumbs_down"
21
21
  - `context`: Brief description of what happened when the explanation is already explicit
22
22
  - `tags`: Relevant tags (e.g., "test-failure", "wrong-approach", "deployment-error")
23
- - `chatHistory`: the last ~10 messages plus the failed tool call when the signal is vague and the lesson should be inferred from recent conversation
23
+ - `chatHistory`: up to 8 prior recorded entries plus the failed tool call when the thumbs-down signal is vague and the lesson should be inferred from recent conversation
24
24
  - `relatedFeedbackId`: use for a later clarification that should refine an existing feedback event
25
25
  - `rubric_scores`: Optional structured scores if a rubric applies
26
26
 
27
27
  2. Include enough context so the feedback is useful for future prevention rule generation.
28
- 3. If the user only gives a bare thumbs signal or short correction, still capture it and let ThumbGate propose `whatWentWrong` / `whatToChange` from recent history.
28
+ 3. If the user only gives a bare thumbs signal or short correction, still capture it and let ThumbGate propose `whatWentWrong` / `whatToChange` from recent history. If the explanation arrives later, reuse `relatedFeedbackId` so the linked 60-second follow-up session refines the same record.
29
29
 
30
30
  ## Examples
31
31
 
32
32
  - Test failure after refactor: signal=thumbs_down, tags=["test-failure", "refactor"], context="Tests broke after extracting helper function — missed internal dependency"
33
33
  - Successful deployment: signal=thumbs_up, tags=["deployment", "success"], context="Clean deploy after running gate checks"
34
- - Vague correction after failed tool use: signal=thumbs_down, chatHistory=[last 10 messages + failed tool call], tags=["wrong-approach", "tool-failure"]
34
+ - Vague correction after failed tool use: signal=thumbs_down, chatHistory=[up to 8 prior recorded entries + failed tool call], tags=["wrong-approach", "tool-failure"]
@@ -21,7 +21,7 @@ Use the `capture_feedback` MCP tool with:
21
21
  - **signal** — `"thumbs_up"` or `"thumbs_down"`
22
22
  - **context** — Description of what happened and why when the user already said it clearly
23
23
  - **tags** — Array of relevant tags for categorization (e.g., `["test-failure", "refactor"]`)
24
- - **chatHistory** — The last ~10 messages plus the failed tool call when the thumbs signal is vague and the lesson must be distilled from recent context
24
+ - **chatHistory** — Up to 8 prior recorded entries plus the failed tool call when the thumbs-down signal is vague and the lesson must be distilled from recent context
25
25
  - **relatedFeedbackId** — Use when the user adds clarifying detail later and it should refine the existing feedback event
26
26
  - **rubric_scores** — Optional object with structured quality scores
27
27
 
@@ -39,8 +39,9 @@ If the user only says `thumbs_down`, `wrong`, `correct`, or `this failed`, do no
39
39
 
40
40
  - the signal
41
41
  - any minimal context the user already gave
42
- - `chatHistory` containing the recent conversation window
42
+ - `chatHistory` containing up to 8 prior recorded entries from the current correction thread
43
43
  - the failed tool call or command when available
44
+ - `relatedFeedbackId` if the user is clarifying an already-open 60-second follow-up session
44
45
 
45
46
  That lets ThumbGate propose `whatWentWrong`, `whatToChange`, and a candidate rule automatically.
46
47
 
@@ -25,7 +25,7 @@ The portable profile adds this MCP server entry:
25
25
  "mcp": {
26
26
  "thumbgate": {
27
27
  "type": "local",
28
- "command": ["npx", "--yes", "--package", "thumbgate@1.2.0", "thumbgate", "serve"],
28
+ "command": ["npx", "--yes", "--package", "thumbgate@1.4.0", "thumbgate", "serve"],
29
29
  "enabled": true
30
30
  }
31
31
  }
package/public/blog.html CHANGED
@@ -34,6 +34,12 @@
34
34
  "url": "https://thumbgate-production.up.railway.app/blog",
35
35
  "publisher": { "@type": "Organization", "name": "Max Smith KDP LLC" },
36
36
  "blogPost": [
37
+ {
38
+ "@type": "BlogPosting",
39
+ "headline": "Your AI agent is a supply chain attack surface. Here's how to gate it.",
40
+ "datePublished": "2026-04-10",
41
+ "keywords": "AI agent security, supply chain attack, pre-action gates, agent governance, ThumbGate"
42
+ },
37
43
  {
38
44
  "@type": "BlogPosting",
39
45
  "headline": "The Claude Code Leak Proves Why Pre-Action Gates Matter",
@@ -166,6 +172,73 @@
166
172
  </header>
167
173
 
168
174
  <div class="container">
175
+ <article class="post">
176
+ <div class="post-date">April 10, 2026</div>
177
+ <h2>Your AI agent is a supply chain attack surface. Here's how to gate it.</h2>
178
+
179
+ <p>
180
+ Your AI coding agent runs shell commands. It installs packages. It
181
+ modifies files, pushes commits, and calls external APIs &mdash; all
182
+ without requiring you to type a single character. That's the pitch.
183
+ That's also the attack surface.
184
+ </p>
185
+
186
+ <h3>The gap is pre-action enforcement</h3>
187
+ <p>
188
+ Static analysis catches known-bad patterns in code you've already
189
+ written. Dependency scanners audit lock files <em>after</em> packages
190
+ are installed. By the time your scanner flags a problem, the agent
191
+ already ran the command.
192
+ </p>
193
+ <p>
194
+ These tools operate on the <em>output</em> of agent actions. You need
195
+ something that operates on the <em>input</em> &mdash; before execution.
196
+ </p>
197
+
198
+ <h3>Pre-Action Gates via PreToolUse hooks</h3>
199
+ <p>
200
+ ThumbGate implements pre-action gates via <code>PreToolUse</code> hooks
201
+ &mdash; interception points that run before every tool invocation. No
202
+ action reaches execution without passing through the gate. Not Bash
203
+ commands, not file edits, not web fetches.
204
+ </p>
205
+ <p>
206
+ What makes this more than a static blocklist is the
207
+ <strong>feedback-to-enforcement pipeline</strong>. When something goes
208
+ wrong, you record a thumbs-down with context. That failure feeds a
209
+ promotion engine. One failure becomes a warning. Three confirmed
210
+ failures of the same pattern become a hard block.
211
+ </p>
212
+
213
+ <h3>Real examples</h3>
214
+ <ul>
215
+ <li>
216
+ <strong>Force-push to main</strong> &mdash; Gate fires, push never
217
+ happens. Agent is redirected to create a branch and open a PR.
218
+ </li>
219
+ <li>
220
+ <strong>Unknown dependency install</strong> &mdash; Flagged for human
221
+ review. Agent pauses until you approve.
222
+ </li>
223
+ <li>
224
+ <strong>Destructive shell command</strong> &mdash; Blocked by a
225
+ prevention rule learned from a prior incident.
226
+ </li>
227
+ </ul>
228
+
229
+ <h3>Five-minute setup</h3>
230
+ <p>
231
+ <code>npx thumbgate init</code> installs the PreToolUse hook and
232
+ generates a starter gate config. Gates are just JSON &mdash; commit
233
+ them, review them, share them across your team.
234
+ </p>
235
+ <p>
236
+ <strong>Human judgment leads. AI supports. ThumbGate enforces it.</strong>
237
+ </p>
238
+
239
+ <a class="cta" href="/guide">Full setup guide &rarr;</a>
240
+ </article>
241
+
169
242
  <article class="post">
170
243
  <div class="post-date">April 1, 2026</div>
171
244
  <h2>Dual-Signal Feedback: Why "What Failed" Isn't Enough</h2>