thumbgate 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/.claude-plugin/README.md +25 -0
  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 +242 -126
  7. package/adapters/README.md +1 -1
  8. package/adapters/chatgpt/INSTALL.md +59 -4
  9. package/adapters/chatgpt/openapi.yaml +168 -0
  10. package/adapters/claude/.mcp.json +2 -2
  11. package/adapters/codex/config.toml +2 -2
  12. package/adapters/mcp/server-stdio.js +84 -1
  13. package/adapters/opencode/opencode.json +1 -1
  14. package/bin/cli.js +204 -13
  15. package/bin/postinstall.js +8 -2
  16. package/config/budget.json +18 -0
  17. package/config/gates/code-edit.json +61 -0
  18. package/config/gates/db-write.json +61 -0
  19. package/config/gates/default.json +154 -3
  20. package/config/gates/deploy.json +61 -0
  21. package/config/github-about.json +2 -1
  22. package/config/merge-quality-checks.json +23 -0
  23. package/openapi/openapi.yaml +168 -0
  24. package/package.json +47 -11
  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/opencode-profile/INSTALL.md +1 -1
  34. package/public/blog.html +73 -0
  35. package/public/compare/mem0.html +189 -0
  36. package/public/compare/speclock.html +180 -0
  37. package/public/compare.html +10 -2
  38. package/public/guide.html +2 -2
  39. package/public/guides/claude-code-prevent-repeated-mistakes.html +161 -0
  40. package/public/guides/codex-cli-guardrails.html +158 -0
  41. package/public/guides/cursor-prevent-repeated-mistakes.html +161 -0
  42. package/public/guides/pre-action-gates.html +162 -0
  43. package/public/guides/stop-repeated-ai-agent-mistakes.html +159 -0
  44. package/public/index.html +172 -65
  45. package/public/lessons.html +33 -24
  46. package/public/llm-context.md +140 -0
  47. package/public/pro.html +24 -22
  48. package/scripts/access-anomaly-detector.js +1 -1
  49. package/scripts/adk-consolidator.js +1 -5
  50. package/scripts/agent-security-hardening.js +4 -6
  51. package/scripts/agentic-data-pipeline.js +1 -3
  52. package/scripts/async-job-runner.js +1 -5
  53. package/scripts/audit-trail.js +1 -5
  54. package/scripts/auto-promote-gates.js +5 -3
  55. package/scripts/background-agent-governance.js +2 -10
  56. package/scripts/billing-setup.js +109 -0
  57. package/scripts/billing.js +2 -16
  58. package/scripts/budget-enforcer.js +173 -0
  59. package/scripts/build-claude-mcpb.js +71 -5
  60. package/scripts/build-codex-plugin.js +152 -0
  61. package/scripts/check-congruence.js +132 -14
  62. package/scripts/commercial-offer.js +5 -7
  63. package/scripts/content-engine/linkedin-content-generator.js +154 -0
  64. package/scripts/content-engine/output/linkedin-memento-validation.md +17 -0
  65. package/scripts/content-engine/output/linkedin-posts-2026-04-09.md +175 -0
  66. package/scripts/content-engine/reddit-thread-finder.js +154 -0
  67. package/scripts/context-engine.js +21 -6
  68. package/scripts/contextfs.js +1 -21
  69. package/scripts/dashboard.js +20 -0
  70. package/scripts/decision-journal.js +341 -0
  71. package/scripts/delegation-runtime.js +1 -5
  72. package/scripts/distribution-surfaces.js +54 -0
  73. package/scripts/document-intake.js +927 -0
  74. package/scripts/ephemeral-agent-store.js +1 -8
  75. package/scripts/evolution-state.js +1 -5
  76. package/scripts/experiment-tracker.js +1 -5
  77. package/scripts/export-databricks-bundle.js +1 -5
  78. package/scripts/export-hf-dataset.js +1 -5
  79. package/scripts/export-training.js +1 -5
  80. package/scripts/feedback-attribution.js +1 -16
  81. package/scripts/feedback-history-distiller.js +1 -16
  82. package/scripts/feedback-loop.js +1 -5
  83. package/scripts/feedback-root-consolidator.js +2 -21
  84. package/scripts/feedback-session.js +49 -0
  85. package/scripts/feedback-to-rules.js +215 -36
  86. package/scripts/filesystem-search.js +1 -9
  87. package/scripts/fs-utils.js +104 -0
  88. package/scripts/gates-engine.js +200 -11
  89. package/scripts/github-about.js +32 -8
  90. package/scripts/gtm-revenue-loop.js +1 -5
  91. package/scripts/harness-selector.js +148 -0
  92. package/scripts/hosted-config.js +2 -0
  93. package/scripts/hosted-job-launcher.js +1 -5
  94. package/scripts/hybrid-feedback-context.js +33 -49
  95. package/scripts/intervention-policy.js +58 -1
  96. package/scripts/lesson-db.js +3 -18
  97. package/scripts/lesson-inference.js +194 -16
  98. package/scripts/lesson-retrieval.js +60 -24
  99. package/scripts/llm-client.js +59 -0
  100. package/scripts/managed-lesson-agent.js +183 -0
  101. package/scripts/marketing-experiment.js +8 -22
  102. package/scripts/meta-agent-loop.js +624 -0
  103. package/scripts/metered-billing.js +1 -1
  104. package/scripts/money-watcher.js +1 -4
  105. package/scripts/obsidian-export.js +1 -5
  106. package/scripts/operational-integrity.js +15 -3
  107. package/scripts/operational-summary.js +41 -5
  108. package/scripts/org-dashboard.js +6 -1
  109. package/scripts/per-step-scoring.js +2 -4
  110. package/scripts/pr-manager.js +201 -19
  111. package/scripts/pro-features.js +3 -2
  112. package/scripts/prompt-dlp.js +3 -3
  113. package/scripts/prove-adapters.js +1 -5
  114. package/scripts/prove-attribution.js +1 -5
  115. package/scripts/prove-automation.js +1 -3
  116. package/scripts/prove-cloudflare-sandbox.js +1 -3
  117. package/scripts/prove-data-pipeline.js +1 -3
  118. package/scripts/prove-intelligence.js +1 -3
  119. package/scripts/prove-lancedb.js +1 -5
  120. package/scripts/prove-local-intelligence.js +1 -3
  121. package/scripts/prove-packaged-runtime.js +75 -9
  122. package/scripts/prove-predictive-insights.js +1 -3
  123. package/scripts/prove-training-export.js +1 -3
  124. package/scripts/prove-workflow-contract.js +1 -5
  125. package/scripts/ralph-loop.js +376 -0
  126. package/scripts/ralph-mode-ci.js +331 -0
  127. package/scripts/rate-limiter.js +3 -1
  128. package/scripts/reddit-dm-outreach.js +14 -4
  129. package/scripts/rotate-stripe-webhook-secret.js +314 -0
  130. package/scripts/schedule-manager.js +3 -5
  131. package/scripts/security-scanner.js +448 -0
  132. package/scripts/self-distill-agent.js +579 -0
  133. package/scripts/semantic-dedup.js +115 -0
  134. package/scripts/skill-exporter.js +1 -3
  135. package/scripts/skill-generator.js +1 -5
  136. package/scripts/social-analytics/engagement-audit.js +1 -18
  137. package/scripts/social-analytics/pollers/linkedin.js +26 -16
  138. package/scripts/social-analytics/publishers/linkedin.js +1 -1
  139. package/scripts/social-analytics/publishers/zernio.js +51 -0
  140. package/scripts/social-pipeline.js +1 -3
  141. package/scripts/social-post-hourly.js +47 -4
  142. package/scripts/statusline-links.js +6 -5
  143. package/scripts/statusline.sh +29 -153
  144. package/scripts/sync-branch-protection.js +340 -0
  145. package/scripts/tessl-export.js +1 -3
  146. package/scripts/thumbgate-search.js +32 -1
  147. package/scripts/tool-kpi-tracker.js +1 -1
  148. package/scripts/tool-registry.js +106 -2
  149. package/scripts/vector-store.js +1 -5
  150. package/scripts/weekly-auto-post.js +1 -1
  151. package/scripts/workflow-sentinel.js +91 -0
  152. package/skills/thumbgate/SKILL.md +1 -1
  153. package/src/api/server.js +296 -7
  154. package/scripts/__pycache__/train_from_feedback.cpython-312.pyc +0 -0
  155. package/scripts/social-analytics/db/social-analytics.db-shm +0 -0
  156. /package/scripts/social-analytics/db/{social-analytics.db-wal → analytics.sqlite} +0 -0
