thumbgate 1.3.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 (146) hide show
  1. package/.claude-plugin/marketplace.json +32 -13
  2. package/.claude-plugin/plugin.json +15 -2
  3. package/.well-known/llms.txt +60 -0
  4. package/.well-known/mcp/server-card.json +1 -1
  5. package/README.md +109 -20
  6. package/adapters/README.md +1 -1
  7. package/adapters/chatgpt/openapi.yaml +168 -0
  8. package/adapters/claude/.mcp.json +2 -2
  9. package/adapters/codex/config.toml +2 -2
  10. package/adapters/mcp/server-stdio.js +84 -1
  11. package/adapters/opencode/opencode.json +1 -1
  12. package/bin/cli.js +200 -13
  13. package/bin/postinstall.js +8 -2
  14. package/config/budget.json +18 -0
  15. package/config/gates/code-edit.json +61 -0
  16. package/config/gates/db-write.json +61 -0
  17. package/config/gates/default.json +154 -3
  18. package/config/gates/deploy.json +61 -0
  19. package/config/github-about.json +2 -1
  20. package/config/merge-quality-checks.json +23 -0
  21. package/openapi/openapi.yaml +168 -0
  22. package/package.json +42 -10
  23. package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +1 -1
  24. package/plugins/claude-codex-bridge/.mcp.json +1 -1
  25. package/plugins/claude-codex-bridge/scripts/codex-bridge.js +1 -3
  26. package/plugins/codex-profile/.codex-plugin/plugin.json +1 -1
  27. package/plugins/codex-profile/.mcp.json +1 -1
  28. package/plugins/codex-profile/INSTALL.md +27 -4
  29. package/plugins/codex-profile/README.md +33 -9
  30. package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +1 -1
  31. package/plugins/opencode-profile/INSTALL.md +1 -1
  32. package/public/blog.html +73 -0
  33. package/public/compare/mem0.html +189 -0
  34. package/public/compare/speclock.html +180 -0
  35. package/public/compare.html +10 -2
  36. package/public/guide.html +2 -2
  37. package/public/guides/claude-code-prevent-repeated-mistakes.html +161 -0
  38. package/public/guides/codex-cli-guardrails.html +158 -0
  39. package/public/guides/cursor-prevent-repeated-mistakes.html +161 -0
  40. package/public/guides/pre-action-gates.html +162 -0
  41. package/public/guides/stop-repeated-ai-agent-mistakes.html +159 -0
  42. package/public/index.html +136 -50
  43. package/public/lessons.html +33 -24
  44. package/public/llm-context.md +140 -0
  45. package/public/pro.html +24 -22
  46. package/scripts/__pycache__/train_from_feedback.cpython-312.pyc +0 -0
  47. package/scripts/access-anomaly-detector.js +1 -1
  48. package/scripts/adk-consolidator.js +1 -5
  49. package/scripts/agent-security-hardening.js +4 -6
  50. package/scripts/agentic-data-pipeline.js +1 -3
  51. package/scripts/async-job-runner.js +1 -5
  52. package/scripts/audit-trail.js +1 -5
  53. package/scripts/background-agent-governance.js +2 -10
  54. package/scripts/billing.js +2 -16
  55. package/scripts/budget-enforcer.js +173 -0
  56. package/scripts/build-codex-plugin.js +152 -0
  57. package/scripts/check-congruence.js +132 -14
  58. package/scripts/commercial-offer.js +5 -7
  59. package/scripts/content-engine/linkedin-content-generator.js +154 -0
  60. package/scripts/content-engine/output/linkedin-memento-validation.md +17 -0
  61. package/scripts/content-engine/output/linkedin-posts-2026-04-09.md +175 -0
  62. package/scripts/content-engine/reddit-thread-finder.js +154 -0
  63. package/scripts/context-engine.js +21 -6
  64. package/scripts/contextfs.js +1 -21
  65. package/scripts/dashboard.js +20 -0
  66. package/scripts/decision-journal.js +341 -0
  67. package/scripts/delegation-runtime.js +1 -5
  68. package/scripts/distribution-surfaces.js +26 -0
  69. package/scripts/document-intake.js +927 -0
  70. package/scripts/ephemeral-agent-store.js +1 -8
  71. package/scripts/evolution-state.js +1 -5
  72. package/scripts/experiment-tracker.js +1 -5
  73. package/scripts/export-databricks-bundle.js +1 -5
  74. package/scripts/export-hf-dataset.js +1 -5
  75. package/scripts/export-training.js +1 -5
  76. package/scripts/feedback-attribution.js +1 -16
  77. package/scripts/feedback-history-distiller.js +1 -16
  78. package/scripts/feedback-loop.js +1 -5
  79. package/scripts/feedback-root-consolidator.js +2 -21
  80. package/scripts/feedback-session.js +49 -0
  81. package/scripts/feedback-to-rules.js +188 -28
  82. package/scripts/filesystem-search.js +1 -9
  83. package/scripts/fs-utils.js +104 -0
  84. package/scripts/gates-engine.js +149 -4
  85. package/scripts/github-about.js +32 -8
  86. package/scripts/gtm-revenue-loop.js +1 -5
  87. package/scripts/harness-selector.js +148 -0
  88. package/scripts/hosted-job-launcher.js +1 -5
  89. package/scripts/hybrid-feedback-context.js +7 -33
  90. package/scripts/intervention-policy.js +58 -1
  91. package/scripts/lesson-db.js +3 -18
  92. package/scripts/lesson-inference.js +194 -16
  93. package/scripts/lesson-retrieval.js +60 -24
  94. package/scripts/llm-client.js +59 -0
  95. package/scripts/managed-lesson-agent.js +183 -0
  96. package/scripts/marketing-experiment.js +8 -22
  97. package/scripts/meta-agent-loop.js +624 -0
  98. package/scripts/metered-billing.js +1 -1
  99. package/scripts/money-watcher.js +1 -4
  100. package/scripts/obsidian-export.js +1 -5
  101. package/scripts/operational-integrity.js +15 -3
  102. package/scripts/org-dashboard.js +6 -1
  103. package/scripts/per-step-scoring.js +2 -4
  104. package/scripts/pr-manager.js +201 -19
  105. package/scripts/pro-features.js +3 -2
  106. package/scripts/prompt-dlp.js +3 -3
  107. package/scripts/prove-adapters.js +1 -5
  108. package/scripts/prove-attribution.js +1 -5
  109. package/scripts/prove-automation.js +1 -3
  110. package/scripts/prove-cloudflare-sandbox.js +1 -3
  111. package/scripts/prove-data-pipeline.js +1 -3
  112. package/scripts/prove-intelligence.js +1 -3
  113. package/scripts/prove-lancedb.js +1 -5
  114. package/scripts/prove-local-intelligence.js +1 -3
  115. package/scripts/prove-packaged-runtime.js +75 -9
  116. package/scripts/prove-predictive-insights.js +1 -3
  117. package/scripts/prove-training-export.js +1 -3
  118. package/scripts/prove-workflow-contract.js +1 -5
  119. package/scripts/rate-limiter.js +3 -1
  120. package/scripts/reddit-dm-outreach.js +14 -4
  121. package/scripts/schedule-manager.js +3 -5
  122. package/scripts/security-scanner.js +448 -0
  123. package/scripts/self-distill-agent.js +579 -0
  124. package/scripts/semantic-dedup.js +115 -0
  125. package/scripts/skill-exporter.js +1 -3
  126. package/scripts/skill-generator.js +1 -5
  127. package/scripts/social-analytics/engagement-audit.js +1 -18
  128. package/scripts/social-analytics/pollers/linkedin.js +26 -16
  129. package/scripts/social-analytics/publishers/linkedin.js +1 -1
  130. package/scripts/social-analytics/publishers/zernio.js +51 -0
  131. package/scripts/social-pipeline.js +1 -3
  132. package/scripts/social-post-hourly.js +47 -4
  133. package/scripts/statusline-links.js +6 -5
  134. package/scripts/statusline.sh +29 -153
  135. package/scripts/sync-branch-protection.js +340 -0
  136. package/scripts/tessl-export.js +1 -3
  137. package/scripts/thumbgate-search.js +32 -1
  138. package/scripts/tool-kpi-tracker.js +1 -1
  139. package/scripts/tool-registry.js +106 -2
  140. package/scripts/vector-store.js +1 -5
  141. package/scripts/weekly-auto-post.js +1 -1
  142. package/scripts/workflow-sentinel.js +91 -0
  143. package/skills/thumbgate/SKILL.md +1 -1
  144. package/src/api/server.js +273 -4
  145. package/scripts/social-analytics/db/social-analytics.db-shm +0 -0
  146. /package/scripts/social-analytics/db/{social-analytics.db-wal → analytics.sqlite} +0 -0
