thumbgate 0.9.10 → 0.9.11
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.
- package/.claude-plugin/README.md +2 -2
- package/.claude-plugin/marketplace.json +4 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +115 -312
- package/adapters/README.md +1 -1
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/codex/config.toml +4 -4
- package/adapters/mcp/server-stdio.js +61 -1
- package/adapters/opencode/opencode.json +4 -2
- package/bin/cli.js +156 -8
- package/bin/memory.sh +3 -3
- package/config/e2e-critical-flows.json +4 -0
- package/config/gates/default.json +74 -2
- package/config/github-about.json +1 -1
- package/config/mcp-allowlists.json +27 -0
- package/package.json +22 -5
- package/plugins/amp-skill/INSTALL.md +1 -0
- package/plugins/amp-skill/SKILL.md +1 -0
- package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-codex-bridge/.mcp.json +4 -2
- package/plugins/claude-skill/INSTALL.md +1 -0
- package/plugins/codex-profile/.codex-plugin/plugin.json +1 -1
- package/plugins/codex-profile/.mcp.json +4 -2
- package/plugins/codex-profile/INSTALL.md +1 -1
- package/plugins/codex-profile/README.md +1 -1
- package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-marketplace/README.md +3 -3
- package/plugins/cursor-marketplace/mcp.json +3 -1
- package/plugins/cursor-marketplace/scripts/gate-check.sh +15 -5
- package/plugins/gemini-extension/INSTALL.md +3 -3
- package/plugins/opencode-profile/INSTALL.md +1 -1
- package/public/dashboard.html +15 -8
- package/public/index.html +125 -185
- package/public/js/buyer-intent.js +252 -0
- package/public/pro.html +1085 -0
- package/scripts/__pycache__/train_from_feedback.cpython-312.pyc +0 -0
- package/scripts/adk-consolidator.js +14 -2
- package/scripts/agent-readiness.js +3 -1
- package/scripts/agent-security-hardening.js +4 -4
- package/scripts/auto-promote-gates.js +2 -0
- package/scripts/auto-wire-hooks.js +105 -17
- package/scripts/behavioral-extraction.js +2 -6
- package/scripts/billing.js +107 -3
- package/scripts/budget-guard.js +2 -2
- package/scripts/build-metadata.js +14 -0
- package/scripts/context-engine.js +1 -0
- package/scripts/deploy-policy.js +3 -17
- package/scripts/dpo-optimizer.js +3 -6
- package/scripts/ensure-repo-bootstrap.js +129 -0
- package/scripts/export-dpo-pairs.js +2 -3
- package/scripts/export-kto-pairs.js +3 -4
- package/scripts/export-training.js +8 -6
- package/scripts/feedback-attribution.js +23 -11
- package/scripts/feedback-loop.js +40 -2
- package/scripts/feedback-to-rules.js +2 -1
- package/scripts/filesystem-search.js +3 -2
- package/scripts/gates-engine.js +760 -29
- package/scripts/generate-pretool-hook.sh +0 -0
- package/scripts/gtm-revenue-loop.js +20 -1
- package/scripts/hook-auto-capture.sh +8 -3
- package/scripts/hook-runtime.js +89 -0
- package/scripts/hook-stop-self-score.sh +3 -3
- package/scripts/hook-thumbgate-cache-updater.js +99 -38
- package/scripts/hosted-config.js +4 -16
- package/scripts/hybrid-feedback-context.js +54 -14
- package/scripts/install-mcp.js +13 -0
- package/scripts/intent-router.js +2 -2
- package/scripts/license.js +52 -14
- package/scripts/local-model-profile.js +3 -2
- package/scripts/mcp-config.js +68 -6
- package/scripts/meta-policy.js +4 -8
- package/scripts/money-watcher.js +166 -16
- package/scripts/obsidian-export.js +1 -0
- package/scripts/operational-integrity.js +480 -0
- package/scripts/post-everywhere.js +7 -12
- package/scripts/pr-manager.js +14 -11
- package/scripts/profile-router.js +2 -0
- package/scripts/prompt-dlp.js +1 -0
- package/scripts/publish-decision.js +10 -0
- package/scripts/published-cli.js +34 -0
- package/scripts/risk-scorer.js +3 -2
- package/scripts/rlhf_session_start.sh +32 -0
- package/scripts/skill-quality-tracker.js +3 -5
- package/scripts/social-analytics/db/social-analytics.db-shm +0 -0
- package/scripts/social-analytics/db/social-analytics.db-wal +0 -0
- package/scripts/social-analytics/engagement-audit.js +202 -0
- package/scripts/social-analytics/instagram-thumbgate-post.js +45 -7
- package/scripts/social-analytics/install-growth-automation.js +114 -0
- package/scripts/social-analytics/load-env.js +46 -0
- package/scripts/social-analytics/poll-all.js +3 -18
- package/scripts/social-analytics/pollers/zernio.js +3 -0
- package/scripts/social-analytics/publish-instagram-thumbgate.js +22 -3
- package/scripts/social-analytics/publish-thumbgate-launch.js +316 -0
- package/scripts/social-analytics/publishers/reddit.js +7 -12
- package/scripts/social-analytics/publishers/zernio.js +210 -22
- package/scripts/social-analytics/reconcile-thumbgate-campaign.js +165 -0
- package/scripts/social-analytics/schedule-thumbgate-campaign.js +275 -0
- package/scripts/social-analytics/sync-launch-assets.js +185 -0
- package/scripts/social-post-hourly.js +185 -0
- package/scripts/social-quality-gate.js +119 -3
- package/scripts/social-reply-monitor.js +148 -32
- package/scripts/statusline-cache-path.js +27 -0
- package/scripts/statusline-meta.js +22 -0
- package/scripts/statusline.sh +24 -32
- package/scripts/sync-version.js +11 -3
- package/scripts/test-coverage.js +20 -13
- package/scripts/tool-registry.js +97 -0
- package/scripts/train_from_feedback.py +32 -9
- package/scripts/validate-feedback.js +3 -2
- package/scripts/vector-store.js +2 -3
- package/scripts/verify-obsidian-setup.sh +3 -3
- package/src/api/server.js +281 -33
package/.claude-plugin/README.md
CHANGED
|
@@ -21,7 +21,7 @@ The extension path is useful when a team wants Claude Desktop to keep one workfl
|
|
|
21
21
|
Use the portable npm launcher:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
claude mcp add thumbgate -- npx
|
|
24
|
+
claude mcp add thumbgate -- npx --yes --package thumbgate thumbgate serve
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Or use the project bootstrap:
|
|
@@ -65,7 +65,7 @@ Optional hosted path:
|
|
|
65
65
|
"mcpServers": {
|
|
66
66
|
"thumbgate": {
|
|
67
67
|
"command": "npx",
|
|
68
|
-
"args": ["
|
|
68
|
+
"args": ["--yes", "--package", "thumbgate", "thumbgate", "serve"],
|
|
69
69
|
"env": {
|
|
70
70
|
"THUMBGATE_BASE_URL": "https://thumbgate-production.up.railway.app",
|
|
71
71
|
"THUMBGATE_API_KEY": "tg_YOUR_KEY_HERE"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.11",
|
|
4
4
|
"plugins": [
|
|
5
5
|
{
|
|
6
6
|
"name": "thumbgate",
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"package": "thumbgate",
|
|
12
12
|
"command": "npx",
|
|
13
13
|
"args": [
|
|
14
|
-
"
|
|
14
|
+
"--yes",
|
|
15
|
+
"--package",
|
|
16
|
+
"thumbgate",
|
|
15
17
|
"thumbgate",
|
|
16
18
|
"serve"
|
|
17
19
|
]
|
|
@@ -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": "0.9.
|
|
4
|
+
"version": "0.9.11",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Igor Ganapolsky"
|
|
7
7
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.11",
|
|
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,374 +1,177 @@
|
|
|
1
1
|
# ThumbGate
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Make your AI coding agent self-improving. One thumbs-down creates a gate that permanently blocks the mistake.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/IgorGanapolsky/ThumbGate/actions/workflows/ci.yml)
|
|
6
|
-
[](https://github.com/IgorGanapolsky/ThumbGate/actions/workflows/self-healing-monitor.yml)
|
|
7
6
|
[](https://www.npmjs.com/package/thumbgate)
|
|
8
7
|
[](LICENSE)
|
|
9
|
-
[](https://github.com/sponsors/IgorGanapolsky)
|
|
11
|
-
[](https://buymeacoffee.com/igorganapolsky)
|
|
12
|
-
[](https://thumbgate-production.up.railway.app/checkout/pro?utm_source=github&utm_medium=readme&utm_campaign=thumbgate) — Free stays local-first with 5 daily feedback captures, 10 daily lesson searches, unlimited recall, and gating. Vague thumbs feedback can be distilled from the last ~10 messages and failed tool call. Pro adds a personal local dashboard, **Model Hardening Advisor**, and **LoRA/PEFT export**. Team rollout starts at the shared hosted lesson DB, org dashboard, and generated hosted review views.
|
|
8
|
+
[](https://thumbgate-production.up.railway.app/checkout/pro?utm_source=github&utm_medium=readme&utm_campaign=badge_cta)
|
|
13
9
|
|
|
14
|
-
**
|
|
10
|
+
**[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)** · **[Pricing](https://thumbgate-production.up.railway.app/#pricing?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)**
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
### Get Started
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
**ThumbGate Pro (Recommended)** — zero config, team analytics, shared lesson DB:
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
[](https://thumbgate-production.up.railway.app/checkout/pro?utm_source=github&utm_medium=readme&utm_campaign=get_started)
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
**[Live Demo Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)** | **[Setup Guide](https://thumbgate-production.up.railway.app/guide?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)** | **[Landing Page](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)** | **[Verification Evidence](docs/VERIFICATION_EVIDENCE.md)**
|
|
25
|
-
|
|
26
|
-
Most memory tools only help an agent remember. ThumbGate also enforces.
|
|
27
|
-
|
|
28
|
-
**The problem without it:**
|
|
29
|
-
|
|
30
|
-
> BEFORE: Agent force-pushes to main. You correct it. Next session, it force-pushes again.
|
|
18
|
+
Free for individual developers. Pro adds team dashboards, DPO export, and unlimited lesson search. [See pricing →](https://thumbgate-production.up.railway.app/#pricing?utm_source=github&utm_medium=readme&utm_campaign=pricing_link)
|
|
31
19
|
|
|
32
|
-
**
|
|
33
|
-
|
|
34
|
-
> AFTER: Gate blocks the force-push before it executes. Agent can't repeat the mistake.
|
|
35
|
-
|
|
36
|
-
- `recall` injects the right context at session start.
|
|
37
|
-
- `search_lessons` shows promoted lessons plus the corrective action, lifecycle state, linked rules, linked gates, and the next harness fix the system should make.
|
|
38
|
-
- `retrieve_lessons` surfaces per-action lessons for the tool or workflow you are about to run.
|
|
39
|
-
- `search_thumbgate` searches feedback state across feedback logs, ContextFS memory, and prevention rules (context engineering, not weight training).
|
|
40
|
-
- History-aware distillation turns a vague `👍` or `👎` into a concrete lesson proposal from the last ~10 messages plus the failed tool call.
|
|
41
|
-
- Feedback sessions let Cursor, Claude Desktop, Codex, and the hosted API keep appending context to the same feedback record before promotion.
|
|
42
|
-
- Pre-action gates physically block tool calls that match known failure patterns.
|
|
43
|
-
- Session handoff and primer keep continuity across sessions without adding an extra orchestrator.
|
|
44
|
-
|
|
45
|
-
Free and self-hosted users can invoke `search_lessons` directly through MCP, and via the CLI with `npx thumbgate lessons`.
|
|
20
|
+
**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.
|
|
46
21
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
$ npx thumbgate serve
|
|
51
|
-
[gate] ⛔ Blocked: git push --force (rule: no-force-push, confidence: 0.94)
|
|
52
|
-
[gate] ✅ Passed: git push origin feature-branch
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Quick Start
|
|
22
|
+
**Open Source (Self-Hosted):**
|
|
56
23
|
|
|
57
24
|
```bash
|
|
58
|
-
# One command install — auto-detects your agent
|
|
59
25
|
npx thumbgate init
|
|
60
|
-
|
|
61
|
-
# Or add the MCP server directly
|
|
62
|
-
claude mcp add thumbgate -- npx -y thumbgate serve
|
|
63
|
-
codex mcp add thumbgate -- npx -y thumbgate serve
|
|
64
|
-
amp mcp add thumbgate -- npx -y thumbgate serve
|
|
65
|
-
gemini mcp add thumbgate "npx -y thumbgate serve"
|
|
66
|
-
|
|
67
|
-
# Wire PreToolUse enforcement hooks
|
|
68
|
-
npx thumbgate init --agent claude-code
|
|
69
|
-
npx thumbgate init --agent codex
|
|
70
|
-
npx thumbgate init --agent gemini
|
|
71
|
-
|
|
72
|
-
# Health check and inspect lessons
|
|
73
|
-
npx thumbgate doctor
|
|
74
|
-
npx thumbgate lessons
|
|
75
|
-
npx thumbgate dashboard
|
|
76
26
|
```
|
|
77
27
|
|
|
78
|
-
##
|
|
79
|
-
|
|
80
|
-
If you use Claude Code, ThumbGate is available as a built-in skill:
|
|
28
|
+
## Before / After
|
|
81
29
|
|
|
82
|
-
```bash
|
|
83
|
-
# Type in any Claude Code session:
|
|
84
|
-
/thumbgate
|
|
85
30
|
```
|
|
31
|
+
WITHOUT THUMBGATE WITH THUMBGATE
|
|
86
32
|
|
|
87
|
-
|
|
33
|
+
Session 1: Session 1:
|
|
34
|
+
Agent force-pushes to main. Agent force-pushes to main.
|
|
35
|
+
You correct it. You 👎 it.
|
|
88
36
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
37
|
+
Session 2: Session 2:
|
|
38
|
+
Agent force-pushes again. ⛔ Gate blocks force-push.
|
|
39
|
+
It learned nothing. Agent uses safe push instead.
|
|
92
40
|
|
|
93
|
-
|
|
41
|
+
Session 3: Session 3+:
|
|
42
|
+
Same mistake. Again. Permanently fixed.
|
|
43
|
+
```
|
|
94
44
|
|
|
95
45
|
## How It Works
|
|
96
46
|
|
|
97
47
|
```
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
48
|
+
YOU THUMBGATE YOUR AGENT
|
|
49
|
+
│ │ │
|
|
50
|
+
│ 👎 "broke prod" │ │
|
|
51
|
+
├───────────────────────►│ │
|
|
52
|
+
│ │ distill + validate │
|
|
53
|
+
│ │ ┌─────────────────┐ │
|
|
54
|
+
│ │ │ lesson + rule │ │
|
|
55
|
+
│ │ │ created │ │
|
|
56
|
+
│ │ └─────────────────┘ │
|
|
57
|
+
│ │ │
|
|
58
|
+
│ │ PreToolUse hook fires │
|
|
59
|
+
│ │◄───────────────────────────┤ tries same mistake
|
|
60
|
+
│ │ ⛔ BLOCKED │
|
|
61
|
+
│ ├───────────────────────────►│ forced to try safe path
|
|
62
|
+
│ │ │
|
|
63
|
+
│ 👍 "good fix" │ │
|
|
64
|
+
├───────────────────────►│ │
|
|
65
|
+
│ │ reinforced ✅ │
|
|
66
|
+
│ │ │
|
|
104
67
|
```
|
|
105
68
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Feedback session flow:
|
|
69
|
+
## The Loop
|
|
109
70
|
|
|
110
71
|
```
|
|
111
|
-
|
|
72
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
73
|
+
│ Capture │────►│ Distill │────►│ Remember │────►│ Rule │────►│ Gate │
|
|
74
|
+
│ 👍 / 👎 │ │ history- │ │ SQLite + │ │ auto-gen │ │ PreTool │
|
|
75
|
+
│ │ │ aware │ │ FTS5 DB │ │ from │ │ Use hook │
|
|
76
|
+
│ │ │ │ │ │ │ failures │ │ enforces │
|
|
77
|
+
└──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
112
78
|
```
|
|
113
79
|
|
|
114
|
-
##
|
|
115
|
-
|
|
116
|
-
- **ADK-Style Progressive Disclosure** — 3-tier skill loading (L1 metadata → L2 rules → L3 resources) that cuts token usage by 82%. Skill factory auto-generates new skill packs from recurring failure patterns. `measureSkillTokens()` shows exact token cost per tier.
|
|
117
|
-
- **Agent Security Hardening** — credential attestation tracks what creds each agent uses per tool call. Privilege escalation detection checks tool calls against MCP profile allowlists. Dependency attestation gate blocks known-compromised packages (event-stream, ua-parser-js).
|
|
118
|
-
- **Ephemeral Agent Store** — per-agent isolated namespaces for background agents with <10s lifetimes. Auto-merge into main store with PII governance check. Data compaction removes old non-promoted entries.
|
|
119
|
-
- **Prompt-Level DLP** — scans tool call inputs for PII/secrets BEFORE execution. Shadow tool detection flags actions bypassing MCP. Governance score (0-100 + letter grade A-F) per agent session.
|
|
120
|
-
- **Memory Migration** — imports Claude Code MEMORY.md files into ThumbGate's SQLite lesson DB. Health check warns on the 200-line cap Mem0 exposed. Comparison data for marketing.
|
|
121
|
-
|
|
122
|
-
### Previous (v0.9.6)
|
|
123
|
-
|
|
124
|
-
- **Background Agent Governance** — run tracking, pre-run governance gates, CI auto-feedback capture. Blocks agents with >50% failure rate. Warns on protected branches and large blast radius. Auto-captures CI pass/fail as structured feedback — no human in the loop. Governance report shows per-agent pass rates and gate blocks.
|
|
125
|
-
- **Hallucination Detector** — decomposes agent claims ("deployed", "tests pass", "PR merged") into verifiable sub-claims, checks each against evidence. Confidence-weighted gates: low confidence blocks, medium warns, high allows. Retrieval-grounded verification flags contradictions with prevention rules.
|
|
126
|
-
- **PII Scanner + Data Governance** — detects emails, phone numbers, SSNs, credit cards in feedback content. DPO export gate blocks pairs containing PII. User-controlled preferences for what data can be exported, shared, or retained. Compliance-ready audit summary.
|
|
127
|
-
- **CLI Inline Feedback** — `node scripts/cli-feedback.js down "broke tests"` captures feedback and echoes lesson + stats to terminal. No browser needed.
|
|
128
|
-
- **Statusline Lessons** — Claude Code statusbar shows most recent lesson with clickable dashboard/lessons links. Auto-created on every feedback capture.
|
|
129
|
-
|
|
130
|
-
### Previous (v0.9.5)
|
|
131
|
-
|
|
132
|
-
- **Conversation Context Capture** — Captures the last 5-10 conversation turns alongside every thumbs up/down, so lessons include the full story, not just a one-liner summary.
|
|
133
|
-
- **History-aware lesson distillation** — Vague thumbs feedback can reuse the recent conversation window plus the failed tool call to propose `whatWentWrong`, `whatToChange`, and a concrete lesson instead of discarding the signal.
|
|
134
|
-
- **Feedback Sessions** — Follow-up messages after thumbs up/down ("you lied about X", "you forgot Y") are captured for 60 seconds and folded into the lesson.
|
|
135
|
-
- **Self-Healing Reflector** — On negative feedback, automatically runs a post-mortem: analyzes what went wrong, checks for recurrence, and proposes a specific rule back to the user.
|
|
136
|
-
- **Structured IF/THEN Rules** — Every lesson is extracted as a structured rule with trigger, action, confidence, and scope — not flat text.
|
|
137
|
-
- **Per-Action Lesson Retrieval** — `retrieve_lessons` MCP tool returns top-K relevant lessons for each tool call using keyword matching, file path overlap, and recency decay.
|
|
138
|
-
|
|
139
|
-
### Previous (v0.9.0)
|
|
140
|
-
|
|
141
|
-
- **Domain skill packs** — installable best-practice rule sets for Stripe, Railway, database migrations. Auto-match by task context.
|
|
142
|
-
- **Before/after eval harness** — 6 built-in eval cases, 100% pass rate with ThumbGate vs 0% without.
|
|
143
|
-
- **MetaClaw slow loop** — idle-time DPO export scheduler via LaunchAgent cron.
|
|
144
|
-
- **Metered outcome billing** — $0.10/blocked action (Pro), $0.08/seat (Team), floor pricing.
|
|
145
|
-
- **AI Control Tower** — per-tool KPIs (P50/P90/P95 latency, success rate), SLO threshold alerts, access anomaly detection.
|
|
146
|
-
- **Daily digest + weekly stats** — ambient Slack/Teams/Discord push. Social-ready weekly stats for build-in-public.
|
|
147
|
-
- **Statusline upgrade** — Claude Code statusbar shows SLO violations, at-risk tools, anomalies inline.
|
|
148
|
-
- **Gemini MCP adapter** — 14 tool declarations for native Gemini agent interop.
|
|
80
|
+
## Quick Start (Self-Hosted)
|
|
149
81
|
|
|
150
|
-
|
|
82
|
+
```bash
|
|
83
|
+
npx thumbgate init # auto-detect agent + wire hooks
|
|
84
|
+
npx thumbgate doctor # health check
|
|
85
|
+
npx thumbgate lessons # inspect learned lessons
|
|
86
|
+
npx thumbgate dashboard # local dashboard
|
|
87
|
+
```
|
|
151
88
|
|
|
152
|
-
|
|
153
|
-
- **Multi-hop retrieval** — iterative retrieve → prune → refine loop for complex queries, inspired by Context-1 agentic retrieval
|
|
154
|
-
- **Active context pruning** — re-scores accumulated items after each retrieval hop, drops weak chunks to keep context quality high
|
|
155
|
-
- **Thompson Sampling calibration** — minimum sample threshold (5) prevents low-sample overconfidence; confidence tiers (none/low/medium/high)
|
|
156
|
-
- **Org dashboard** — `org_dashboard` MCP tool aggregates gate decisions across all agent sessions (Team rollout: full visibility, Free preview: 3 agents)
|
|
157
|
-
- **Distractor-aware DPO** — training data export includes near-miss same-domain distractors for harder negatives
|
|
158
|
-
- **Funnel invariant CI** — 13 tests prevent checkout path regression; Pro parity enforced across free/Pro npm packages
|
|
159
|
-
- **Dual-signal feedback** — optional `failureType` ("decision" vs "execution") on `capture_feedback` creates separate Thompson Sampling sub-arms per failure dimension, inspired by Gen-Searcher's dual reward system
|
|
89
|
+
Or wire MCP directly: `claude mcp add thumbgate -- npx -y thumbgate serve`
|
|
160
90
|
|
|
161
|
-
|
|
91
|
+
Works with **Claude Code, Cursor, Codex, Gemini, Amp, OpenCode**, and any MCP-compatible agent.
|
|
162
92
|
|
|
163
|
-
|
|
93
|
+
> **Want team analytics and shared lessons?** [Start with ThumbGate Pro →](https://thumbgate-production.up.railway.app/checkout/pro?utm_source=github&utm_medium=readme&utm_campaign=quickstart_cta) Free for individual devs. No credit card required.
|
|
164
94
|
|
|
165
|
-
|
|
95
|
+
## Built-in Gates
|
|
166
96
|
|
|
167
|
-
```text
|
|
168
|
-
Agent tries git push --force
|
|
169
|
-
→ PreToolUse hook fires
|
|
170
|
-
→ gates-engine checks rules
|
|
171
|
-
→ BLOCKED: no force pushes to protected branches
|
|
172
97
|
```
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
## What Actually Works
|
|
185
|
-
|
|
186
|
-
| Actually works | Does not work |
|
|
187
|
-
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
188
|
-
| `recall` injects past context into the next session | Thumbs up/down changing model weights |
|
|
189
|
-
| `session_handoff` and `session_primer` preserve continuity | Agents magically remembering what happened last session |
|
|
190
|
-
| `search_lessons` exposes corrective actions, lifecycle state, linked rules, linked gates, and next harness fixes | Feedback stats automatically improving behavior by themselves |
|
|
191
|
-
| Natural-language harness specs keep workflow control legible and portable across runtimes | Re-implementing the same agent-control logic in every adapter |
|
|
192
|
-
| Pre-action gates block known-bad tool calls before execution | Agents self-correcting without context injection or gates |
|
|
193
|
-
| Auto-promotion turns repeated failures into warn/block rules | Calling this model training in the strict sense |
|
|
194
|
-
| Rejection ledger shows why vague feedback was rejected | Vague signals silently helping the system |
|
|
195
|
-
|
|
196
|
-
## Core MCP Tools
|
|
197
|
-
|
|
198
|
-
### Essential profile
|
|
199
|
-
|
|
200
|
-
| Tool | Purpose |
|
|
201
|
-
| ---------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
202
|
-
| `capture_feedback` | Accept up/down signal + context, validate, promote to memory |
|
|
203
|
-
| `open_feedback_session`| Start a linked feedback session when the correction needs multiple follow-up messages |
|
|
204
|
-
| `append_feedback_context` | Add more transcript or operator notes to the open feedback session |
|
|
205
|
-
| `finalize_feedback_session` | Close the linked session and promote the combined evidence into one feedback record |
|
|
206
|
-
| `recall` | Recall relevant past failures and rules for the current task |
|
|
207
|
-
| `search_lessons` | Search promoted lessons with corrective action, lifecycle state, rules, gates |
|
|
208
|
-
| `retrieve_lessons` | Retrieve the highest-signal lessons for a specific tool, action, or workflow context |
|
|
209
|
-
| `reflect_on_feedback` | Propose a reusable rule or lesson from the recent conversation window |
|
|
210
|
-
| `search_thumbgate` | Search feedback state across feedback logs, ContextFS, and rules (context engineering, not weight training) |
|
|
211
|
-
| `prevention_rules` | Generate prevention rules from repeated mistakes |
|
|
212
|
-
| `enforcement_matrix` | Inspect promotion rate, active gates, and rejection ledger |
|
|
213
|
-
| `feedback_stats` | Approval rate and failure-domain summary |
|
|
214
|
-
| `estimate_uncertainty` | Bayesian uncertainty estimate for risky tags |
|
|
215
|
-
| `org_dashboard` | **Team** — Shared lessons plus org-wide multi-agent visibility, adherence rates, and risk alerts |
|
|
216
|
-
| `open_feedback_session` | Start a feedback session after thumbs up/down to capture follow-up context |
|
|
217
|
-
| `append_feedback_context` | Add follow-up messages to an open feedback session within the 60-second window |
|
|
218
|
-
| `finalize_feedback_session` | Close the session and fold all follow-up context into the lesson |
|
|
219
|
-
| `retrieve_lessons` | Return top-K relevant lessons for a tool call using keyword matching, file path overlap, and recency decay |
|
|
220
|
-
| `reflect_on_feedback` | Run a self-healing post-mortem on negative feedback — analyzes what went wrong and proposes a rule |
|
|
221
|
-
|
|
222
|
-
Natural-language harnesses now live in [`harnesses/`](harnesses) and can be executed through the async runtime:
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
node scripts/async-job-runner.js --list-harnesses
|
|
226
|
-
node scripts/async-job-runner.js --run-harness=repo-full-verification --harness-inputs='{"verificationCommand":"npm run verify:full"}'
|
|
98
|
+
┌─────────────────────────────────────────────────────────┐
|
|
99
|
+
│ ENFORCEMENT LAYER │
|
|
100
|
+
│ │
|
|
101
|
+
│ ⛔ force-push → blocks git push --force │
|
|
102
|
+
│ ⛔ protected-branch → blocks direct push to main │
|
|
103
|
+
│ ⛔ unresolved-threads → blocks push with open reviews │
|
|
104
|
+
│ ⛔ package-lock-reset → blocks destructive lock edits │
|
|
105
|
+
│ ⛔ env-file-edit → blocks .env secret exposure │
|
|
106
|
+
│ │
|
|
107
|
+
│ + custom gates in config/gates/custom.json │
|
|
108
|
+
└─────────────────────────────────────────────────────────┘
|
|
227
109
|
```
|
|
228
110
|
|
|
229
|
-
|
|
111
|
+
## Feedback Sessions
|
|
230
112
|
|
|
231
|
-
```bash
|
|
232
|
-
THUMBGATE_PROVIDER_MODE=local \
|
|
233
|
-
THUMBGATE_LOCAL_MODEL_FAMILY=deepseek-r1 \
|
|
234
|
-
THUMBGATE_LOCAL_MODEL_SERVER=sglang \
|
|
235
|
-
THUMBGATE_INDEXCACHE_ENABLED=true \
|
|
236
|
-
npm run profile:route
|
|
237
113
|
```
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
THUMBGATE_MCP_PROFILE=essential claude mcp add thumbgate -- npx -y thumbgate serve
|
|
114
|
+
👎 thumbs down
|
|
115
|
+
└─► open_feedback_session
|
|
116
|
+
└─► "you lied about deployment" (append_feedback_context)
|
|
117
|
+
└─► "tests were actually failing" (append_feedback_context)
|
|
118
|
+
└─► finalize_feedback_session
|
|
119
|
+
└─► lesson inferred from full conversation
|
|
245
120
|
```
|
|
246
121
|
|
|
247
|
-
|
|
122
|
+
History-aware distillation turns vague signals into concrete lessons using the last ~10 messages and the failed tool call.
|
|
248
123
|
|
|
249
|
-
|
|
124
|
+
Free and self-hosted users can invoke `search_lessons` directly through MCP, and via the CLI with `npx thumbgate lessons`.
|
|
250
125
|
|
|
251
|
-
|
|
126
|
+
## Pricing
|
|
252
127
|
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
|
|
128
|
+
```
|
|
129
|
+
┌──────────────┬──────────────────────┬──────────────────────────────┐
|
|
130
|
+
│ FREE │ PRO $19/mo or $149/yr│ TEAM $12/seat/mo (min 3) │
|
|
131
|
+
├──────────────┼──────────────────────┼──────────────────────────────┤
|
|
132
|
+
│ Unlimited │ Unlimited feedback │ Shared hosted lesson DB │
|
|
133
|
+
│ feedback │ captures + search │ Org dashboard │
|
|
134
|
+
│ captures │ DPO export │ Gate template library │
|
|
135
|
+
│ 5 daily │ Personal dashboard │ Workflow hardening sprint │
|
|
136
|
+
│ lesson │ │ │
|
|
137
|
+
│ searches │ │ │
|
|
138
|
+
└──────────────┴────────────────────┴──────────────────────────────┘
|
|
256
139
|
```
|
|
257
140
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
## ThumbGate vs Alternatives
|
|
261
|
-
|
|
262
|
-
| Feature | ThumbGate | SpecLock | Mem0 | .cursorrules |
|
|
263
|
-
| -------------------------------- | ------------------------------------------------- | ---------------------------------------------- | ------------------ | ---------------- |
|
|
264
|
-
| Blocks mistakes before execution | **Yes** — PreToolUse gates | Yes — Patch Firewall | No | No |
|
|
265
|
-
| Learns from your feedback | **Yes** — thumbs up/down | No — manual spec writing | Yes — auto-capture | No |
|
|
266
|
-
| Works across sessions | **Yes** — SQLite + JSONL | Yes — encrypted store | Yes — cloud | No — per-project |
|
|
267
|
-
| Auto-generates rules | **Yes** — from repeated failures | No — manual or Gemini compile | No | No |
|
|
268
|
-
| Agent support | Claude Code, Codex, Gemini, Amp, Cursor, OpenCode | Claude Code, Cursor, Windsurf, Cline, Bolt.new | Claude, Cursor | Cursor only |
|
|
269
|
-
| Install | `npx thumbgate init` | `npx speclock setup` | Cloud signup | Edit file |
|
|
270
|
-
| Cost | **Free** ($19/mo or $149/yr Pro; Team rollout starts at $12/seat/mo) | Free | Free tier + paid | Free |
|
|
271
|
-
| npm weekly downloads | **724** | 98 | N/A | N/A |
|
|
272
|
-
|
|
273
|
-
**When to use ThumbGate:** You want your agent to learn from mistakes automatically and enforce what it learned. One thumbs-down creates a gate.
|
|
141
|
+
Free includes unlimited feedback captures, 5 daily lesson searches, unlimited recall, and gating. History-aware distillation turns vague feedback into concrete lessons. Feedback sessions (`open_feedback_session` → `append_feedback_context` → `finalize_feedback_session`) link follow-up context to one record.
|
|
274
142
|
|
|
275
|
-
|
|
143
|
+
It does not update model weights. It's context engineering — enforcement that gets smarter every session.
|
|
276
144
|
|
|
277
|
-
**
|
|
145
|
+
**[Get Pro](https://thumbgate-production.up.railway.app/checkout/pro?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)** | **[Start Team Rollout](https://thumbgate-production.up.railway.app/#workflow-sprint-intake?utm_source=github&utm_medium=readme&utm_campaign=team_rollout)** | **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)**
|
|
278
146
|
|
|
279
147
|
## Tech Stack
|
|
280
148
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
- **Corrective actions (v0.8.0):** On negative feedback, `capture_feedback` returns `correctiveActions[]` — top 3 remediation steps inferred from similar past failures by tag/domain overlap.
|
|
299
|
-
- **Context assembly:** ContextFS packs and provenance logs
|
|
300
|
-
- **Default retrieval path:** SQLite FTS5 (primary) with JSONL Jaccard fallback
|
|
301
|
-
- **Semantic/vector lane:** LanceDB + Apache Arrow + local embeddings via Hugging Face Transformers
|
|
302
|
-
|
|
303
|
-
### Intelligence layer
|
|
304
|
-
|
|
305
|
-
- **MemAlign-inspired dual recall:** Principle-based memory (distilled rules) + episodic context (raw feedback with timestamps). Recall surfaces both lanes ranked by relevance.
|
|
306
|
-
- **Thompson Sampling:** Bayesian multi-armed bandit over feedback tags — adapts gate sensitivity per failure domain based on observed positive/negative signal ratios.
|
|
307
|
-
- **Corrective action inference:** On negative feedback, the lesson DB infers top-3 remediation steps from similar past failures by tag/domain overlap.
|
|
308
|
-
- **Bayesian belief update:** Each memory carries a posterior belief that updates on new evidence — high-entropy contradictions auto-prune.
|
|
309
|
-
|
|
310
|
-
### Enforcement and automation
|
|
311
|
-
|
|
312
|
-
- **PreToolUse enforcement:** [scripts/gates-engine.js](scripts/gates-engine.js)
|
|
313
|
-
- **Hook wiring:** `init --agent claude-code|codex|gemini`
|
|
314
|
-
- **Browser automation / ops:** `playwright-core`
|
|
315
|
-
- **Social analytics store:** `better-sqlite3`
|
|
316
|
-
|
|
317
|
-
### Billing and hosting
|
|
318
|
-
|
|
319
|
-
- **Billing:** Stripe
|
|
320
|
-
- **Hosted API / landing page:** Railway
|
|
321
|
-
- **Worker lane:** Cloudflare Workers in [`workers/`](workers)
|
|
322
|
-
|
|
323
|
-
## Agent Integration Guides
|
|
324
|
-
|
|
325
|
-
- [Claude Desktop extension](docs/CLAUDE_DESKTOP_EXTENSION.md)
|
|
326
|
-
- [Cursor plugin operations](docs/CURSOR_PLUGIN_OPERATIONS.md)
|
|
327
|
-
- [Continuity tools integration](docs/guides/continuity-tools-integration.md)
|
|
328
|
-
- [OpenCode integration](docs/guides/opencode-integration.md)
|
|
329
|
-
|
|
330
|
-
## Operator Contract
|
|
331
|
-
|
|
332
|
-
For autonomous agent runs against this or any repo using this workflow:
|
|
333
|
-
|
|
334
|
-
- [WORKFLOW.md](WORKFLOW.md) — scope, proof-of-work, hard stops, done criteria
|
|
335
|
-
- [.github/ISSUE_TEMPLATE/ready-for-agent.yml](.github/ISSUE_TEMPLATE/ready-for-agent.yml) — bounded intake template
|
|
336
|
-
- [.github/pull_request_template.md](.github/pull_request_template.md) — proof-first PR handoff
|
|
337
|
-
|
|
338
|
-
## Pro Pack
|
|
339
|
-
|
|
340
|
-
**[$19/mo or $149/yr](https://thumbgate-production.up.railway.app/checkout/pro?utm_source=github&utm_medium=readme&utm_campaign=thumbgate)** — personal local dashboard, DPO export, advanced data exports, and founder-license support for individual operators.
|
|
341
|
-
|
|
342
|
-
**[Start Team Rollout](https://thumbgate-production.up.railway.app/#workflow-sprint-intake?utm_source=github&utm_medium=readme&utm_campaign=team_rollout)** — shared hosted lesson DB, org dashboard, generated hosted review views, curated gate templates, and workflow-hardening rollout support for teams.
|
|
343
|
-
|
|
344
|
-
### Free vs Pro
|
|
345
|
-
|
|
346
|
-
| Feature | Free | Pro ($19/mo or $149/yr) | Team rollout ($12/seat/mo, min 3) |
|
|
347
|
-
| --------------------------------- | ------ | ----------------------- | --------------------------------- |
|
|
348
|
-
| Feedback capture (thumbs up/down) | 5/day | Unlimited | Shared across team workflow |
|
|
349
|
-
| Lesson search | 10/day | Unlimited | Shared hosted lesson DB |
|
|
350
|
-
| Recall | Unlimited | Unlimited | Shared hosted recall |
|
|
351
|
-
| Prevention rules | Yes | Yes | Team-wide rollout |
|
|
352
|
-
| PreToolUse gates | Yes | Yes | Team-wide rollout |
|
|
353
|
-
| Thompson Sampling | Basic | Advanced | Advanced |
|
|
354
|
-
| DPO training export | No | Yes | Yes |
|
|
355
|
-
| Databricks export | No | Yes | Yes |
|
|
356
|
-
| Personal local dashboard | No | Yes | Yes |
|
|
357
|
-
| Org dashboard + active agents | No | No | Yes |
|
|
358
|
-
| Gate template library | No | No | Yes |
|
|
359
|
-
| Workflow hardening sprint | No | No | Yes |
|
|
360
|
-
| Priority support | No | Yes | Yes |
|
|
361
|
-
|
|
362
|
-
Free keeps the core safety policy, up to 10 auto-promoted gates, 5 daily feedback captures, 10 daily lesson searches, and unlimited recall on your machine.
|
|
149
|
+
```
|
|
150
|
+
┌─────────────────────────────────────────────────────────┐
|
|
151
|
+
│ STORAGE │ INTELLIGENCE │ ENFORCEMENT │
|
|
152
|
+
│ │ │ │
|
|
153
|
+
│ SQLite + FTS5 │ MemAlign dual │ PreToolUse │
|
|
154
|
+
│ LanceDB vectors │ recall │ hook engine │
|
|
155
|
+
│ JSONL logs │ Thompson Sampling│ Gates config │
|
|
156
|
+
│ ContextFS │ │ Hook wiring │
|
|
157
|
+
├───────────────────┼───────────────────┼──────────────────┤
|
|
158
|
+
│ INTERFACES │ BILLING │ HOSTING │
|
|
159
|
+
│ │ │ │
|
|
160
|
+
│ MCP stdio │ Stripe │ Railway │
|
|
161
|
+
│ HTTP API │ │ Cloudflare │
|
|
162
|
+
│ CLI │ │ Workers │
|
|
163
|
+
│ Node.js >=18 │ │ │
|
|
164
|
+
└───────────────────┴───────────────────┴──────────────────┘
|
|
165
|
+
```
|
|
363
166
|
|
|
364
|
-
|
|
167
|
+
## Docs
|
|
365
168
|
|
|
366
|
-
|
|
169
|
+
- [Commercial Truth](docs/COMMERCIAL_TRUTH.md) — pricing, claims, what we don't say
|
|
170
|
+
- [Verification Evidence](docs/VERIFICATION_EVIDENCE.md) — proof artifacts
|
|
171
|
+
- [WORKFLOW.md](WORKFLOW.md) — agent-run contract (scope, hard stops, proof commands)
|
|
172
|
+
- [ready-for-agent issue template](.github/ISSUE_TEMPLATE/ready-for-agent.yml) — intake for agent tasks
|
|
367
173
|
|
|
368
|
-
|
|
369
|
-
- [Verification Evidence](docs/VERIFICATION_EVIDENCE.md)
|
|
370
|
-
- [Pitch](docs/PITCH.md)
|
|
371
|
-
- [Anthropic Marketplace Strategy](docs/ANTHROPIC_MARKETPLACE_STRATEGY.md)
|
|
174
|
+
Pro overlay: [`thumbgate-pro`](https://github.com/IgorGanapolsky/thumbgate-pro) — separate repo/package inheriting from this base.
|
|
372
175
|
|
|
373
176
|
## License
|
|
374
177
|
|
package/adapters/README.md
CHANGED
|
@@ -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
|
|
6
|
+
- `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@0.9.11 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.
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"thumbgate": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["
|
|
5
|
+
"args": ["--yes", "--package", "thumbgate@0.9.11", "thumbgate", "serve"]
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
9
|
"preToolUse": {
|
|
10
10
|
"command": "npx",
|
|
11
|
-
"args": ["
|
|
11
|
+
"args": ["--yes", "--package", "thumbgate@0.9.11", "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
|
-
command = "
|
|
4
|
-
args = ["
|
|
3
|
+
command = "npx"
|
|
4
|
+
args = ["--yes", "--package", "thumbgate@0.9.11", "thumbgate", "serve"]
|
|
5
5
|
|
|
6
6
|
# Hard PreToolUse hook for Codex
|
|
7
7
|
[hooks.pre_tool_use]
|
|
8
|
-
command = "
|
|
9
|
-
args = ["
|
|
8
|
+
command = "npx"
|
|
9
|
+
args = ["--yes", "--package", "thumbgate@0.9.11", "thumbgate", "gate-check"]
|