package/README.md CHANGED
@@ -1,213 +1,329 @@
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
+ **Thumbs up or thumbs down and your AI coding agent never makes the same mistake twice.**
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)** · **[Use in ChatGPT](adapters/chatgpt/INSTALL.md)** · **[Install Claude Desktop Extension](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb)** · **[Claude Plugin Guide](docs/CLAUDE_DESKTOP_EXTENSION.md)** · **[Install Codex Plugin](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)** · **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=top_cta)** · **[Pro Page](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page)**
11
11
 
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)**
12
+ **Popular buyer questions:** **[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
- ### Get Started
14
+ **Running Claude Desktop?** **[Download Claude bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb)** · **[Install + submission guide](docs/CLAUDE_DESKTOP_EXTENSION.md)** · **[Review packet zip](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-plugin-review.zip)**
15
15
 
16
- **Best first paid motion for teams:** the **Workflow Hardening Sprint**.
16
+ **Running Codex?** **[Download the standalone Codex plugin bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)** · **[Codex install guide](plugins/codex-profile/INSTALL.md)**
17
17
 
18
- [![Start Workflow Hardening Sprint](https://img.shields.io/badge/>>%20Start%20Intake%20→%20Workflow%20Hardening%20Sprint-16a34a?style=for-the-badge)](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=get_started#workflow-sprint-intake)
18
+ **Running ChatGPT?** Search GPT Store for `ThumbGate` by Igor Ganapolsky. Regular users reply with 👍/👎 or "thumbs up/down" on answers, save the lesson, prevent repeated bad answers, and reinforce the answers that worked. Developers can import the prepared **[GPT Actions OpenAPI spec](adapters/chatgpt/openapi.yaml)** with the **[ChatGPT install guide](adapters/chatgpt/INSTALL.md)**.
19
19
 
20
- 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.
20
+ **Official directory pending review?** Claude Code users can install today with `/plugin marketplace add IgorGanapolsky/ThumbGate` then `/plugin install thumbgate@thumbgate-marketplace`.
21
21
 
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.
22
+ ---
23
23
 
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)
24
+ ## What problem does this solve?
25
25
 
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.
26
+ AI agents repeat mistakes. You fix the same problem in session after session force-push to main, broken migrations, unauthorized file edits because the agent has no memory of your feedback.
27
27
 
28
- **Open Source (Self-Hosted):**
29
-
30
- ```bash
31
- npx thumbgate init
28
+ ```
29
+ ┌─────────────────────────────────────────────────────────────┐
30
+ │ THE PROBLEM │
31
+ │ │
32
+ │ Session 1: Agent breaks something. You fix it. │
33
+ │ Session 2: Agent breaks it again. You fix it again. │
34
+ │ Session 3: Same thing. Again. │
35
+ │ │
36
+ │ THE SOLUTION │
37
+ │ │
38
+ │ Session 1: Agent breaks something. You 👎 it. │
39
+ │ Session 2: ⛔ Gate blocks the mistake before it happens. │
40
+ │ Session 3+: Never see it again. │
41
+ └─────────────────────────────────────────────────────────────┘
32
42
  ```
33
43
 
34
- ## Enterprise Story
44
+ ThumbGate is the **control plane** for AI coding agents — turning your feedback into **enforced rules**, not suggestions.
35
45
 
36
- ThumbGate is the control plane for AI coding agents:
46
+ ---
37
47
 
38
- - Feedback becomes enforcement, so repeated failures stop at the gate instead of reappearing in review.
39
- - Workflow Sentinel scores blast radius before execution, so risky PR, release, and publish flows are visible early.
40
- - High-risk local actions can be routed into Docker Sandboxes, while hosted team automations use a signed isolated sandbox lane.
41
- - Team rollout stays tied to [Verification Evidence](docs/VERIFICATION_EVIDENCE.md) instead of trust-me operator claims.
48
+ ## How It Works in 3 Steps
42
49
 
43
- ## Release Confidence
50
+ ```
51
+ STEP 1 STEP 2 STEP 3
52
+ ──────── ──────── ────────
44
53
 
45
- Enterprise buyers do not just need a safer runtime. They need legible publishes.
54
+ You react ThumbGate learns The gate holds
46
55
 
47
- - Release-relevant PRs must carry a `.changeset/*.md` entry, so every shipped package version has a customer-readable explanation before publish.
48
- - [SemVer Policy](docs/SEMVER_POLICY.md) and version-sync checks keep `package.json`, `CHANGELOG.md`, plugin manifests, and installer metadata aligned.
49
- - CI enforces changeset coverage, version sync, tests, coverage, proof lanes, and operational integrity before merge.
50
- - Final close-out requires verifying the exact `main` merge commit, with proof anchored in [Verification Evidence](docs/VERIFICATION_EVIDENCE.md).
56
+ 👎 on a bad ──► Feedback becomes ──► Next time the
57
+ agent action a saved lesson agent tries the
58
+ and a block rule same thing:
59
+ 👍 on a good ──► Good pattern gets ⛔ BLOCKED
60
+ agent action reinforced (or ✅ allowed)
61
+ ```
51
62
 
52
- See [Release Confidence](docs/RELEASE_CONFIDENCE.md) for the full trust chain.
63
+ That's it. No manual rule-writing. No config files to maintain. Your reactions teach the agent what your team actually wants.
64
+
65
+ ---
53
66
 
54
67
  ## Before / After
55
68
 
56
69
  ```
57
- WITHOUT THUMBGATE WITH THUMBGATE
70
+ WITHOUT THUMBGATEWITH THUMBGATE
71
+ ───────────────────────────────┼───────────────────────────────
72
+ Session 1: │ Session 1:
73
+ Agent force-pushes to main. │ Agent force-pushes to main.
74
+ You correct it manually. │ You 👎 it.
75
+
76
+ Session 2: │ Session 2:
77
+ Agent force-pushes again. │ ⛔ Gate blocks force-push.
78
+ It learned nothing. │ Agent uses safe push instead.
79
+
80
+ Session 3: │ Session 3+:
81
+ Same mistake. Again. │ Permanently fixed.
82
+ And again. │
83
+ ```
58
84
 
59
- Session 1: Session 1:
60
- Agent force-pushes to main. Agent force-pushes to main.
61
- You correct it. You 👎 it.
85
+ ---
62
86
 
63
- Session 2: Session 2:
64
- Agent force-pushes again. ⛔ Gate blocks force-push.
65
- It learned nothing. Agent uses safe push instead.
87
+ ## The Feedback Loop
66
88
 
67
- Session 3: Session 3+:
68
- Same mistake. Again. Permanently fixed.
89
+ ```
90
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
91
+ │ Capture │───►│ Learn │───►│ Remember │───►│ Rule │───►│ Gate │
92
+ │ │ │ │ │ │ │ │ │ │
93
+ │ 👍 / 👎 │ │ Feedback │ │ Stored │ │ Auto- │ │ Blocks │
94
+ │ │ │ becomes │ │ lessons │ │ generated│ │ bad │
95
+ │ │ │ a lesson │ │ & search │ │ from │ │ actions │
96
+ │ │ │ │ │ │ │ feedback │ │ live │
97
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
69
98
  ```
70
99
 
71
- ## How It Works
100
+ ---
72
101
 
73
- ```
74
- YOU THUMBGATE YOUR AGENT
75
- │ │ │
76
- │ 👎 "broke prod" │ │
77
- ├───────────────────────►│ │
78
- │ │ distill + validate │
79
- │ │ ┌─────────────────┐ │
80
- │ │ │ lesson + rule │ │
81
- │ │ │ created │ │
82
- │ │ └─────────────────┘ │
83
- │ │ │
84
- │ │ PreToolUse hook fires │
85
- │ │◄───────────────────────────┤ tries same mistake
86
- │ │ ⛔ BLOCKED │
87
- │ ├───────────────────────────►│ forced to try safe path
88
- │ │ │
89
- │ 👍 "good fix" │ │
90
- ├───────────────────────►│ │
91
- │ │ reinforced ✅ │
92
- │ │ │
93
- ```
102
+ ## Get Started
94
103
 
95
- ## The Loop
104
+ **Best first paid motion for teams:** the **Workflow Hardening Sprint** — qualify one repeated failure before committing to a full rollout. **[Start intake →](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=team_rollout#workflow-sprint-intake)**
96
105
 
106
+ **Best first technical motion:** install the CLI-first and let `init` wire hooks for the agent you already use.
107
+
108
+ **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 self-serve side lane for a personal dashboard and export-ready evidence.
109
+
110
+ ---
111
+
112
+ ## Quick Start
113
+
114
+ ```bash
115
+ npx thumbgate init # detects your agent and wires everything up
116
+ npx thumbgate doctor # health check
117
+ npx thumbgate lessons # see what's been learned
118
+ npx thumbgate dashboard # open local dashboard
97
119
  ```
98
- ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
99
- │ Capture │────►│ Distill │────►│ Remember │────►│ Rule │────►│ Gate │
100
- │ 👍 / 👎 │ │ history- │ │ SQLite + │ │ auto-gen │ │ PreTool │
101
- │ │ │ aware │ │ FTS5 DB │ │ from │ │ Use hook │
102
- │ │ │ │ │ │ │ failures │ │ enforces │
103
- └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
104
- ```
105
120
 
106
- ## Quick Start (Self-Hosted)
121
+ Or wire MCP directly: `claude mcp add thumbgate -- npx --yes --package thumbgate thumbgate serve`
122
+
123
+ Works with **Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode**, and any MCP-compatible agent.
124
+
125
+ ---
107
126
 
127
+ ## Install for Your Agent
128
+
129
+ ### Claude Code
108
130
  ```bash
109
- npx thumbgate init # auto-detect agent + wire hooks
110
- npx thumbgate doctor # health check
111
- npx thumbgate lessons # inspect learned lessons
112
- npx thumbgate dashboard # local dashboard
131
+ npx thumbgate init --agent claude-code
113
132
  ```
133
+ Wires hooks automatically. Works immediately.
114
134
 
115
- Or wire MCP directly: `claude mcp add thumbgate -- npx -y thumbgate serve`
135
+ ### Cursor
136
+ ```bash
137
+ npx thumbgate init --agent cursor
138
+ ```
139
+ Installs as a Cursor extension with 4 skills: capture feedback, manage rules, search lessons, recall context.
116
140
 
117
- Works with **Claude Code, Cursor, Codex, Gemini, Amp, OpenCode**, and any MCP-compatible agent.
141
+ ### Codex
142
+ ```bash
143
+ npx thumbgate init --agent codex
144
+ ```
145
+ Bridges to Codex CLI with 6 skills including adversarial review and second-pass analysis.
118
146
 
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)
120
- >
121
- > **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)
147
+ ### Gemini CLI
148
+ ```bash
149
+ npx thumbgate init --agent gemini
150
+ ```
122
151
 
