thumbgate 1.4.1 → 1.4.3

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 (60) hide show
  1. package/.claude-plugin/README.md +45 -34
  2. package/.claude-plugin/marketplace.json +3 -3
  3. package/.claude-plugin/plugin.json +3 -3
  4. package/.well-known/llms.txt +1 -1
  5. package/.well-known/mcp/server-card.json +1 -1
  6. package/README.md +26 -2
  7. package/adapters/README.md +4 -1
  8. package/adapters/chatgpt/INSTALL.md +39 -19
  9. package/adapters/claude/.mcp.json +2 -2
  10. package/adapters/codex/config.toml +2 -2
  11. package/adapters/mcp/server-stdio.js +10 -4
  12. package/adapters/opencode/opencode.json +1 -1
  13. package/adapters/perplexity/.mcp.json +36 -0
  14. package/adapters/perplexity/config.toml +16 -0
  15. package/adapters/perplexity/opencode.json +29 -0
  16. package/bin/cli.js +246 -90
  17. package/config/mcp-allowlists.json +11 -3
  18. package/package.json +28 -13
  19. package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +1 -1
  20. package/plugins/claude-codex-bridge/.mcp.json +1 -1
  21. package/plugins/codex-profile/.codex-plugin/plugin.json +1 -1
  22. package/plugins/codex-profile/.mcp.json +1 -1
  23. package/plugins/codex-profile/INSTALL.md +1 -1
  24. package/plugins/codex-profile/README.md +1 -1
  25. package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +1 -1
  26. package/plugins/opencode-profile/INSTALL.md +1 -1
  27. package/public/index.html +121 -24
  28. package/public/llm-context.md +17 -1
  29. package/scripts/ai-search-visibility.js +10 -36
  30. package/scripts/audit-trail.js +25 -15
  31. package/scripts/auto-wire-hooks.js +127 -0
  32. package/scripts/cli-demo.js +102 -0
  33. package/scripts/cli-schema.js +285 -0
  34. package/scripts/cli-status.js +166 -0
  35. package/scripts/cross-encoder-reranker.js +235 -0
  36. package/scripts/explore-subcommands.js +277 -0
  37. package/scripts/explore.js +569 -0
  38. package/scripts/feedback-loop.js +20 -6
  39. package/scripts/lesson-inference.js +27 -2
  40. package/scripts/lesson-reranker.js +263 -0
  41. package/scripts/lesson-retrieval.js +34 -17
  42. package/scripts/lesson-search.js +69 -0
  43. package/scripts/perplexity-client.js +210 -0
  44. package/scripts/perplexity-command-center.js +644 -0
  45. package/scripts/perplexity-marketing.js +17 -29
  46. package/scripts/prove-packaged-runtime.js +5 -4
  47. package/scripts/ralph-mode-ci.js +122 -19
  48. package/scripts/reflector-agent.js +2 -2
  49. package/scripts/session-analyzer.js +533 -0
  50. package/scripts/social-analytics/db/marketing-db.js +179 -0
  51. package/scripts/social-analytics/db/schema.sql +23 -0
  52. package/scripts/social-analytics/generate-instagram-card.js +31 -5
  53. package/scripts/social-analytics/generate-slides.js +268 -0
  54. package/scripts/social-analytics/post-video.js +316 -0
  55. package/scripts/social-analytics/publishers/zernio.js +52 -23
  56. package/scripts/statusline-local-stats.js +3 -1
  57. package/scripts/statusline.sh +15 -10
  58. package/scripts/thumbgate-bench.js +494 -0
  59. package/src/api/server.js +65 -1
  60. package/scripts/social-analytics/db/analytics.sqlite +0 -0
@@ -1,18 +1,27 @@
1
1
  # ThumbGate for Claude Desktop
2
2
 
3
- `thumbgate` gives Claude Desktop a local-first **Reliability Gateway** and **Pre-Action Gates** for workflow hardening.
3
+ **Give thumbs up 👍 or thumbs down 👎 on any agent action. ThumbGate captures it, runs History-aware lesson distillation across up to 8 prior recorded entries, and blocks the pattern from repeating. Just type "thumbs up" or "thumbs down" in the chat.**
4
4
 
