thumbgate 1.14.0 → 1.15.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 (43) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.well-known/mcp/server-card.json +1 -1
  4. package/README.md +2 -1
  5. package/adapters/claude/.mcp.json +2 -2
  6. package/adapters/mcp/server-stdio.js +8 -1
  7. package/adapters/opencode/opencode.json +1 -1
  8. package/bin/cli.js +54 -0
  9. package/config/enforcement.json +59 -7
  10. package/config/gates/default.json +33 -0
  11. package/config/mcp-allowlists.json +4 -0
  12. package/config/merge-quality-checks.json +2 -1
  13. package/package.json +19 -6
  14. package/public/codex-plugin.html +7 -1
  15. package/public/dashboard.html +23 -2
  16. package/public/index.html +20 -2
  17. package/public/learn.html +39 -0
  18. package/public/lessons.html +25 -1
  19. package/public/numbers.html +271 -0
  20. package/public/pro.html +7 -1
  21. package/scripts/cli-feedback.js +2 -1
  22. package/scripts/cli-schema.js +43 -4
  23. package/scripts/commercial-offer.js +1 -1
  24. package/scripts/contextfs.js +214 -32
  25. package/scripts/feedback-loop.js +49 -5
  26. package/scripts/harness-selector.js +132 -0
  27. package/scripts/lesson-canonical.js +181 -0
  28. package/scripts/lesson-db.js +71 -10
  29. package/scripts/lesson-synthesis.js +23 -2
  30. package/scripts/native-messaging-audit.js +514 -0
  31. package/scripts/pr-manager.js +47 -7
  32. package/scripts/profile-router.js +16 -1
  33. package/scripts/rule-validator.js +285 -0
  34. package/scripts/seo-gsd.js +182 -2
  35. package/scripts/tool-registry.js +12 -0
  36. package/skills/thumbgate/SKILL.md +1 -1
  37. package/src/api/server.js +53 -0
  38. package/.claude-plugin/README.md +0 -170
  39. package/adapters/README.md +0 -12
  40. package/skills/agent-memory/SKILL.md +0 -97
  41. package/skills/solve-architecture-autonomy/SKILL.md +0 -17
  42. package/skills/solve-architecture-autonomy/tool.js +0 -33
  43. package/skills/thumbgate-feedback/SKILL.md +0 -49