123
- ## Built-in Gates
152
+ ### Amp
153
+ ```bash
154
+ npx thumbgate init --agent amp
155
+ ```
124
156
 
157
+ ### Any MCP-Compatible Agent
158
+ ```bash
159
+ npx thumbgate serve
125
160
  ```
126
- ┌─────────────────────────────────────────────────────────┐
127
- │ ENFORCEMENT LAYER │
128
- │ │
129
- │ ⛔ force-push → blocks git push --force │
130
- │ ⛔ protected-branch → blocks direct push to main │
131
- │ ⛔ unresolved-threads → blocks push with open reviews │
132
- package-lock-reset → blocks destructive lock edits │
133
- │ ⛔ env-file-edit → blocks .env secret exposure │
134
- │ │
135
- │ + custom gates in config/gates/custom.json │
136
- └─────────────────────────────────────────────────────────┘
161
+ Starts the MCP server on stdio. Connect from any MCP-compatible client.
162
+
163
+ ### Claude Desktop
164
+ Add to your `claude_desktop_config.json`:
165
+ ```json
166
+ {
167
+ "mcpServers": {
168
+ "thumbgate": {
169
+ "command": "npx",
170
+ "args": ["--yes", "--package", "thumbgate", "thumbgate", "serve"]
171
+ }
172
+ }
173
+ }
137
174
  ```