@@ -1,23 +1,42 @@
1
1
  {
2
- "name": "thumbgate",
3
- "version": "1.3.0",
2
+ "name": "thumbgate-marketplace",
3
+ "version": "1.4.0",
4
+ "owner": {
5
+ "name": "Igor Ganapolsky",
6
+ "email": "ig5973700@gmail.com"
7
+ },
4
8
  "plugins": [
5
9
  {
6
10
  "name": "thumbgate",
7
11
  "description": "Pre-action gates that block AI coding agents from repeating known mistakes. Captures feedback, auto-promotes failures into prevention rules, and enforces them via PreToolUse hooks.",
8
- "type": "mcp",
9
12
  "source": {
10
- "type": "npm",
11
- "package": "thumbgate",
12
- "command": "npx",
13
- "args": [
14
- "--yes",
15
- "--package",
16
- "thumbgate",
17
- "thumbgate",
18
- "serve"
19
- ]
13
+ "source": "npm",
14
+ "package": "thumbgate"
20
15
  },
16
+ "version": "1.3.0",
17
+ "author": {
18
+ "name": "Igor Ganapolsky"
19
+ },
20
+ "homepage": "https://thumbgate-production.up.railway.app",
21
+ "repository": "https://github.com/IgorGanapolsky/ThumbGate",
22
+ "license": "MIT",
23
+ "category": "developer-tools",
24
+ "tags": [
25
+ "pre-action-gates",
26
+ "ai-agent-safety",
27
+ "mcp",
28
+ "memory",
29
+ "workflow-hardening"
30
+ ],
31
+ "keywords": [
32
+ "claude-desktop",
33
+ "desktop-extension",
34
+ "pre-action-gates",
35
+ "ai-agent-safety",
36
+ "mcp",
37
+ "memory",
38
+ "workflow-hardening"
39
+ ],
21
40
  "metadata": {
22
41
  "author": "Igor Ganapolsky",
23
42
  "homepage": "https://thumbgate-production.up.railway.app",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "thumbgate",
3
3
  "description": "Pre-action gates that block AI coding agents from repeating known mistakes. Captures feedback, auto-promotes failures into prevention rules, and enforces them via PreToolUse hooks.",
4
- "version": "1.3.0",
4
+ "version": "1.4.0",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky"
7
7
  },
@@ -17,5 +17,18 @@
17
17
  "memory",
18
18
  "guardrails",
19
19
  "workflow-hardening"
20
- ]
20
+ ],
21
+ "skills": "skills",
22
+ "mcpServers": {
23
+ "thumbgate": {
24
+ "command": "npx",
25
+ "args": [
26
+ "--yes",
27
+ "--package",
28
+ "thumbgate",
29
+ "thumbgate",
30
+ "serve"
31
+ ]
32
+ }
33
+ }
21
34
  }
