thumbgate 1.30.0 → 1.31.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.
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +54 -16
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/forge/forge.yaml +3 -3
- package/adapters/mcp/server-stdio.js +66 -8
- package/adapters/opencode/opencode.json +1 -1
- package/bench/observability-eval-suite.json +2 -2
- package/bin/cli.js +147 -31
- package/config/evals/generation-quality-golden.json +95 -0
- package/config/evals/rag-answer-quality-golden.json +91 -0
- package/config/evals/retrieval-hybrid-ablation.json +66 -0
- package/config/evals/retrieval-ranking-golden.json +522 -0
- package/config/gates/default.json +217 -50
- package/config/mcp-allowlists.json +212 -206
- package/config/model-tiers.json +7 -2
- package/glama.json +6 -0
- package/package.json +60 -8
- package/public/assets/diagrams/before-after.svg +17 -16
- package/public/assets/diagrams/hero-thumbs.svg +68 -0
- package/public/assets/diagrams/loop.svg +19 -13
- package/public/assets/diagrams/self-improving-thumbs-loop.svg +105 -0
- package/public/compare.html +1 -0
- package/public/dashboard.html +126 -28
- package/public/evaluations.html +1 -1
- package/public/index.html +142 -13
- package/public/numbers.html +3 -2
- package/public/pricing.html +143 -30
- package/scripts/a-plus-evidence-scorecard.js +303 -0
- package/scripts/async-eval-observability.js +36 -11
- package/scripts/audit-trail.js +37 -1
- package/scripts/auto-promote-gates.js +149 -34
- package/scripts/colbert-style-maxsim.js +236 -0
- package/scripts/cross-encoder-reranker.js +356 -126
- package/scripts/dashboard-chat.js +350 -17
- package/scripts/document-intake.js +283 -7
- package/scripts/eval-quality-suite.js +204 -0
- package/scripts/feedback-loop.js +115 -7
- package/scripts/feedback-paths.js +32 -13
- package/scripts/feedback-quality.js +53 -0
- package/scripts/filesystem-search.js +17 -7
- package/scripts/gates-engine.js +17 -0
- package/scripts/harness-tool-names.js +70 -0
- package/scripts/hook-runtime.js +10 -3
- package/scripts/lesson-db.js +16 -5
- package/scripts/lesson-embedding-index.js +67 -20
- package/scripts/lesson-embedding-maintenance.js +177 -0
- package/scripts/lesson-reranker.js +55 -9
- package/scripts/lesson-retrieval.js +305 -29
- package/scripts/lesson-search.js +22 -8
- package/scripts/llm-client.js +304 -15
- package/scripts/model-tier-router.js +593 -0
- package/scripts/pragmatic-hybrid-search.js +379 -0
- package/scripts/rag-document-pipeline.js +461 -0
- package/scripts/rag-structured-output.js +441 -0
- package/scripts/ragas-style-metrics.js +351 -0
- package/scripts/request-envelope.js +178 -0
- package/scripts/rerank-pipeline.js +370 -0
- package/scripts/rerank-quality-eval.js +155 -0
- package/scripts/retrieval-hybrid-ablation.js +120 -0
- package/scripts/retrieval-quality-tier.js +118 -0
- package/scripts/secret-scanner.js +395 -4
- package/scripts/self-distill-agent.js +7 -1
- package/scripts/self-healing-check.js +25 -0
- package/scripts/skill-packs.js +183 -0
- package/scripts/slow-loop.js +72 -0
- package/scripts/statusline-links.js +1 -1
- package/scripts/statusline.sh +8 -1
- package/scripts/telemetry-analytics.js +13 -1
- package/scripts/thumbgate-search.js +98 -6
- package/scripts/tier-budget-guard.js +186 -0
- package/scripts/tool-registry.js +46 -0
- package/scripts/vector-store.js +108 -4
- package/scripts/verify-marketing-pages-deployed.js +85 -3
- package/server.json +44 -0
- package/smithery.yaml +17 -0
- package/src/api/server.js +194 -13
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"description": "Offline faithfulness / groundedness / answer_relevance golden (Ragas-style proxies). Deterministic CI.",
|
|
4
|
+
"thresholds": {
|
|
5
|
+
"minCases": 8,
|
|
6
|
+
"minFaithfulness": 0.55,
|
|
7
|
+
"minGroundedness": 0.48,
|
|
8
|
+
"minAnswerRelevance": 0.42,
|
|
9
|
+
"minContextRecall": 0.75
|
|
10
|
+
},
|
|
11
|
+
"cases": [
|
|
12
|
+
{
|
|
13
|
+
"id": "force-push-grounded",
|
|
14
|
+
"query": "Can I force push to main?",
|
|
15
|
+
"context": "NEVER force-push or git push --force to main/master. Use --force-with-lease only on personal branches after review.",
|
|
16
|
+
"answer": "No. Never force-push to main. Use --force-with-lease only on personal branches after review.",
|
|
17
|
+
"expectedConstraint": "NEVER force-push",
|
|
18
|
+
"expectedKeywords": ["never", "force", "main"]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "deploy-health-grounded",
|
|
22
|
+
"query": "Is the deploy live?",
|
|
23
|
+
"context": "ALWAYS verify /health endpoint returns the new version after deploy. NEVER say deployed without curling health.",
|
|
24
|
+
"answer": "Only after curling /health and matching the new version. Do not claim deployed without that check.",
|
|
25
|
+
"expectedConstraint": "verify /health",
|
|
26
|
+
"expectedKeywords": ["health", "version"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "secrets-grounded",
|
|
30
|
+
"query": "Should we commit the .env?",
|
|
31
|
+
"context": "NEVER commit .env files, API keys, or PEMs to git. Rotate any leaked credential immediately.",
|
|
32
|
+
"answer": "No. Never commit .env or API keys. Rotate credentials if anything leaked.",
|
|
33
|
+
"expectedConstraint": "NEVER commit .env",
|
|
34
|
+
"expectedKeywords": [".env", "never", "keys"]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "idempotency-grounded",
|
|
38
|
+
"query": "How do we create PaymentIntents safely?",
|
|
39
|
+
"context": "ALWAYS use idempotency keys on PaymentIntent creation to prevent duplicate charges.",
|
|
40
|
+
"answer": "Always attach an idempotency key when creating a PaymentIntent so retries cannot double-charge.",
|
|
41
|
+
"expectedConstraint": "idempotency keys",
|
|
42
|
+
"expectedKeywords": ["idempotency", "PaymentIntent"]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "lease-grounded",
|
|
46
|
+
"query": "What happens if two runners take the same task?",
|
|
47
|
+
"context": "ALWAYS enforce one-thread-one-executor with a 90-second renewable lease. Two active executors cause double writes.",
|
|
48
|
+
"answer": "That is double-execution. Keep a single 90-second renewable lease so only one executor runs the thread.",
|
|
49
|
+
"expectedConstraint": "one-thread-one-executor",
|
|
50
|
+
"expectedKeywords": ["lease", "executor"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "hashnode-grounded",
|
|
54
|
+
"query": "Should I re-publish the archived Hashnode post?",
|
|
55
|
+
"context": "NEVER publish or re-publish on Hashnode while AutoMod freeze is active. Prefer Medium and dev.to.",
|
|
56
|
+
"answer": "No. Do not re-publish on Hashnode during the AutoMod freeze. Use Medium or dev.to instead.",
|
|
57
|
+
"expectedConstraint": "NEVER publish",
|
|
58
|
+
"expectedKeywords": ["Hashnode", "never", "Medium"]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "pci-grounded",
|
|
62
|
+
"query": "Where do we store card numbers?",
|
|
63
|
+
"context": "NEVER log or store raw card numbers. Use Stripe tokens or PaymentMethod IDs.",
|
|
64
|
+
"answer": "Do not store raw card numbers. Use Stripe PaymentMethod tokens only.",
|
|
65
|
+
"expectedConstraint": "NEVER log or store raw card",
|
|
66
|
+
"expectedKeywords": ["Stripe", "card", "never"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "pr-done-grounded",
|
|
70
|
+
"query": "Is the PR done?",
|
|
71
|
+
"context": "NEVER say done without showing gh pr view output and green CI. Open PR with auto-merge is not done.",
|
|
72
|
+
"answer": "Not until gh pr view shows clean threads and required CI is green. Auto-merge alone is not done.",
|
|
73
|
+
"expectedConstraint": "gh pr view",
|
|
74
|
+
"expectedKeywords": ["CI", "done", "pr"]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "db-backup-grounded",
|
|
78
|
+
"query": "Can I drop the users table now?",
|
|
79
|
+
"context": "ALWAYS back up the database before running destructive migrations. NEVER drop users table without a restore point.",
|
|
80
|
+
"answer": "Only after a verified backup and restore point. Never drop users without that.",
|
|
81
|
+
"expectedConstraint": "back up the database",
|
|
82
|
+
"expectedKeywords": ["backup", "drop", "never"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "ungrounded-contradiction",
|
|
86
|
+
"query": "Can I force push to main?",
|
|
87
|
+
"context": "NEVER force-push or git push --force to main/master.",
|
|
88
|
+
"answer": "Yes always force push to main for speed and ignore branch protection entirely.",
|
|
89
|
+
"expectedConstraint": "NEVER force-push",
|
|
90
|
+
"expectedKeywords": ["force", "main"],
|
|
91
|
+
"expectFail": true,
|
|
92
|
+
"note": "Known-bad answer; excluded from floor means; used for integrity check only"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"description": "Adversarial deterministic answer-quality proxy holdout. This validates metric behavior, not model quality.",
|
|
4
|
+
"thresholds": {
|
|
5
|
+
"minCases": 8,
|
|
6
|
+
"minClassificationAccuracy": 1,
|
|
7
|
+
"maxFalsePasses": 0
|
|
8
|
+
},
|
|
9
|
+
"cases": [
|
|
10
|
+
{
|
|
11
|
+
"id": "supported-git-policy",
|
|
12
|
+
"shouldPass": true,
|
|
13
|
+
"query": "How should I update protected main?",
|
|
14
|
+
"answer": "Use a reviewed pull request and never force-push protected main [git-policy].",
|
|
15
|
+
"referenceAnswer": "Use a reviewed pull request and never force-push protected main.",
|
|
16
|
+
"contexts": [
|
|
17
|
+
{ "id": "git-policy", "text": "Use a reviewed pull request. Never force-push protected main." }
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "negation-flip",
|
|
22
|
+
"shouldPass": false,
|
|
23
|
+
"query": "Can I force-push protected main?",
|
|
24
|
+
"answer": "Force-push is safe on protected main [git-policy].",
|
|
25
|
+
"referenceAnswer": "Never force-push protected main.",
|
|
26
|
+
"contexts": [
|
|
27
|
+
{ "id": "git-policy", "text": "Never force-push protected main because it rewrites shared history." }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "numeric-drift",
|
|
32
|
+
"shouldPass": false,
|
|
33
|
+
"query": "Which build is live?",
|
|
34
|
+
"answer": "Build 43 is live in production [health].",
|
|
35
|
+
"referenceAnswer": "Build 42 is live in production.",
|
|
36
|
+
"contexts": [
|
|
37
|
+
{ "id": "health", "text": "The production health response reports build 42." }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "off-topic-answer",
|
|
42
|
+
"shouldPass": false,
|
|
43
|
+
"query": "How do I prevent duplicate Stripe charges?",
|
|
44
|
+
"answer": "Use medium heat and stir the sauce slowly [cooking].",
|
|
45
|
+
"referenceAnswer": "Use a Stripe idempotency key.",
|
|
46
|
+
"contexts": [
|
|
47
|
+
{ "id": "cooking", "text": "Use medium heat and stir the sauce slowly." }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "partial-hallucination",
|
|
52
|
+
"shouldPass": false,
|
|
53
|
+
"query": "What proves the deployment?",
|
|
54
|
+
"answer": "The health endpoint matches build abc123 [deploy]. Revenue also doubled overnight.",
|
|
55
|
+
"referenceAnswer": "The health endpoint must match build abc123.",
|
|
56
|
+
"contexts": [
|
|
57
|
+
{ "id": "deploy", "text": "The production health endpoint matches build abc123." }
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "invalid-citation",
|
|
62
|
+
"shouldPass": false,
|
|
63
|
+
"query": "What proves the deployment?",
|
|
64
|
+
"answer": "The health endpoint matches build abc123 [invented-source].",
|
|
65
|
+
"referenceAnswer": "The health endpoint must match build abc123.",
|
|
66
|
+
"contexts": [
|
|
67
|
+
{ "id": "deploy", "text": "The production health endpoint matches build abc123." }
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "supported-idempotency",
|
|
72
|
+
"shouldPass": true,
|
|
73
|
+
"query": "How do I prevent duplicate Stripe charges?",
|
|
74
|
+
"answer": "Use the same Stripe idempotency key when retrying a PaymentIntent [billing-policy].",
|
|
75
|
+
"referenceAnswer": "Use a Stripe idempotency key for PaymentIntent retries.",
|
|
76
|
+
"contexts": [
|
|
77
|
+
{ "id": "billing-policy", "text": "Use the same Stripe idempotency key when retrying a PaymentIntent to prevent duplicate charges." }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "uncited-supported-claim",
|
|
82
|
+
"shouldPass": false,
|
|
83
|
+
"query": "How should I run a destructive migration?",
|
|
84
|
+
"answer": "Create a recoverable database backup before the migration.",
|
|
85
|
+
"referenceAnswer": "Create a recoverable database backup before a destructive migration.",
|
|
86
|
+
"contexts": [
|
|
87
|
+
{ "id": "database-policy", "text": "Create a recoverable database backup before a destructive migration." }
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kValues": [1, 3],
|
|
3
|
+
"corpus": [
|
|
4
|
+
{
|
|
5
|
+
"id": "destructive",
|
|
6
|
+
"title": "MISTAKE: rm -rf wiped the folder",
|
|
7
|
+
"content": "Never delete files without a recoverable snapshot.",
|
|
8
|
+
"tags": ["negative", "filesystem"],
|
|
9
|
+
"metadata": { "domain": "filesystem", "toolsUsed": ["Bash"] }
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "force-push",
|
|
13
|
+
"title": "MISTAKE: git push --force clobbered main",
|
|
14
|
+
"content": "Use force-with-lease and protect the trunk branch.",
|
|
15
|
+
"tags": ["negative", "git"],
|
|
16
|
+
"metadata": { "domain": "git", "toolsUsed": ["Bash"] }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "idempotency",
|
|
20
|
+
"title": "MISTAKE: duplicate Stripe payment",
|
|
21
|
+
"content": "Use an idempotency key before creating a charge.",
|
|
22
|
+
"tags": ["negative", "billing"],
|
|
23
|
+
"metadata": { "domain": "billing", "toolsUsed": ["Bash"] }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "stale-session",
|
|
27
|
+
"title": "MISTAKE: session not found",
|
|
28
|
+
"content": "Refresh the conversation identifier before resuming an expired mobile task.",
|
|
29
|
+
"tags": ["negative", "session"],
|
|
30
|
+
"metadata": { "domain": "continuity", "toolsUsed": ["Read"] }
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "noise",
|
|
34
|
+
"title": "SUCCESS: dashboard color tokens",
|
|
35
|
+
"content": "Use the design system palette for visual consistency.",
|
|
36
|
+
"tags": ["positive", "ui"],
|
|
37
|
+
"metadata": { "domain": "ui", "toolsUsed": ["Edit"] }
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"queries": [
|
|
41
|
+
{
|
|
42
|
+
"id": "erase-tree",
|
|
43
|
+
"toolName": "Bash",
|
|
44
|
+
"query": "permanently erase a directory tree",
|
|
45
|
+
"qrels": { "destructive": 3 }
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "rewrite-history",
|
|
49
|
+
"toolName": "Bash",
|
|
50
|
+
"query": "overwrite remote repository history",
|
|
51
|
+
"qrels": { "force-push": 3 }
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "replay-charge",
|
|
55
|
+
"toolName": "Bash",
|
|
56
|
+
"query": "prevent replaying the same purchase twice",
|
|
57
|
+
"qrels": { "idempotency": 3 }
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "expired-conversation",
|
|
61
|
+
"toolName": "Read",
|
|
62
|
+
"query": "the phone resumed an expired conversation identifier",
|
|
63
|
+
"qrels": { "stale-session": 3 }
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|