175
+ Or [download the packaged extension bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb) and install directly.
176
+
177
+ ---
178
+
179
+ ## Use Cases
180
+
181
+ - **Stop force-push to main** — A gate blocks `git push --force` on protected branches before it runs
182
+ - **Prevent repeated migration failures** — Each mistake becomes a searchable lesson that fires before the next attempt
183
+ - **Block unauthorized file edits** — Control which files agents can touch with path-based rules
184
+ - **Memory across sessions** — The agent remembers your feedback from yesterday without any manual rule-writing
185
+ - **Shared team safety** — One developer's thumbs-down protects the whole team from the same mistake
186
+ - **Auto-improving without feedback** — Self-improvement mode evaluates outcomes and generates rules automatically
187
+
188
+ ---
138
189
 
139
190
  ## Feedback Sessions
140
191
 
192
+ Give the agent more context when a thumbs-down isn't enough:
193
+
141
194
  ```
142
195
  👎 thumbs down
143
196
  └─► open_feedback_session
144
- └─► "you lied about deployment" (append_feedback_context)
145
- └─► "tests were actually failing" (append_feedback_context)
197
+ └─► "you lied about deployment" (append_feedback_context)
198
+ └─► "tests were actually failing" (append_feedback_context)
146
199
  └─► finalize_feedback_session
147
200
  └─► lesson inferred from full conversation
148
201
  ```