@@ -1,170 +0,0 @@
1
- # ThumbGate for Claude Desktop
2
-
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
-
5
- ## Try it now
6
-
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
12
-
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
25
-
26
- ## Installation
27
-
28
- ### Local install today
29
-
30
- Use the portable npm launcher:
31
-
32
- ```bash
33
- claude mcp add thumbgate -- npx --yes --package thumbgate thumbgate serve
34
- ```
35
-
36
- Or use the project bootstrap:
37
-
38
- ```bash
39
- npx thumbgate init
40
- ```
41
-
42
- ### Direct bundle download
43
-
44
- Download the latest packaged Claude Desktop bundle from GitHub Releases:
45
-
46
- https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb
47
-
48
- That bundle is built from the same `.claude-plugin` metadata in this repo and is meant for people who want a ready-to-install artifact instead of building locally.
49
-
50
- ### Review packet zip
51
-
52
- Anthropic's submission flow may ask for a GitHub link or a zip that preserves the plugin folder structure. The review-ready source zip lives on GitHub Releases:
53
-
54
- https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-plugin-review.zip
55
-
56
- ### Anthropic directory path
57
-
58
- If Anthropic approves the listing, install from Claude Desktop via `Settings -> Extensions`.
59
-
60
- Directory inclusion is an external review process. Do not claim listing or approval before it is real.
61
-
62
- Submission forms:
63
-
64
- - https://claude.ai/settings/plugins/submit
65
- - https://platform.claude.com/plugins/submit
66
-
67
- ### Repo marketplace while review is pending
68
-
69
- Claude Code users do not need to wait for the official directory. Anthropic's plugin docs allow adding a repository marketplace directly when the repo contains `.claude-plugin/marketplace.json`.
70
-
71
- Inside Claude Code, run:
72
-
73
- ```text
74
- /plugin marketplace add IgorGanapolsky/ThumbGate
75
- /plugin install thumbgate@thumbgate-marketplace
76
- ```
77
-
78
- That uses the marketplace metadata already published in this repository while Anthropic reviews the official directory submission.
79
-
80
- ### MCPB bundle build
81
-
82
- Maintainers can build the local Claude Desktop bundle directly from this repo:
83
-
84
- ```bash
85
- npm run build:claude-mcpb
86
- ```
87
-
88
- That command stages a clean bundle, installs production dependencies, packs a `.mcpb`, and validates it with Anthropic's official MCPB CLI.
89
-
90
- ## Configuration
91
-
92
- The local OSS path needs no API key.
93
-
94
- Optional hosted path:
95
-
96
- ```json
97
- {
98
- "mcpServers": {
99
- "thumbgate": {
100
- "command": "npx",
101
- "args": ["--yes", "--package", "thumbgate", "thumbgate", "serve"],
102
- "env": {
103
- "THUMBGATE_BASE_URL": "https://thumbgate-production.up.railway.app",
104
- "THUMBGATE_API_KEY": "tg_YOUR_KEY_HERE"
105
- }
106
- }
107
- }
108
- }
109
- ```
110
-
111
- ## Examples
112
-
113
- ### Example 1: Block force-push
114
-
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
- ```
121
-
122
- ### Example 2: Thumbs-down on bad action
123
-
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
- ```
131
-
132
- ### Example 3: Thumbs-up reinforces good patterns
133
-
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
- ```
139
-
140
- ### Example 4: Budget enforcement
141
-
142
- ```
143
- [Agent hits 500 actions in strict mode]
144
- ThumbGate: ⛔ Budget exceeded: 501/500 actions used. Session budget exhausted.
145
- ```
146
-
147
- ## Privacy Policy
148
-
149
- For complete privacy information, see: https://thumbgate-production.up.railway.app/privacy
150
-
151
- ### Data Collection
152
-
153
- - Local installs store workflow memory, feedback entries, and proof artifacts in local project files.
154
- - Optional hosted mode sends feedback and memory data to the configured `THUMBGATE_BASE_URL`.
155
- - Optional CLI telemetry is best-effort and can be disabled with `THUMBGATE_NO_TELEMETRY=1`.
156
- - We do not sell customer data; retention and deletion details live in the public privacy policy.
157
-
158
- ## Support
159
-
160
- - GitHub Issues: https://github.com/IgorGanapolsky/ThumbGate/issues
161
- - Security Advisories: https://github.com/IgorGanapolsky/ThumbGate/security
162
- - Verification evidence: https://github.com/IgorGanapolsky/ThumbGate/blob/main/docs/VERIFICATION_EVIDENCE.md
163
- - Product Hunt: https://www.producthunt.com/products/thumbgate
164
-
165
- ## Notes For Submission
166
-
167
- - Local Claude metadata lives in `.claude-plugin/plugin.json` and `.claude-plugin/marketplace.json`.
168
- - The MCPB bundle is built with `npm run build:claude-mcpb`.
169
- - The review packet zip is built with `npm run build:claude-review-zip`.
170
- - Anthropic directory requirements and the internal publish checklist live in `docs/CLAUDE_DESKTOP_EXTENSION.md`.
@@ -1,12 +0,0 @@
1
- # Adapter Bundles
2
-
3
- - `chatgpt/openapi.yaml`: import into GPT Actions.
4
- - `gemini/function-declarations.json`: Gemini function-calling definitions.
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.14.0 thumbgate serve`.
7
- - `codex/config.toml`: example Codex MCP profile section using the same version-pinned portable launcher.
8
- - `amp/skills/thumbgate-feedback/SKILL.md`: Amp skill template.
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,97 +0,0 @@
1
- ---
2
- name: Agent Memory
3
- description: Recall past mistakes and capture feedback so your agent stops repeating errors. Works locally via MCP server — no API key needed.
4
- ---
5
-
6
- # Agent Memory
7
-
8
- Give your agent persistent memory across sessions. Before starting any task, recall what went wrong last time. After completing work, capture whether it succeeded or failed. Prevention rules are auto-generated from repeated mistakes.
9
-
10
- ## Setup
11
-
12
- Add the MCP server (one-time):
13
-
14
- ```bash
15
- claude mcp add thumbgate -- npx -y thumbgate serve
16
- ```
17
-
18
- No API key needed. All data stays local.
19
-
20
- ## When to Use
21
-
22
- - Starting a new task or session — recall past context first
23
- - After completing work that succeeded or failed — capture feedback
24
- - When the agent keeps making the same mistake — check prevention rules
25
-
26
- ## Workflow
27
-
28
- ### Step 1: Recall past context (do this FIRST on every task)
29
-
30
- Call the `recall` MCP tool with a description of your current task. The tool returns:
31
-
32
- - Past feedback relevant to this task (vector similarity search)
33
- - Active prevention rules (auto-generated from repeated failures)
34
- - Recent feedback summary with approval rate
35
-
36
- Read the prevention rules carefully. These are patterns that failed before — follow them.
37
-
38
- ### Step 2: Do your work
39
-
40
- Complete the task as normal. Keep track of what you did and whether it worked.
41
-
42
- ### Step 3: Capture feedback
43
-
44
- Call the `capture_feedback` MCP tool:
45
-
46
- **If succeeded:**
47
- - signal: `up`
48
- - context: What worked and why
49
- - tags: Category labels
50
-
51
- **If failed:**
52
- - signal: `down`
53
- - context: What you were trying to do
54
- - whatWentWrong: Specific failure description
55
- - whatToChange: How to avoid this next time
56
- - tags: Category labels
57
-
58
- Vague feedback like "it failed" will be rejected. Be specific.
59
-
60
- ### Step 4: Check improvement (optional)
61
-
62
- Call the `feedback_stats` MCP tool to see approval rate, top failure domains, and whether the agent is trending better or worse.
63
-
64
- ## Available MCP Tools
65
-
66
- | Tool | What it does |
67
- |------|-------------|
68
- | `recall` | Search past feedback and prevention rules for current task |
69
- | `capture_feedback` | Record what worked or failed with structured context |
70
- | `prevention_rules` | View auto-generated rules from repeated mistakes |
71
- | `feedback_stats` | Approval rate, trend analysis, top failure domains |
72
- | `feedback_summary` | Human-readable summary of recent signals |
73
-
74
- ## MCP Profiles
75
-
76
- | Profile | Tools | Use case |
77
- |---------|-------|----------|
78
- | `essential` | 5 core tools | Default — start here |
79
- | `commerce` | 6 tools + commerce_recall | Agentic commerce agents |
80
- | `default` | 12 tools | Full pipeline including DPO export |
81
-
82
- Set profile: `THUMBGATE_MCP_PROFILE=essential npx thumbgate serve`
83
-
84
- ## How Prevention Rules Work
85
-
86
- 1. Agent makes mistake A → you capture `down` feedback
87
- 2. Agent makes mistake A again → you capture `down` feedback again
88
- 3. System detects pattern → auto-generates prevention rule: "NEVER do A"
89
- 4. Next session → `recall` returns the rule → agent follows it
90
-
91
- This is the core value. The agent doesn't learn — but it reads the rules and follows them.
92
-
93
- ## Links
94
-
95
- - [GitHub](https://github.com/IgorGanapolsky/thumbgate)
96
- - [npm](https://www.npmjs.com/package/thumbgate)
97
- - [MCP Registry](https://registry.modelcontextprotocol.io)
@@ -1,17 +0,0 @@
1
- ---
2
- name: solve-architecture-autonomy
3
- description: Automated skill to handle architecture, autonomy, crisis, debug, deployment, error, execution, external-assessment, feedback, inefficiency, negative, railway, revenue, roi, simplification, user-frustration patterns efficiently.
4
- diagnosis: Repeated execution failure in this domain.
5
- status: materialized
6
- ---
7
-
8
- # SOLVE-ARCHITECTURE-AUTONOMY Capability
9
-
10
- ## Problem
11
- I provided a plan and research instead of immediately deploy
12
-
13
- ## Automated Diagnosis
14
- Repeated execution failure in this domain.
15
-
16
- ## Usage
17
- The agent should call the `handle_architecture` tool when tasks involve `architecture, autonomy, crisis, debug, deployment, error, execution, external-assessment, feedback, inefficiency, negative, railway, revenue, roi, simplification, user-frustration`.
@@ -1,33 +0,0 @@
1
- /**
2
- * Automated Skill: solve-architecture-autonomy
3
- * Generated: 2026-03-13T15:50:58.840Z
4
- *
5
- * This tool was materialized by the EvoSkill loop to address:
6
- * "I provided a plan and research instead of immediately deploy"
7
- */
8
-
9
- const { execSync } = require('child_process');
10
-
11
- /**
12
- * Fixes I provided a plan and research instead of immediately deploy
13
- */
14
- async function handle_architecture(args) {
15
- const { context } = args;
16
-
17
- // LOGIC: Materialized code should implement the fix derived from the diagnosis.
18
- // For now, we provide a structured wrapper that logs intent and applies
19
- // the suggested corrective action.
20
-
21
- console.log(`[EVOSKILL] Executing handle_architecture to resolve: I provided a plan and research instead of immediately deploy`);
22
-
23
- // Corrective action placeholder - in a full loop, this would be LLM-generated code
24
- // derived from the 'how-to-avoid' fields in memory-log.jsonl.
25
-
26
- return {
27
- status: 'success',
28
- appliedFix: `Automated handling of I provided a plan and research instead of immediately deploy pattern.`,
29
- context: context
30
- };
31
- }
32
-
33
- module.exports = { handle_architecture };
@@ -1,49 +0,0 @@
1
- ---
2
- name: thumbgate-feedback
3
- description: >
4
- Capture thumbs up/down feedback into structured memories and prevention rules.
5
- Require one sentence of why before claiming memory promotion.
6
- Use when user gives explicit quality signals about agent work (e.g. "that worked",
7
- "that failed", "thumbs up/down"). Do NOT use for general questions, code generation,
8
- file operations, or any task that is not explicit feedback on prior agent output.
9
- triggers:
10
- - thumbs up
11
- - thumbs down
12
- - that worked
13
- - that failed
14
- negative_triggers:
15
- - generate code
16
- - search files
17
- - explain this
18
- - run tests
19
- ---
20
-
21
- # ThumbGate Feedback Skill
22
-
23
- When user provides feedback, execute:
24
-
25
- ```bash
26
- # negative
27
- node .claude/scripts/feedback/capture-feedback.js \
28
- --feedback=down \
29
- --context="<what failed>" \
30
- --what-went-wrong="<specific failure>" \
31
- --what-to-change="<prevention action>" \
32
- --tags="<domain>,regression"
33
-
34
- # positive
35
- node .claude/scripts/feedback/capture-feedback.js \
36
- --feedback=up \
37
- --context="<what succeeded>" \
38
- --what-worked="<repeatable pattern>" \
39
- --tags="<domain>,fix"
40
- ```
41
-
42
- If the user only says `thumbs up`, `thumbs down`, `that worked`, or `that failed`, log the signal and ask one follow-up question before claiming it became reusable memory.
43
-
44
- At session start, run:
45
-
46
- ```bash
47
- npm run feedback:summary
48
- npm run feedback:rules
49
- ```