5
- The extension path is useful when a team wants Claude Desktop to keep one workflow sharper over time without adding another orchestration layer. The MCP server captures explicit feedback, recalls past failures, distills lessons from up to 8 prior recorded entries when the current Claude hook only gets a vague thumbs-down, promotes reusable prevention rules, and produces proof-backed rollout artifacts.
5
+ ## Try it now
6
6
 
7
- ## Features
7
+ 1. Install ThumbGate
8
+ 2. Start a Claude Desktop session
9
+ 3. When the agent does something wrong, type: **thumbs down**
10
+ 4. ThumbGate captures the mistake, distills a lesson, and creates a prevention rule
11
+ 5. Next session: the agent physically cannot repeat that mistake
8
12
 
9
- - Workflow hardening for Claude-first engineering and ops workflows
10
- - Pre-Action Gates that block repeated mistakes before tool use
11
- - History-aware lesson distillation from up to 8 prior recorded entries and failed tool calls in the current Claude auto-capture path
12
- - Reliability memory and recall across long sessions
13
- - Bounded context packs, provenance, and diagnostics
14
- - DPO export and analytics bundle generation after runtime reliability lands
15
- - Submission-ready MCPB packaging for Claude Desktop review and local installs
13
+ That's it. One thumbs-down, never again.
14
+
15
+ ## What it does
16
+
17
+ - **👎 Thumbs down** captures the mistake → distills a lesson → auto-promotes to a prevention rule → PreToolUse hook blocks the pattern before execution
18
+ - **👍 Thumbs up** reinforces good patterns agent starts preferring your approved flows without re-explaining them each session
19
+ - **33 pre-action gates** block destructive actions (force-push, mass delete, destructive SQL) before they execute
20
+ - **Budget enforcement** → action count + time limits prevent runaway sessions
21
+ - **Self-protection** → agent cannot disable its own governance
22
+ - **Compliance tags** → NIST, SOC2, OWASP, CWE on gate rules for enterprise teams
23
+ - **Shared team enforcement** → one engineer's thumbs-down protects the whole team
24
+ - **60-second follow-up** → feedback can link to a prior mistake with `relatedFeedbackId` so delayed corrections still become useful gates
16
25
 
17
26
  ## Installation
18
27
 
@@ -101,37 +110,39 @@ Optional hosted path:
101
110
 
102
111
  ## Examples
103
112
 
104
- ### Example 1: PR review hardening
113
+ ### Example 1: Block force-push
105
114
 
106
- **User prompt:** "Review this PR and tell me if any blocker would stop merge."
107
- **Expected behavior:**
108
- - Claude Desktop inspects the workflow context instead of relying on one-shot memory
109
- - The extension recalls prior blocker patterns when they exist
110
- - The Pre-Action Gates can promote the missed blocker into a reusable gate
115
+ ```
116
+ You: "Push my changes to main"
117
+ Claude: [tries git push --force]
118
+ ThumbGate: Blocked "no-force-push" (confidence: 0.94)
119
+ You: Never had to correct it again.
120
+ ```
111
121
 
112
- ### Example 2: Code modernization workflow
122
+ ### Example 2: Thumbs-down on bad action
113
123
 
114
- **User prompt:** "Help me modernize this service, but keep the migration constraints and verification steps across sessions."
115
- **Expected behavior:**
116
- - Claude Desktop recalls prior migration notes and architecture constraints
117
- - The extension keeps the context pack bounded instead of replaying full history
118
- - Verification steps stay attached to the workflow across sessions
124
+ ```
125
+ You: "thumbs down"
126
+ ThumbGate: 👎 Captured. History-aware lesson distillation from up to 8 prior recorded entries...
127
+ Lesson: "Agent edited production config without approval"
128
+ Follow-up window: 60-second follow-up can attach relatedFeedbackId
129
+ Rule auto-promoted. Will block matching actions in future sessions.
130
+ ```
119
131
 
120
- ### Example 3: Internal ops or release workflow
132
+ ### Example 3: Thumbs-up reinforces good patterns
121
133
 