149
202
 
150
- History-aware distillation turns vague negative signals into concrete lessons. In the current Claude auto-capture path, ThumbGate can reuse up to 8 prior recorded conversation entries plus the failed tool call, then keep a linked 60-second follow-up session open for later clarification.
203
+ ThumbGate uses up to 8 prior conversation entries to turn vague, history-aware negative signals into specific, actionable lessons. A 60-second follow-up window stays open for additional context via `open_feedback_session` → `append_feedback_context` → `finalize_feedback_session`.
151
204
 
152
205
  Free and self-hosted users can invoke `search_lessons` directly through MCP, and via the CLI with `npx thumbgate lessons`.
153
206
 
154
- ## Pricing
207
+ ---
208
+
209
+ ## Built-in Gates
155
210
 
156
211
  ```
157
- ┌──────────────┬──────────────────────┬──────────────────────────────┐
158
- FREE │ PRO $19/mo or $149/yr TEAM $12/seat/mo (min 3) │
159
- ├──────────────┼──────────────────────┼──────────────────────────────┤
160
- Unlimited │ Unlimited feedback Shared hosted lesson DB
161
- feedback │ captures + search │ Org dashboard
162
- captures │ DPO export │ Gate template library
163
- 3 captures │ Personal dashboard Isolated execution guidance
164
- 5 lesson │ │
165
- searches/day │ │
166
- └──────────────┴────────────────────┴──────────────────────────────┘
212
+ ┌─────────────────────────────────────────────────────────┐
213
+ ENFORCEMENT LAYER
214
+ │ │
215
+ force-push → blocks git push --force
216
+ protected-branch → blocks direct push to main
217
+ unresolved-threads → blocks push with open reviews
218
+ package-lock-reset → blocks destructive lock edits
219
+ env-file-edit → blocks .env secret exposure
220
+
221
+ │ + custom gates in config/gates/custom.json │
222
+ └─────────────────────────────────────────────────────────┘
167
223
  ```