@@ -0,0 +1,60 @@
1
+ # ThumbGate — Pre-action gates for AI coding agents
2
+ # https://thumbgate-production.up.railway.app
3
+ # https://github.com/IgorGanapolsky/ThumbGate
4
+ # https://www.npmjs.com/package/thumbgate
5
+
6
+ > ThumbGate makes AI coding agents self-improving. Every mistake becomes
7
+ > a prevention rule that physically blocks the agent from repeating it.
8
+ > Feedback-driven enforcement via PreToolUse hooks.
9
+
10
+ ## What ThumbGate solves
11
+
12
+ - AI coding agents repeat the same mistakes across sessions
13
+ - CLAUDE.md and .cursorrules files are suggestions agents can ignore
14
+ - No memory between sessions means no learning from corrections
15
+ - Teams have no shared safety rules across developers
16
+
17
+ ## How it works
18
+
19
+ 1. Agent makes a mistake → developer gives thumbs-down
20
+ 2. ThumbGate captures context and infers a structured lesson
21
+ 3. Recurring failures get promoted to enforcement gates
22
+ 4. PreToolUse hooks block the pattern before it executes again
23
+ 5. Thompson Sampling adapts gate confidence over time
24
+
25
+ ## Who it's for
26
+
27
+ - Developers using Claude Code, Cursor, Codex, Gemini CLI, or any MCP-compatible agent
28
+ - Engineering teams that need shared agent safety rules
29
+ - Anyone tired of re-correcting their AI coding assistant
30
+
31
+ ## Install
32
+
33
+ ```
34
+ npx thumbgate init --agent claude-code
35
+ ```
36
+
37
+ ## Pricing
38
+
39
+ - Free: 3 feedback captures/day, 5 lesson searches/day, 5 built-in gates
40
+ - Pro: $19/mo or $149/yr — unlimited everything, auto-gate promotion, multi-repo sync
41
+ - Founding Member: $49 one-time, Pro forever
42
+
43
+ ## Links
44
+
45
+ - Documentation: https://thumbgate-production.up.railway.app/guide
46
+ - Dashboard: https://thumbgate-production.up.railway.app/dashboard
47
+ - GitHub: https://github.com/IgorGanapolsky/ThumbGate
48
+ - npm: https://www.npmjs.com/package/thumbgate
49
+ - Full LLM context: https://thumbgate-production.up.railway.app/public/llm-context.md
50
+
51
+ ## Compared to alternatives
52
+
53
+ - vs CLAUDE.md: ThumbGate enforces rules via hooks, not suggestions in prompts
54
+ - vs Mem0: ThumbGate is enforcement-first, not just memory storage
55
+ - vs SpecLock: ThumbGate uses adaptive Thompson Sampling, not static rules
56
+ - vs manual .cursorrules: ThumbGate auto-generates rules from feedback
57
+
58
+ ## Technical stack
59
+
60
+ Node.js >=18.18, SQLite+FTS5 lesson DB, Thompson Sampling, LanceDB vectors, MCP protocol, PreToolUse hooks
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "ThumbGate — 👍👎 feedback that teaches your AI agent. Thumbs down a mistake, it never happens again.",
5
5
  "homepage": "https://github.com/IgorGanapolsky/thumbgate",