122
- **User prompt:** "Run the release checklist, capture what went wrong, and stop the same mistake next time."
123
- **Expected behavior:**
124
- - Claude Desktop records explicit operator feedback and proof artifacts
125
- - The extension keeps the workflow history local-first and searchable
126
- - Repeated release failures can be turned into prevention rules before the next run
134
+ ```
135
+ You: "thumbs up"
136
+ ThumbGate: 👍 Recorded. Reinforcing: "Agent used feature branch + PR workflow"
137
+ Agent will prefer this pattern in future sessions.
138
+ ```
127
139
 
128
- ### Example 4: Bare thumbs-down with automatic lesson proposal
140
+ ### Example 4: Budget enforcement
129
141
 
130
- **User prompt:** "👎 That was wrong."
131
- **Expected behavior:**
132
- - Claude Desktop can pass up to 8 prior recorded entries and the failed tool call into `capture_feedback`
133
- - ThumbGate distills a proposed `whatWentWrong` and `whatToChange` from recent history
134
- - A linked 60-second follow-up session can refine the same feedback record with `relatedFeedbackId`
142
+ ```
143
+ [Agent hits 500 actions in strict mode]
144
+ ThumbGate: Budget exceeded: 501/500 actions used. Session budget exhausted.
145
+ ```
135
146
 
136
147
  ## Privacy Policy