168
224
 
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.
225
+ ---
170
226
 
171
- 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.
227
+ ## Pricing
172
228
 
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.
229
+ ```
230
+ ┌──────────────────┬──────────────────────────────┬──────────────────────┐
231
+ │ FREE │ TEAM $99/seat/mo (min 3) │ PRO $19/mo · $149/yr│
232
+ ├──────────────────┼──────────────────────────────┼──────────────────────┤
233
+ │ Local CLI │ Workflow Hardening Sprint │ Personal dashboard │
234
+ │ Enforced gates │ Shared hosted lesson DB │ Export feedback data │
235
+ │ 3 captures/day │ Org-wide dashboard │ Review-ready exports │
236
+ │ 5 searches/day │ Approval + audit proof │ │
237
+ │ Unlimited recall │ Isolated execution guidance │ │
238
+ └──────────────────┴──────────────────────────────┴──────────────────────┘
239
+ ```
240
+
241
+ **[Start 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)** · **[See Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page)**
174
242
 
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)**
243
+ **Where to start:**
244
+ - **Teams:** Begin with the Workflow Hardening Sprint — qualify one real repeated failure before committing to a full rollout
245
+ - **Solo operators:** ThumbGate Pro adds a personal dashboard and export-ready evidence
246
+ - **Individuals & open source:** Free CLI tier, self-hosted
247
+
248
+ ---
176
249
 
177
250
  ## Tech Stack
178
251
 
179
252
  ```
180
- ┌─────────────────────────────────────────────────────────┐
181
- STORAGE INTELLIGENCE ENFORCEMENT
182
-
183
- SQLite + FTS5 MemAlign dual PreToolUse │
184
- LanceDB vectors recall hook engine
185
- JSONL logs Thompson Sampling Gates config
186
- ContextFS Hook wiring
187
- ├───────────────────┼───────────────────┼──────────────────┤
188
- INTERFACES BILLING EXECUTION
189
- │ │ │ │
190
- MCP stdio Stripe Railway
191
- HTTP API Cloudflare
192
- CLI Workers
193
- Node.js >=18 Docker
194
- Sandboxes │
195
- └───────────────────┴───────────────────┴──────────────────┘
253
+ ┌──────────────────────┬──────────────────────┬──────────────────────┐
254
+ STORAGE INTELLIGENCE ENFORCEMENT
255
+
256
+ SQLite + FTS5 MemAlign dual recall PreToolUse hook
257
+ LanceDB vectors Thompson Sampling │ engine
258
+ JSONL logs (adaptive lesson Gates config
259
+ File-based context │ selection) Hook wiring
260
+ │ │ │ │
261
+
262
+ ├──────────────────────┼──────────────────────┼──────────────────────┤
263
+ INTERFACES BILLING EXECUTION
264
+
265
+ MCP stdio Stripe Railway
266
+ HTTP API Cloudflare Workers
267
+ CLI Docker Sandboxes │
268
+ │ Node.js >=18 │ │ │
269
+ └──────────────────────┴──────────────────────┴──────────────────────┘
196
270
  ```
197
271
 