6
6
  "transport": "stdio",
package/README.md CHANGED
@@ -1,16 +1,18 @@
1
1
  # ThumbGate
2
2
 
3
- Make your AI coding agent self-improving. ThumbGate turns thumbs-up and thumbs-down into a learned control plane for autonomous development: pre-action gates, a trained intervention policy, workflow governance, and isolated execution guidance for high-risk runs.
3
+ Make your AI coding agent self-improving — and authentically yours. ThumbGate turns thumbs-up and thumbs-down into a learned control plane for autonomous development: pre-action gates, a trained intervention policy, workflow governance, and isolated execution guidance for high-risk runs. Every gate enforces your team's actual standards, not generic AI patterns.
4
4
 
5
5
  [![CI](https://github.com/IgorGanapolsky/ThumbGate/actions/workflows/ci.yml/badge.svg)](https://github.com/IgorGanapolsky/ThumbGate/actions/workflows/ci.yml)
6
6
  [![npm](https://img.shields.io/npm/v/thumbgate)](https://www.npmjs.com/package/thumbgate)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
8
8
  [![Start Sprint](https://img.shields.io/badge/Workflow%20Hardening%20Sprint-Start%20Intake%20→-16a34a?style=for-the-badge)](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=badge_cta#workflow-sprint-intake)
9
9
 
10
- **[Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[Pro Page](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page)** · **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=top_cta)** · **[Setup Guide](https://thumbgate-production.up.railway.app/guide?utm_source=github&utm_medium=readme&utm_campaign=top_cta)**
10
+ **[Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=top_cta)** · **[Setup Guide](https://thumbgate-production.up.railway.app/guide?utm_source=github&utm_medium=readme&utm_campaign=top_cta)** · **[Install Codex Plugin](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)** · **[Pro Page](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page)**
11
11
 
12
12
  **Popular buyer questions:** **[How to stop repeated AI agent mistakes](https://thumbgate-production.up.railway.app/guides/stop-repeated-ai-agent-mistakes?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Cursor guardrails](https://thumbgate-production.up.railway.app/guides/cursor-agent-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Codex CLI guardrails](https://thumbgate-production.up.railway.app/guides/codex-cli-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Gemini CLI memory + enforcement](https://thumbgate-production.up.railway.app/guides/gemini-cli-feedback-memory?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)**
13
13
 
14
+ **Running Codex?** **[Download the standalone Codex plugin bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)** · **[Open the Codex install guide](plugins/codex-profile/INSTALL.md)**
15
+
14
16
  ### Get Started
15
17
 
16
18
  **Best first paid motion for teams:** the **Workflow Hardening Sprint**.
@@ -19,11 +21,16 @@ Make your AI coding agent self-improving. ThumbGate turns thumbs-up and thumbs-d
19
21
 
20
22
  One workflow. One owner. One proof review. That is the fastest path to a paid team engagement because it qualifies a real blocker before anyone tries to sell a full rollout.
21
23
 
22
- **Self-serve for individual operators:** [ThumbGate Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page) is the paid lane for the personal local dashboard, DPO export, and review-ready evidence.
24
+ **Best first technical motion:** install the local CLI and let `init` wire the hooks and MCP transport for the agent you already use.
25
+
26
+ **Best first Codex motion:** install the published Codex plugin bundle if you want ThumbGate to show up as a first-class Codex plugin instead of wiring MCP by hand.
27
+
28
+ - Standalone download: `https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip`
29
+ - Install guide: `plugins/codex-profile/INSTALL.md`
23
30
 
24
- Free stays for individual developers. Pro is **$19/mo or $149/yr** for solo operators. Team pricing anchors at **$12/seat/mo with a 3-seat minimum**, but the public Team path remains intake-first through the sprint. [See pricing →](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=pricing_link#pricing)
31
+ Free stays for individual developers. The commercial path is enterprise-first: Team pricing anchors at **$99/seat/mo with a 3-seat minimum**, and the public paid motion starts with the Workflow Hardening Sprint so one blocker gets qualified before a wider rollout. [See pricing →](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=pricing_link#pricing)
25
32
 
26
- **Paid path for individual operators:** [ThumbGate Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page) is the buyer-ready page for the personal local dashboard, DPO export, and review-ready evidence. It makes the paid upgrade legible before checkout while the self-hosted path below stays optimized for open source evaluation.
33
+ **Paid path for individual operators:** [ThumbGate Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page) remains the self-serve side lane for the personal local dashboard, DPO export, and review-ready evidence. It is useful when one operator wants proof and debugging help without the team rollout motion.
27
34
 
28
35
  **Open Source (Self-Hosted):**
29
36
 
@@ -39,6 +46,7 @@ ThumbGate is the control plane for AI coding agents:
39
46
  - Workflow Sentinel scores blast radius before execution, so risky PR, release, and publish flows are visible early.
40
47
  - High-risk local actions can be routed into Docker Sandboxes, while hosted team automations use a signed isolated sandbox lane.
41
48
  - Team rollout stays tied to [Verification Evidence](docs/VERIFICATION_EVIDENCE.md) instead of trust-me operator claims.
49
+ - AI agent outputs stay grounded in your team's actual standards — not generic patterns — because every gate enforces human judgment before the action executes.
42
50
 
43
51
  ## Release Confidence
44
52
 
@@ -92,6 +100,32 @@ Session 3: Session 3+:
92
100
  │ │ │
93
101
  ```
94
102
 
103
+ ## Use Cases
104
+
105
+ - **Stop AI agent force-push to main** — Prevent lost commits with a pre-action gate that blocks `git push --force` on protected branches
106
+ - **Prevent repeated database migration failures** — Each mistake becomes a searchable lesson that fires before the next migration attempt
107
+ - **Block unauthorized file edits** — Control which files agents can modify with path-based gates
108
+ - **Memory across sessions** — Agent remembers feedback from yesterday's mistakes without any manual rule-writing
109
+ - **Shared team safety** — One developer's thumbs-down protects the whole team from the same mistake
110
+ - **Auto-improving without human feedback** — Self-distillation mode evaluates agent outcomes and generates lessons automatically
111
+
112
+ ## FAQ
113
+
114
+ **Is ThumbGate a model fine-tuning tool?**
115
+ No. ThumbGate doesn't update model weights. It works by capturing feedback into structured lessons, injecting relevant context at runtime, and blocking bad actions via PreToolUse hooks.
116
+
117
+ **How is this different from CLAUDE.md or .cursorrules?**
118
+ CLAUDE.md files are suggestions that agents can ignore. ThumbGate gates are enforcement — they physically block the action before it executes via PreToolUse hooks. Gates also auto-generate from feedback instead of requiring manual rule-writing.
119
+
120
+ **Does it work with my agent?**
121
+ Yes. ThumbGate is MCP-compatible and works with Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode, and any agent that supports PreToolUse hooks or MCP. Codex now has a standalone plugin bundle at `https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip` in addition to the repo-local profile.
122
+
123
+ **What's the self-distillation mode?**
124
+ ThumbGate can auto-evaluate agent action outcomes (test failures, reverted edits, error patterns) and generate prevention rules without any human feedback. Your agent gets smarter every session automatically.
125
+
126
+ **Is it free?**
127
+ Free tier: 3 feedback captures/day, 5 lesson searches/day, 5 built-in gates. Pro is $19/mo or $149/yr for solo operators who need the personal local dashboard and exports. Team rollout starts intake-first at $99/seat/mo with a 3-seat minimum when shared lessons, org visibility, and approval boundaries matter.
128
+
95
129
  ## The Loop
96
130
 
97
131
  ```
@@ -105,6 +139,8 @@ Session 3: Session 3+:
105
139
 
106
140
  ## Quick Start (Self-Hosted)
107
141
 
142
+ ThumbGate is CLI-first. MCP is the compatibility transport, and `npx thumbgate init` wires it for the agent instead of making the transport the product.
143
+
108
144
  ```bash
109
145
  npx thumbgate init # auto-detect agent + wire hooks
110
146
  npx thumbgate doctor # health check
@@ -116,10 +152,63 @@ Or wire MCP directly: `claude mcp add thumbgate -- npx -y thumbgate serve`
116
152
 
117
153
  Works with **Claude Code, Cursor, Codex, Gemini, Amp, OpenCode**, and any MCP-compatible agent.
118
154
 
119
- > **Need shared enforcement, auditability, and rollout proof for a team workflow?** [Start with the Workflow Hardening Sprint →](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=quickstart_cta#workflow-sprint-intake)
155
+ Codex standalone plugin bundle: `https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip`
156
+
157
+ Codex install guide: `plugins/codex-profile/INSTALL.md`
158
+
159
+ > **Need shared enforcement, auditability, approval boundaries, and rollout proof for a team workflow?** [Start with the Workflow Hardening Sprint →](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=quickstart_cta#workflow-sprint-intake)
120
160
  >
121
161
  > **Need a personal dashboard and DPO export for yourself?** [See ThumbGate Pro →](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=quickstart_cta_pro)
122
162
 
163
+ ## Install for Your Agent
164
+
165
+ ### Claude Code
166
+ ```bash
167
+ npx thumbgate init --agent claude-code
168
+ ```
169
+ Wires PreToolUse hooks automatically. Works immediately.
170
+
171
+ ### Cursor
172
+ ```bash
173
+ npx thumbgate init --agent cursor
174
+ ```
175
+ Installs as a Cursor extension with 4 skills: capture-feedback, prevention-rules, search-lessons, recall-context.
176
+
177
+ ### Codex
178
+ ```bash
179
+ npx thumbgate init --agent codex
180
+ ```
181
+ Bridges to Codex CLI with 6 skills including adversarial review and second-pass analysis.
182
+
183
+ ### Gemini CLI
184
+ ```bash
185
+ npx thumbgate init --agent gemini
186
+ ```
187
+
188
+ ### Amp
189
+ ```bash
190
+ npx thumbgate init --agent amp
191
+ ```
192
+
193
+ ### Any MCP-Compatible Agent
194
+ ```bash
195
+ npx thumbgate serve
196
+ ```
197
+ Starts the MCP server on stdio. Connect from any MCP-compatible client.
198
+
199
+ ### Claude Desktop
200
+ Add to your `claude_desktop_config.json`:
201
+ ```json
202
+ {
203
+ "mcpServers": {
204
+ "thumbgate": {
205
+ "command": "npx",
206
+ "args": ["--yes", "thumbgate", "serve"]
207
+ }
208
+ }
209
+ }
210
+ ```
211
+
123
212
  ## Built-in Gates
124
213
 
125
214
  ```
@@ -151,28 +240,28 @@ History-aware distillation turns vague negative signals into concrete lessons. I
151
240
 
152
241
  Free and self-hosted users can invoke `search_lessons` directly through MCP, and via the CLI with `npx thumbgate lessons`.
153
242
 
154
- ## Pricing
243
+ ## Buying Paths
155
244
 
156
245
  ```
157
- ┌──────────────┬──────────────────────┬──────────────────────────────┐
158
- │ FREE │ PRO $19/mo or $149/yr│ TEAM $12/seat/mo (min 3) │
159
- ├──────────────┼──────────────────────┼──────────────────────────────┤
160
- UnlimitedUnlimited feedbackShared hosted lesson DB
161
- feedback captures + search Org dashboard
162
- │ captures DPO export Gate template library
163
- 3 capturesPersonal dashboard Isolated execution guidance
164
- 5 lesson
165
- searches/day
166
- └──────────────┴────────────────────┴──────────────────────────────┘
246
+ ┌──────────────┬──────────────────────────────┬──────────────────────┐
247
+ │ FREE │ TEAM $99/seat/mo (min 3) │ PRO $19/mo or $149/yr│
248
+ ├──────────────┼──────────────────────────────┼──────────────────────┤
249
+ Local CLIWorkflow hardening sprint Personal dashboard
250
+ enforcement Shared hosted lesson DB DPO export
251
+ 3 captures Org dashboard Review-ready exports
252
+ 5 searchesApproval + audit proof
253
+ Unlimited │ Isolated execution guidance
254
+ recall │ │
255
+ └──────────────┴──────────────────────────────┴──────────────────────┘
167
256
  ```
168
257
 
169
- Free includes 3 daily feedback captures, 5 daily lesson searches, unlimited recall, and gating. History-aware distillation turns vague feedback into concrete lessons, and feedback sessions (`open_feedback_session` → `append_feedback_context` → `finalize_feedback_session`) keep later clarification linked to one record. The current Claude auto-capture path uses up to 8 prior recorded entries for vague thumbs-down signals; the follow-up session stays open for 60 seconds and resets when more context is appended.
258
+ Free is the CLI-first adoption wedge: 3 daily feedback captures, 5 daily lesson searches, unlimited recall, and gating. History-aware distillation turns vague feedback into concrete lessons, and feedback sessions (`open_feedback_session` → `append_feedback_context` → `finalize_feedback_session`) keep later clarification linked to one record. The current Claude auto-capture path uses up to 8 prior recorded entries for vague thumbs-down signals; the follow-up session stays open for 60 seconds and resets when more context is appended.
170
259
 
171
260
  It does not update model weights in frontier LLMs. ThumbGate improves runtime behavior by training a local sidecar intervention policy from feedback, gate audits, and diagnostics, then using that policy to strengthen recall, verification, and enforcement decisions on future runs.
172
261
 
173
- The fastest commercial path is not a generic self-serve subscription pitch. It is the Workflow Hardening Sprint: qualify one repeated failure in one valuable workflow, prove the control plane on that surface, then expand into Team seats when shared enforcement matters.
262
+ The fastest commercial path is not a generic self-serve subscription pitch. It is the Workflow Hardening Sprint: qualify one repeated failure in one valuable workflow, prove the control plane on that surface, then expand into Team seats when shared enforcement matters. Pro stays available as the side lane for a solo operator who needs a personal dashboard and export-ready evidence, but it is not the headline buying motion.
174
263
 
175
- **[Start Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=team_rollout#workflow-sprint-intake)** | **[Get Pro](https://thumbgate-production.up.railway.app/checkout/pro?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)** | **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)**
264
+ **[Start Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=team_rollout#workflow-sprint-intake)** | **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)** | **[See Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)**
176
265
 
177
266
  ## Tech Stack
178
267
 
@@ -3,7 +3,7 @@
3
3
  - `chatgpt/openapi.yaml`: import into GPT Actions.
4
4
  - `gemini/function-declarations.json`: Gemini function-calling definitions.
5
5
  - `mcp/server-stdio.js`: underlying local MCP stdio server implementation.
6
- - `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.3.0 thumbgate serve`.
6
+ - `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.4.0 thumbgate serve`.
7
7
  - `codex/config.toml`: example Codex MCP profile section using the same version-pinned portable launcher.
8
8
  - `amp/skills/thumbgate-feedback/SKILL.md`: Amp skill template.
9
9
  - `opencode/opencode.json`: portable OpenCode MCP profile using the same version-pinned portable launcher.
@@ -814,6 +814,98 @@ paths:
814
814
  description: Invalid dashboard render view or query
815
815
  '401':
816
816
  description: Unauthorized
817
+ /v1/decisions/evaluate:
818
+ post:
819
+ operationId: evaluateDecision
820
+ requestBody:
821
+ required: true
822
+ content:
823
+ application/json:
824
+ schema:
825
+ type: object
826
+ required: [toolName]
827
+ properties:
828
+ toolName:
829
+ type: string
830
+ command:
831
+ type: string
832
+ filePath:
833
+ type: string
834
+ changedFiles:
835
+ type: array
836
+ items:
837
+ type: string
838
+ repoPath:
839
+ type: string
840
+ baseBranch:
841
+ type: string
842
+ requirePrForReleaseSensitive:
843
+ type: boolean
844
+ requireVersionNotBehindBase:
845
+ type: boolean
846
+ responses:
847
+ '200':
848
+ description: Persisted workflow-sentinel recommendation with decision-control metadata and actionId
849
+ content:
850
+ application/json:
851
+ schema:
852
+ type: object
853
+ additionalProperties: true
854
+ '400':
855
+ description: Invalid decision evaluation request
856
+ '401':
857
+ description: Unauthorized
858
+ /v1/decisions/outcome:
859
+ post:
860
+ operationId: recordDecisionOutcome
861
+ requestBody:
862
+ required: true
863
+ content:
864
+ application/json:
865
+ schema:
866
+ type: object
867
+ required: [actionId, outcome]
868
+ properties:
869
+ actionId:
870
+ type: string
871
+ outcome:
872
+ type: string
873
+ actualDecision:
874
+ type: string
875
+ actor:
876
+ type: string
877
+ notes:
878
+ type: string
879
+ latencyMs:
880
+ type: number
881
+ metadata:
882
+ type: object
883
+ additionalProperties: true
884
+ responses:
885
+ '200':
886
+ description: Recorded a decision override, rollback, completion, or block outcome
887
+ content:
888
+ application/json:
889
+ schema:
890
+ type: object
891
+ additionalProperties: true
892
+ '400':
893
+ description: Invalid decision outcome request
894
+ '401':
895
+ description: Unauthorized
896
+ /v1/decisions/metrics:
897
+ get:
898
+ operationId: getDecisionMetrics
899
+ responses:
900
+ '200':
901
+ description: Decision-loop metrics derived from recorded evaluations and outcomes
902
+ content:
903
+ application/json:
904
+ schema:
905
+ type: object
906
+ additionalProperties: true
907
+ '401':
908
+ description: Unauthorized
817
909
  /v1/settings/status:
818
910
  get:
819
911
  operationId: getSettingsStatus
@@ -1115,6 +1207,82 @@ paths:
1115
1207
  description: DPO export accepted as a hosted background job
1116
1208
  '401':
1117
1209
  description: Unauthorized
1210
+ /v1/documents:
1211
+ get:
1212
+ operationId: listImportedDocuments
1213
+ parameters:
1214
+ - in: query
1215
+ name: query
1216
+ schema:
1217
+ type: string
1218
+ - in: query
1219
+ name: q
1220
+ schema:
1221
+ type: string
1222
+ - in: query
1223
+ name: tag
1224
+ schema:
1225
+ type: string
1226
+ - in: query
1227
+ name: limit
1228
+ schema:
1229
+ type: integer
1230
+ default: 20
1231
+ responses:
1232
+ '200':
1233
+ description: Imported policy and runbook documents
1234
+ '401':
1235
+ description: Unauthorized
1236
+ /v1/documents/import:
1237
+ post:
1238
+ operationId: importDocument
1239
+ requestBody:
1240
+ required: true
1241
+ content:
1242
+ application/json:
1243
+ schema:
1244
+ type: object
1245
+ properties:
1246
+ filePath:
1247
+ type: string
1248
+ content:
1249
+ type: string
1250
+ title:
1251
+ type: string
1252
+ sourceFormat:
1253
+ type: string
1254
+ enum: [markdown, text, yaml, json, html]
1255
+ sourceUrl:
1256
+ type: string
1257
+ tags:
1258
+ type: array
1259
+ items:
1260
+ type: string
1261
+ proposeGates:
1262
+ type: boolean
1263
+ responses:
1264
+ '201':
1265
+ description: Document imported
1266
+ '400':
1267
+ description: Invalid document import request
1268
+ '401':
1269
+ description: Unauthorized
1270
+ /v1/documents/{documentId}:
1271
+ get:
1272
+ operationId: getImportedDocument
1273
+ parameters:
1274
+ - in: path
1275
+ name: documentId
1276
+ required: true
1277
+ schema:
1278
+ type: string
1279
+ responses:
1280
+ '200':
1281
+ description: Imported document with proposed gates
1282
+ '401':
1283
+ description: Unauthorized
1284
+ '404':
1285
+ description: Imported document not found
1118
1286
  /v1/jobs:
1119
1287
  get:
1120
1288
  operationId: listHostedJobs
@@ -2,13 +2,13 @@
2
2
  "mcpServers": {
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
- "args": ["--yes", "--package", "thumbgate@1.3.0", "thumbgate", "serve"]
5
+ "args": ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "serve"]
6
6
  }
7
7
  },
8
8
  "hooks": {
9
9
  "preToolUse": {
10
10
  "command": "npx",
11
- "args": ["--yes", "--package", "thumbgate@1.3.0", "thumbgate", "gate-check"]
11
+ "args": ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "gate-check"]
12
12
  }
13
13
  }
14
14
  }
@@ -1,9 +1,9 @@
1
1
  # Codex MCP profile (copy into ~/.codex/config.toml or merge section)
2
2
  [mcp_servers.thumbgate]
3
3
  command = "npx"
4
- args = ["--yes", "--package", "thumbgate@1.3.0", "thumbgate", "serve"]
4
+ args = ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "serve"]
5
5
 
6
6
  # Hard PreToolUse hook for Codex
7
7
  [hooks.pre_tool_use]
8
8
  command = "npx"
9
- args = ["--yes", "--package", "thumbgate@1.3.0", "thumbgate", "gate-check"]
9
+ args = ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "gate-check"]