137
148
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate-marketplace",
3
- "version": "1.4.0",
3
+ "version": "1.4.3",
4
4
  "owner": {
5
5
  "name": "Igor Ganapolsky",
6
6
  "email": "ig5973700@gmail.com"
@@ -8,12 +8,12 @@
8
8
  "plugins": [
9
9
  {
10
10
  "name": "thumbgate",
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.",
11
+ "description": "Type 👍 or 👎 on any agent action. ThumbGate captures it, distills a lesson, and blocks the pattern from repeating. One thumbs-down = the agent physically cannot make that mistake again. 33 pre-action gates, budget enforcement, self-protection, and NIST/SOC2 compliance tags.",
12
12
  "source": {
13
13
  "source": "npm",
14
14
  "package": "thumbgate"
15
15
  },
16
- "version": "1.4.0",
16
+ "version": "1.4.3",
17
17
  "author": {
18
18
  "name": "Igor Ganapolsky"
19
19
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "thumbgate",
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.4.0",
3
+ "description": "Type 👍 or 👎 on any agent action. ThumbGate captures it, distills a lesson, and blocks the pattern from repeating. One thumbs-down = the agent physically cannot make that mistake again. 33 pre-action gates, budget enforcement, self-protection, and NIST/SOC2 compliance tags.",
4
+ "version": "1.4.3",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky"
7
7
  },
@@ -18,7 +18,7 @@
18
18
  "guardrails",
19
19
  "workflow-hardening"
20
20
  ],
21
- "skills": "skills",
21
+ "skills": "./skills/",
22
22
  "mcpServers": {
23
23
  "thumbgate": {
24
24
  "command": "npx",
@@ -1,4 +1,4 @@
1
- # ThumbGate — Pre-action gates for AI coding agents
1
+ # ThumbGate — Type 👍 or 👎 on any AI agent action. Blocks the pattern from repeating. One thumbs-down, never again.
2
2
  # https://thumbgate-production.up.railway.app
3
3
  # https://github.com/IgorGanapolsky/ThumbGate
4
4
  # https://www.npmjs.com/package/thumbgate
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.4.0",
3
+ "version": "1.4.3",
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
@@ -6,8 +6,9 @@
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
+ [![Open ThumbGate GPT](https://img.shields.io/badge/ChatGPT-Open%20ThumbGate%20GPT-10a37f?style=for-the-badge&logo=openai&logoColor=white)](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)
9
10
 
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
+ **[Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[Open ThumbGate GPT](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)** · **[ChatGPT Actions setup](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)** · **[ThumbGate Bench](docs/THUMBGATE_BENCH.md)** · **[Perplexity Command Center](docs/PERPLEXITY_MAX_COMMAND_CENTER.md)** · **[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
12
 
12
13
  **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
14
 
@@ -15,10 +16,32 @@
15
16
 
16
17
  **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
18
 
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
+ ## ThumbGate GPT: start here
20
+
21
+ **Use ThumbGate in ChatGPT now:** **[Open the live ThumbGate GPT](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)**, paste the action your AI agent wants to run, and ask whether to allow, block, or checkpoint it.
22
+
23
+ Try this first prompt:
24
+
25
+ ```text
26
+ Check this agent action before it runs: git push --force --tags
27
+ ```
28
+
29
+ **No, users do not have to keep chatting inside the ThumbGate GPT to use ThumbGate.** The GPT is the fast demo, guided setup path, and thumbs-up/down memory surface for ChatGPT users. The hard enforcement layer still runs where the work happens: your local coding agent, CI workflow, or MCP-compatible runtime after `npx thumbgate init`.
30
+
31
+ Developers can import the prepared **[GPT Actions OpenAPI spec](adapters/chatgpt/openapi.yaml)** with the **[ChatGPT Actions setup guide](adapters/chatgpt/INSTALL.md)**. Regular ChatGPT users should just open the GPT and type what happened.
19
32
 
20
33
  **Official directory pending review?** Claude Code users can install today with `/plugin marketplace add IgorGanapolsky/ThumbGate` then `/plugin install thumbgate@thumbgate-marketplace`.
21
34
 
35
+ **Using Perplexity Max?** ThumbGate ships a **[Perplexity Command Center](docs/PERPLEXITY_MAX_COMMAND_CENTER.md)** that runs AI-search visibility checks, Search API lead discovery, Agent API strategy briefs, and official Perplexity MCP config generation. It is scheduled in GitHub Actions and uploads artifacts without committing runtime `.thumbgate` state.
36
+
37
+ **Need proof that gates improve safety without killing capability?** Run **[ThumbGate Bench](docs/THUMBGATE_BENCH.md)**:
38
+
39
+ ```bash
40
+ npm run thumbgate:bench
41
+ ```
42
+
43
+ It scores deterministic GitHub, npm, database, Railway, shell, and filesystem scenarios with `unsafeActionRate`, `capabilityRate`, `positivePromotionRate`, and `replayStability` so teams can inspect the Reliability Gateway before a Workflow Hardening Sprint.
44
+
22
45
  ---
23
46
 
24
47
  ## What problem does this solve?
@@ -115,6 +138,7 @@ Session 3: │ Session 3+:
115
138
  npx thumbgate init # detects your agent and wires everything up
116
139
  npx thumbgate doctor # health check
117
140
  npx thumbgate lessons # see what's been learned
141
+ npx thumbgate explore # terminal explorer for lessons, gates, and stats
118
142
  npx thumbgate dashboard # open local dashboard
119
143
  ```
120
144
 
@@ -3,7 +3,10 @@
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.4.0 thumbgate serve`.
6
+ - `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.4.3 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.
10
+ - `perplexity/.mcp.json`: Claude Code config with ThumbGate + Perplexity MCP servers side-by-side.
11
+ - `perplexity/config.toml`: Codex config with ThumbGate + Perplexity MCP servers.
12
+ - `perplexity/opencode.json`: OpenCode config with ThumbGate + Perplexity MCP servers.
@@ -1,34 +1,54 @@
1
1
  # ChatGPT GPT Actions: ThumbGate Install
2
2
 
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.
3
+ Open the published ThumbGate GPT directly:
4
+
5
+ https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate
6
+
7
+ Use the GPT as the public front door: paste an AI action to check, save a thumbs-up/down lesson, write a Pre-Action Gate, install ThumbGate for an agent, or export proof.
8
+
9
+ Users do **not** have to keep chatting inside the ThumbGate GPT for enforcement. The GPT is the fast demo, guided setup path, and ChatGPT memory surface. Real enforcement for coding agents still runs locally through ThumbGate hooks after `npx thumbgate init`.
10
+
11
+ Marketing rule: every landing page, README, social post, and plugin listing should point to the live GPT before asking a cold user to read OpenAPI docs.
4
12
 
5
13
  ## GPT Store path
6
14
 
7
- 1. Open ChatGPT.
8
- 2. Open **Explore GPTs**.
15
+ 1. Open the direct GPT URL: https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate
16
+ 2. If ChatGPT does not open it for your account, open **Explore GPTs**.
9
17
  3. Search for `ThumbGate`.
10
18
  4. Choose the GPT by **Igor Ganapolsky** in the **Programming** category.
11
19
 
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.
20
+ ## 30-second user flow
21
+
22
+ 1. Paste a proposed AI action, command, merge, deploy, file edit, email, payment, or API call.
23
+ 2. ThumbGate evaluates whether to allow, block, or require a checkpoint before the action runs.
24
+ 3. After any answer or agent run, reply with `thumbs up:` or `thumbs down:` plus one concrete sentence.
25
+ 4. ThumbGate saves the lesson, refreshes prevention rules when patterns repeat, and can show what it remembers.
26
+ 5. When the user is ready to enforce outside ChatGPT, send them to `npx thumbgate init` for Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode, or another MCP-compatible agent.
27
+
28
+ Regular users should never need to know MCP, OpenAPI, Actions, DPO, Thompson Sampling, or schema validation. The GPT should explain the loop as: "One signal becomes one remembered rule."
13
29
 
14
- ## 30-second regular-user flow
30
+ ## GPT profile card
15
31
 
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.
32
+ Use this copy in GPT Builder instead of the generic "AI safety gate" framing:
20
33
 
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."
34
+ Short description:
22
35
 
23
- ## Regular-user prompts
36
+ ```text
37
+ Turn thumbs-down into prevention gates
38
+ ```
39
+
40
+ Full description:
41
+
42
+ ```text
43
+ Paste a proposed AI action or reply thumbs up/down after an answer. ThumbGate captures the lesson, searches prior mistakes, writes Pre-Action Gates, and tells you when to allow, block, or checkpoint. Built for developers using AI agents and proof-backed Reliability Gateway workflows.
44
+ ```
24
45
 
25
- Use these as GPT conversation starters so regular users know how to teach ThumbGate:
46
+ Conversation starters:
26
47
 
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.`
48
+ 1. `Check this agent action before it runs: git push --force --tags`
49
+ 2. `Turn this mistake into a ThumbGate rule: the agent edited generated files again.`
50
+ 3. `Install ThumbGate for Claude Code or Codex in this repo.`
51
+ 4. `Search my saved lessons before you answer.`
32
52
 
33
53
  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
54
 
@@ -45,10 +65,10 @@ Plain thumbs-up/down feedback is the memory loop. The decision endpoint is the g
45
65
 
46
66
  ## Best first GPT message
47
67
 
48
- Use this as the first response for regular users:
68
+ Use this as the first response:
49
69
 
50
70
  ```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.
71
+ Paste an AI action to check, or tell me what went right/wrong. I can block risky actions, save the lesson, write a prevention gate, or show what ThumbGate already remembers.
52
72
  ```
53
73
 
54
74
  ## Prerequisites
@@ -2,13 +2,13 @@
2
2
  "mcpServers": {
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
- "args": ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "serve"]
5
+ "args": ["--yes", "--package", "thumbgate@1.4.3", "thumbgate", "serve"]
6
6
  }
7
7
  },
8
8
  "hooks": {
9
9
  "preToolUse": {
10
10
  "command": "npx",
11
- "args": ["--yes", "--package", "thumbgate@1.4.0", "thumbgate", "gate-check"]
11
+ "args": ["--yes", "--package", "thumbgate@1.4.3", "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.4.0", "thumbgate", "serve"]
4
+ args = ["--yes", "--package", "thumbgate@1.4.3", "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.4.0", "thumbgate", "gate-check"]
9
+ args = ["--yes", "--package", "thumbgate@1.4.3", "thumbgate", "gate-check"]
@@ -124,7 +124,7 @@ const {
124
124
  finalizeSession: finalizeFeedbackSession,
125
125
  } = require('../../scripts/feedback-session');
126
126
 
127
- const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.4.0' };
127
+ const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.4.3' };
128
128
  const COMMERCE_CATEGORIES = [
129
129
  'product_recommendation',
130
130
  'brand_compliance',
@@ -434,12 +434,18 @@ async function callToolInner(name, args) {
434
434
  category: args.category,
435
435
  tags: Array.isArray(args.tags) ? args.tags : [],
436
436
  }));
437
- case 'retrieve_lessons':
438
- return toTextResult(retrieveRelevantLessons(
437
+ case 'retrieve_lessons': {
438
+ // Cross-encoder reranking: retrieve more candidates, then rerank for precision
439
+ const { retrieveWithRerankingSync } = require('../../scripts/cross-encoder-reranker');
440
+ return toTextResult(retrieveWithRerankingSync(
439
441
  args.toolName,
440
442
  args.actionContext || '',
441
- { maxResults: Number(args.maxResults || 5) },
443
+ {
444
+ candidateCount: 20,
445
+ maxResults: Number(args.maxResults || 5),
446
+ },
442
447
  ));
448
+ }
443
449
  case 'search_thumbgate':
444
450
  enforceLimit('search_thumbgate');
445
451
  return toTextResult(searchThumbgate({
@@ -7,7 +7,7 @@
7
7
  "npx",
8
8
  "--yes",
9
9
  "--package",
10
- "thumbgate@1.4.0",
10
+ "thumbgate@1.4.3",
11
11
  "thumbgate",
12
12
  "serve"
13
13
  ],
@@ -0,0 +1,36 @@
1
+ {
2
+ "mcpServers": {
3
+ "thumbgate": {
4
+ "command": "npx",
5
+ "args": [
6
+ "--yes",
7
+ "--package",
8
+ "thumbgate@1.4.1",
9
+ "thumbgate",
10
+ "serve"
11
+ ]
12
+ },
13
+ "perplexity": {
14
+ "command": "npx",
15
+ "args": [
16
+ "-y",
17
+ "@perplexity-ai/mcp-server"
18
+ ],
19
+ "env": {
20
+ "PERPLEXITY_API_KEY": "${PERPLEXITY_API_KEY}"
21
+ }
22
+ }
23
+ },
24
+ "hooks": {
25
+ "preToolUse": {
26
+ "command": "npx",
27
+ "args": [
28
+ "--yes",
29
+ "--package",
30
+ "thumbgate@1.4.1",
31
+ "thumbgate",
32
+ "gate-check"
33
+ ]
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,16 @@
1
+ # Codex MCP profile: ThumbGate + Perplexity (copy into ~/.codex/config.toml or merge section)
2
+ [mcp_servers.thumbgate]
3
+ command = "npx"
4
+ args = ["--yes", "--package", "thumbgate@1.4.1", "thumbgate", "serve"]
5
+
6
+ [mcp_servers.perplexity]
7
+ command = "npx"
8
+ args = ["-y", "@perplexity-ai/mcp-server"]
9
+
10
+ [mcp_servers.perplexity.env]
11
+ PERPLEXITY_API_KEY = "${PERPLEXITY_API_KEY}"
12
+
13
+ # Hard PreToolUse hook for Codex
14
+ [hooks.pre_tool_use]
15
+ command = "npx"
16
+ args = ["--yes", "--package", "thumbgate@1.4.1", "thumbgate", "gate-check"]
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "mcp": {
4
+ "thumbgate": {
5
+ "type": "local",
6
+ "command": [
7
+ "npx",
8
+ "--yes",
9
+ "--package",
10
+ "thumbgate@1.4.1",
11
+ "thumbgate",
12
+ "serve"
13
+ ],
14
+ "enabled": true
15
+ },
16
+ "perplexity": {
17
+ "type": "local",
18
+ "command": [
19
+ "npx",
20
+ "-y",
21
+ "@perplexity-ai/mcp-server"
22
+ ],
23
+ "env": {
24
+ "PERPLEXITY_API_KEY": "${PERPLEXITY_API_KEY}"
25
+ },
26
+ "enabled": true
27
+ }
28
+ }
29
+ }