272
+ ---
273
+
274
+ ## FAQ
275
+
276
+ **Is ThumbGate a model fine-tuning tool?**
277
+ No. ThumbGate does not update model weights in frontier LLMs. It captures your feedback, stores lessons, injects context at runtime, and blocks bad actions before they execute.
278
+
279
+ **How is this different from CLAUDE.md or .cursorrules?**
280
+ Those are suggestions the agent can ignore. ThumbGate gates are enforced — they physically block the action before it runs. They also auto-generate from feedback instead of requiring manual writing.
281
+
282
+ **Does it work with my agent?**
283
+ Yes. It's MCP-compatible and works with Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, Amp, OpenCode, and any agent that supports MCP or pre-action hooks.
284
+
285
+ **What's self-improvement mode?**
286
+ ThumbGate can watch for failure signals (test failures, reverted edits, error patterns) and auto-generate prevention rules — no thumbs-down required. Your agent gets smarter every session.
287
+
288
+ **Is it free?**
289
+ Free tier: **3 daily feedback captures**, **5 daily lesson searches**, unlimited recall, enforced gates. History-aware distillation turns vague feedback into specific lessons. Pro is $19/mo or $149/yr for a personal dashboard and exports. Team rollout starts at $99/seat/mo (3-seat minimum) with shared hosted lesson DB, org dashboard, approval + audit proof, and isolated execution guidance.
290
+
291
+ ---
292
+
293
+ ## Enterprise Story
294
+
295
+ ThumbGate is the control plane for AI coding agents:
296
+
297
+ - Feedback becomes enforcement — repeated failures stop at the gate instead of reappearing in review.
298
+ - **Workflow Sentinel** scores blast radius before execution, so risky PR, release, and publish flows are visible early.
299
+ - High-risk local actions route into **Docker Sandboxes**; hosted team automations use a signed isolated sandbox lane.
300
+ - Team rollout stays tied to [Verification Evidence](docs/VERIFICATION_EVIDENCE.md) instead of trust-me operator claims.
301
+
302
+ ## Release Confidence
303
+
304
+ - Every PR must carry a **Changeset** entry — each shipped version has a customer-readable explanation before publish.
305
+ - Version-sync checks keep `package.json`, `CHANGELOG.md`, plugin manifests, and installer metadata aligned.
306
+ - Final close-out requires verifying the exact `main` merge commit, with proof anchored in [Verification Evidence](docs/VERIFICATION_EVIDENCE.md).
307
+
308
+ See [Release Confidence](docs/RELEASE_CONFIDENCE.md) for the full trust chain.
309
+
310
+ ---
311
+
198
312
  ## Docs
199
313
 
200
314
  - [Commercial Truth](docs/COMMERCIAL_TRUTH.md) — pricing, claims, what we don't say
201
- - [Changeset Strategy](docs/CHANGESET_STRATEGY.md) — how release notes, version bumps, and customer-facing change records are enforced
202
- - [First Dollar Playbook](docs/FIRST_DOLLAR_PLAYBOOK.md) — the operator loop for turning one painful workflow into the next booked pilot
203
- - [Release Confidence](docs/RELEASE_CONFIDENCE.md) — how Changesets, SemVer, sync checks, proof lanes, and exact-merge verification make publishes inspectable
315
+ - [Changeset Strategy](docs/CHANGESET_STRATEGY.md) — how release notes and version bumps are enforced
316
+ - [First Dollar Playbook](docs/FIRST_DOLLAR_PLAYBOOK.md) — turning one painful workflow into the next booked pilot
317
+ - [Release Confidence](docs/RELEASE_CONFIDENCE.md) — how changesets, version checks, and proof lanes make publishes inspectable
204
318
  - [SemVer Policy](docs/SEMVER_POLICY.md) — stable vs prerelease channel rules
205
319
  - [Verification Evidence](docs/VERIFICATION_EVIDENCE.md) — proof artifacts
206
320
  - [WORKFLOW.md](WORKFLOW.md) — agent-run contract (scope, hard stops, proof commands)
207
- - [ready-for-agent issue template](.github/ISSUE_TEMPLATE/ready-for-agent.yml) — intake for agent tasks
321
+ - [Ready-for-agent issue template](.github/ISSUE_TEMPLATE/ready-for-agent.yml) — intake for agent tasks
208
322
 
209
323
  Pro overlay: [`thumbgate-pro`](https://github.com/IgorGanapolsky/thumbgate-pro) — separate repo/package inheriting from this base.
210
324
 
325
+ ---
326
+
211
327
  ## License
212
328
 
213
329
  MIT. See [LICENSE](LICENSE).
@@ -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.
@@ -1,11 +1,64 @@
1
1
  # ChatGPT GPT Actions: ThumbGate Install
2
2
 
3
- Import the OpenAPI spec into a Custom GPT in under 5 minutes. No coding required.
3
+ Use the published ThumbGate GPT from GPT Store when it is visible for your account, or import the OpenAPI spec into a Custom GPT in under 5 minutes. Regular users use it by replying with 👍/👎 or "thumbs up/down" on ChatGPT answers so ThumbGate remembers lessons, prevents repeated bad answers, and reinforces the answers that worked.
4
+
5
+ ## GPT Store path
6
+
7
+ 1. Open ChatGPT.
8
+ 2. Open **Explore GPTs**.
9
+ 3. Search for `ThumbGate`.
10
+ 4. Choose the GPT by **Igor Ganapolsky** in the **Programming** category.
11
+
12
+ Direct store URL status: published by the operator on April 13, 2026, but the public `chatgpt.com/g/...` URL has not been captured in this repo yet. Do not invent a URL; add it here once the share link is available.
13
+
14
+ ## 30-second regular-user flow
15
+
16
+ 1. Ask the ThumbGate GPT any normal question.
17
+ 2. If the answer helped, reply with `👍` plus one sentence about what worked.
18
+ 3. If the answer missed, reply with `👎` plus one sentence about what to change.
19
+ 4. Ask `What do you remember about how I like answers?` to verify the saved lessons.
20
+
21
+ The user should never need to know what MCP, OpenAPI, Actions, DPO, or prevention rules mean. The GPT should explain the loop as: "Reply 👍 or 👎. I remember the lesson for next time."
22
+
23
+ ## Regular-user prompts
24
+
25
+ Use these as GPT conversation starters so regular users know how to teach ThumbGate:
26
+
27
+ 1. `👎 this answer was too vague. Next time give me exact steps.`
28
+ 2. `👍 this format worked. Remember to answer with short numbered steps.`
29
+ 3. `Thumbs down: you assumed I know technical terms. Next time explain it for a beginner first.`
30
+ 4. `Remember this lesson: I prefer direct answers with examples before theory.`
31
+ 5. `Search my ThumbGate lessons before answering this.`
32
+
33
+ Use typed chat replies. ChatGPT's native feedback buttons may send feedback to OpenAI, but they should not be described as the ThumbGate capture path unless OpenAI exposes them to GPT Actions.
34
+
35
+ ## Pre-action gate flow
36
+
37
+ Use this when the user asks whether an AI agent should run a proposed action, command, file edit, deployment, merge, or publish step:
38
+
39
+ 1. The GPT calls `evaluateDecision` (`POST /v1/decisions/evaluate`) before answering.
40
+ 2. If the response has `decisionControl.executionMode: "blocked"`, the GPT says the action is blocked and explains the returned reason.
41
+ 3. If the response has `decisionControl.executionMode: "checkpoint_required"`, the GPT asks for explicit confirmation before proceeding.
42
+ 4. If the response has `decisionControl.executionMode: "auto_execute"`, the GPT can say the action is allowed and summarize why.
43
+
44
+ Plain thumbs-up/down feedback is the memory loop. The decision endpoint is the gate loop. Do not claim hard blocking unless the decision endpoint, a saved lesson, or a prevention rule was actually applied.
45
+
46
+ ## Best first GPT message
47
+
48
+ Use this as the first response for regular users:
49
+
50
+ ```text
51
+ Ask me anything. After my answer, reply 👍 if it helped or 👎 plus one sentence if it missed. I will remember the lesson, avoid repeating bad answer patterns, and reuse the formats you like.
52
+ ```
4
53
 
5
54
  ## Prerequisites
6
55
 
7
56
  - A ChatGPT Plus or Team account (Custom GPTs require a paid plan)
8
- - ThumbGate API running at a public HTTPS URL (see [Deployment docs](../../docs/deployment.md))
57
+ - ThumbGate API running at `https://thumbgate-production.up.railway.app`
58
+ - Privacy policy URL: `https://thumbgate-production.up.railway.app/privacy`
59
+ - Owner-managed `THUMBGATE_API_KEY` for one-time GPT Builder Actions auth
60
+
61
+ Regular GPT users should not need an API key, JSON payload, OpenAPI knowledge, or developer setup. They should only see the thumbs-up/down memory loop.
9
62
 
10
63
  ## Step 1 — Open GPT Builder
11
64
 
@@ -19,7 +72,7 @@ Import the OpenAPI spec into a Custom GPT in under 5 minutes. No coding required
19
72
  2. Click **Create new action**
20
73
  3. Click **Import from URL** — paste your hosted spec URL:
21
74
  ```
22
- https://<your-railway-domain>/openapi.yaml
75
+ https://thumbgate-production.up.railway.app/openapi.yaml
23
76
  ```
24
77
  Or click **Upload file** and select:
25
78
  ```
@@ -34,13 +87,15 @@ In the Actions panel:
34
87
  2. **Auth type**: Bearer
35
88
  3. **API Key**: paste your `THUMBGATE_API_KEY` value
36
89
 
90
+ This is an owner setup field. Do not ask regular GPT users to provide an API key.
91
+
37
92
  ## Step 4 — Update the Server URL
38
93
 
39
94
  In the imported spec, confirm the `servers.url` points to your deployed API:
40
95
 
41
96
  ```yaml
42
97
  servers:
43
- - url: https://<your-railway-domain>
98
+ - url: https://thumbgate-production.up.railway.app
44
99
  ```
45
100
 
46
101
  If you uploaded the file, edit the server URL in the GPT Actions editor.