thumbgate 1.27.12 → 1.27.13
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/llms.txt +2 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +2 -4
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/mcp/server-stdio.js +1 -1
- package/adapters/opencode/opencode.json +1 -1
- package/adapters/policy-engine/ethicore-guardian-client.js +68 -0
- package/adapters/policy-engine/thumbgate-policy-engine-adapter.js +260 -0
- package/bin/cli.js +78 -259
- package/config/gate-templates.json +0 -228
- package/config/gates/claim-verification.json +0 -18
- package/package.json +35 -25
- package/public/assets/brand/thumbgate-logo-transparent.svg +22 -0
- package/public/assets/brand/thumbgate-mark-inline-v3.svg +19 -0
- package/public/assets/brand/thumbgate-mark.svg +11 -5
- package/public/blog.html +0 -30
- package/public/brand/thumbgate-mark.svg +9 -5
- package/public/chatgpt-app.html +2 -2
- package/public/compare.html +2 -1
- package/public/dashboard.html +1 -1
- package/public/federal.html +1 -1
- package/public/index.html +95 -216
- package/public/learn.html +59 -35
- package/public/lessons.html +1 -1
- package/public/numbers.html +2 -2
- package/public/pro.html +7 -7
- package/scripts/aws-blocks-guardrails.js +228 -0
- package/scripts/cli-schema.js +22 -10
- package/scripts/dashboard-chat.js +2 -1
- package/scripts/document-intake.js +1 -49
- package/scripts/durability/step.js +3 -3
- package/scripts/gate-stats.js +5 -11
- package/scripts/gates-engine.js +0 -49
- package/scripts/gemini-embedding-policy.js +2 -1
- package/scripts/hook-stop-anti-claim.js +116 -184
- package/scripts/hosted-config.js +0 -12
- package/scripts/lesson-search.js +1 -15
- package/scripts/llm-client.js +187 -5
- package/scripts/plausible-domain-config.js +3 -1
- package/scripts/seo-gsd.js +240 -1
- package/scripts/tool-registry.js +2 -2
- package/scripts/vector-store.js +44 -0
- package/scripts/workspace-evolver.js +62 -2
- package/src/api/server.js +340 -131
- package/public/assets/brand/thumbgate-mark-inline.svg +0 -15
- package/public/compare/adopt-ai.html +0 -219
- package/public/compare/agentix-labs.html +0 -197
- package/public/compare/ai-experience-orchestration.html +0 -216
- package/public/compare/anthropic-claude-for-legal.html +0 -260
- package/public/compare/anthropic-containment.html +0 -280
- package/public/compare/arcade.html +0 -175
- package/public/compare/arcjet.html +0 -239
- package/public/compare/bumblebee.html +0 -307
- package/public/compare/claude-code-hooks.html +0 -294
- package/public/compare/databricks-unity-ai-gateway.html +0 -215
- package/public/compare/fallow.html +0 -351
- package/public/compare/heidi.html +0 -233
- package/public/compare/mem0.html +0 -342
- package/public/compare/oak-and-sparrow-gatekeeper.html +0 -289
- package/public/compare/rein.html +0 -236
- package/public/compare/sigmashake.html +0 -256
- package/public/compare/speclock.html +0 -342
- package/public/guides/agent-harness-optimization.html +0 -342
- package/public/guides/agentic-web-governance.html +0 -406
- package/public/guides/ai-agent-governance-sprint.html +0 -415
- package/public/guides/ai-agent-pre-action-approval-gates.html +0 -401
- package/public/guides/ai-agent-workflow-migration-checklist.html +0 -392
- package/public/guides/ai-deployment-readiness.html +0 -415
- package/public/guides/ai-mode-ads-agent-governance.html +0 -401
- package/public/guides/ai-search-topical-presence.html +0 -342
- package/public/guides/autoresearch-agent-safety.html +0 -342
- package/public/guides/background-agent-governance.html +0 -358
- package/public/guides/best-tools-stop-ai-agents-breaking-production.html +0 -363
- package/public/guides/browser-automation-safety.html +0 -342
- package/public/guides/chatgpt-ads-trust.html +0 -353
- package/public/guides/claude-code-feedback.html +0 -339
- package/public/guides/claude-code-prevent-repeated-mistakes.html +0 -161
- package/public/guides/claude-code-skills-guardrails.html +0 -343
- package/public/guides/claude-desktop.html +0 -356
- package/public/guides/code-knowledge-graph-guardrails.html +0 -365
- package/public/guides/codex-cli-guardrails.html +0 -339
- package/public/guides/cursor-agent-guardrails.html +0 -339
- package/public/guides/cursor-prevent-repeated-mistakes.html +0 -161
- package/public/guides/database-agent-safety.html +0 -406
- package/public/guides/deepseek-v4-runtime-guardrails.html +0 -346
- package/public/guides/developer-machine-supply-chain-guardrails.html +0 -358
- package/public/guides/gcp-mcp-guardrails.html +0 -147
- package/public/guides/gemini-cli-feedback-memory.html +0 -339
- package/public/guides/gpt-5-5-model-evaluation.html +0 -358
- package/public/guides/internal-ai-engineering-stack-guardrails.html +0 -348
- package/public/guides/long-running-agent-context-management.html +0 -346
- package/public/guides/mcp-tool-governance.html +0 -401
- package/public/guides/multica-thumbgate-setup.html +0 -134
- package/public/guides/native-messaging-host-security.html +0 -342
- package/public/guides/policy-engine-pre-action-gates.html +0 -346
- package/public/guides/pre-action-checks.html +0 -342
- package/public/guides/pretooluse-hooks-vs-advisory-prompt-rules.html +0 -342
- package/public/guides/prompt-tricks-to-workflow-rules.html +0 -365
- package/public/guides/proxy-pointer-rag-guardrails.html +0 -352
- package/public/guides/rag-precision-tuning-guardrails.html +0 -352
- package/public/guides/reasoning-compression-guardrails.html +0 -346
- package/public/guides/relational-knowledge-ai-recommendations.html +0 -342
- package/public/guides/roo-code-alternative-cline.html +0 -339
- package/public/guides/semantic-programmatic-seo-guardrails.html +0 -352
- package/public/guides/seo-agent-skills-guardrails.html +0 -344
- package/public/guides/stop-repeated-ai-agent-mistakes.html +0 -342
- package/public/learn/ac-dc-runtime-enforcement.html +0 -277
- package/public/learn/agent-harness-pattern.html +0 -181
- package/public/learn/agent-identity-connector-governance.html +0 -146
- package/public/learn/agent-swarms-shared-gates.html +0 -173
- package/public/learn/agentic-enterprise-context-brain.html +0 -117
- package/public/learn/agentic-os-team-governance.html +0 -146
- package/public/learn/ai-agent-governance.html +0 -158
- package/public/learn/ai-agent-persistent-memory.html +0 -211
- package/public/learn/anthropomorphic-claim-gates.html +0 -180
- package/public/learn/background-agent-control-layer.html +0 -184
- package/public/learn/claude-code-goal-with-rubrics.html +0 -205
- package/public/learn/codex-role-plugins-need-governance.html +0 -125
- package/public/learn/cost-aware-agent-gate-routing.html +0 -173
- package/public/learn/databricks-unity-ai-gateway-runtime-governance.html +0 -157
- package/public/learn/deterministic-agent-workflows.html +0 -185
- package/public/learn/feedback-loop-vs-decision-layer.html +0 -283
- package/public/learn/from-prototype-to-production.html +0 -223
- package/public/learn/learn.css +0 -51
- package/public/learn/mcp-pre-action-checks-explained.html +0 -172
- package/public/learn/pretix-stripe-connect-marketplaces.html +0 -161
- package/public/learn/regulated-agent-execution-boundary.html +0 -196
- package/public/learn/spec-driven-development.html +0 -168
- package/public/learn/stop-ai-agent-force-push.html +0 -134
- package/public/learn/vibe-coding-safety-net.html +0 -142
- package/scripts/reddit-browser-notification-watch.js +0 -230
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Agent Swarms: One Gate Layer, Every Model — ThumbGate</title>
|
|
7
|
-
<script defer data-domain="thumbgate.ai" src="https://plausible.io/js/script.js"></script>
|
|
8
|
-
<meta name="description" content="Multi-agent swarms multiply repeated mistakes by the number of agents. A shared pre-action gate layer catches the mistake once and prevents it across every agent in the swarm.">
|
|
9
|
-
<meta name="keywords" content="agent swarm, multi-agent system, agent swarm token cost, agent swarm shared memory, multi-model orchestration, MCP pre-action checks, ThumbGate">
|
|
10
|
-
<meta property="og:title" content="Agent Swarms: One Gate Layer, Every Model">
|
|
11
|
-
<meta property="og:description" content="Why multi-agent swarms need shared gates, not duplicated rules — and how a single MCP layer makes Opus, GPT, and Gemini fail the same way only once.">
|
|
12
|
-
<meta property="og:type" content="article">
|
|
13
|
-
<meta property="og:url" content="https://thumbgate.ai/learn/agent-swarms-shared-gates">
|
|
14
|
-
<link rel="canonical" href="https://thumbgate.ai/learn/agent-swarms-shared-gates">
|
|
15
|
-
|
|
16
|
-
<script type="application/ld+json">
|
|
17
|
-
{
|
|
18
|
-
"@context": "https://schema.org",
|
|
19
|
-
"@type": "TechArticle",
|
|
20
|
-
"headline": "Agent Swarms: One Gate Layer, Every Model",
|
|
21
|
-
"description": "Multi-agent swarms multiply repeated mistakes by the number of agents. A shared pre-action gate layer prevents the same mistake across every agent in the swarm.",
|
|
22
|
-
"author": {
|
|
23
|
-
"@type": "Person",
|
|
24
|
-
"name": "Igor Ganapolsky",
|
|
25
|
-
"url": "https://github.com/IgorGanapolsky"
|
|
26
|
-
},
|
|
27
|
-
"publisher": {
|
|
28
|
-
"@type": "Organization",
|
|
29
|
-
"name": "ThumbGate",
|
|
30
|
-
"url": "https://thumbgate.ai"
|
|
31
|
-
},
|
|
32
|
-
"datePublished": "2026-05-18",
|
|
33
|
-
"dateModified": "2026-05-18",
|
|
34
|
-
"mainEntityOfPage": "https://thumbgate.ai/learn/agent-swarms-shared-gates",
|
|
35
|
-
"about": [
|
|
36
|
-
{"@type": "Thing", "name": "agent swarm"},
|
|
37
|
-
{"@type": "Thing", "name": "multi-agent system"},
|
|
38
|
-
{"@type": "Thing", "name": "AI agent shared memory"}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<link rel="stylesheet" href="/learn/learn.css">
|
|
44
|
-
<style>
|
|
45
|
-
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
|
|
46
|
-
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
|
|
47
|
-
th { color: var(--cyan); font-weight: 600; }
|
|
48
|
-
.mapping-row td:first-child { color: var(--green); font-weight: 500; }
|
|
49
|
-
</style>
|
|
50
|
-
</head>
|
|
51
|
-
<body>
|
|
52
|
-
|
|
53
|
-
<nav>
|
|
54
|
-
<a href="/" class="brand"><img src="/assets/brand/thumbgate-mark-inline.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
|
|
55
|
-
<a href="/guide">Setup Guide</a>
|
|
56
|
-
<a href="/learn">Learn</a>
|
|
57
|
-
<a href="/dashboard">Dashboard</a>
|
|
58
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
|
|
59
|
-
</nav>
|
|
60
|
-
|
|
61
|
-
<div class="container">
|
|
62
|
-
<div class="breadcrumb"><a href="/learn">Learn</a> / Agent Swarms: Shared Gates</div>
|
|
63
|
-
<h1>Agent Swarms: One Gate Layer, Every Model</h1>
|
|
64
|
-
<p style="color:var(--muted);">6 min read · For teams running multi-agent systems across multiple LLMs</p>
|
|
65
|
-
|
|
66
|
-
<div class="tldr"><strong>TL;DR:</strong> A 5-agent swarm without shared memory pays 5× the tokens on every repeated mistake. The fix is a single pre-action gate layer that every agent in the swarm consults before tool use — not 5 sets of prompt rules.</div>
|
|
67
|
-
|
|
68
|
-
<h2>The swarm token-cost problem</h2>
|
|
69
|
-
<p>Agent swarms route different parts of a task to different models — one model for front-end work, another for backend, a third for visual reasoning, a fourth for efficient bulk operations. The pitch is real: the right model for the right slice of work, in parallel.</p>
|
|
70
|
-
<p>The hidden cost is repetition. Each agent in the swarm has its own context window. When one agent makes a mistake — force-pushes to main, deletes a production file, paginates wrong against a rate-limited API — the other agents in the swarm have no idea. They are statistically likely to make the same mistake, because they were trained on the same internet and given the same prompt scaffolding.</p>
|
|
71
|
-
|
|
72
|
-
<div class="callout">
|
|
73
|
-
<strong>The math is unkind:</strong> with N agents and a recurring mistake class, you pay the token cost of that mistake N times per task instead of once. The fix is not better prompting. It is shared state below the agents.
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<h2>Why prompt rules cannot solve this</h2>
|
|
77
|
-
<p>A natural reflex is to copy the same "do not force-push" rule into every agent's system prompt. This fails for three reasons:</p>
|
|
78
|
-
|
|
79
|
-
<ol>
|
|
80
|
-
<li><strong>Drift.</strong> Each agent's prompt evolves independently. After a few iterations, the rules diverge across the swarm without anyone noticing.</li>
|
|
81
|
-
<li><strong>Reasoning around.</strong> A long-context agent can rationalize an exception to a prompt rule. There is no enforcement layer to say no.</li>
|
|
82
|
-
<li><strong>No learning loop.</strong> When agent A makes a new mistake, agents B/C/D never find out. Each agent has to discover the same failure independently.</li>
|
|
83
|
-
</ol>
|
|
84
|
-
|
|
85
|
-
<h2>The shared-gate architecture</h2>
|
|
86
|
-
<p>The pattern that actually works is one gate layer that every agent consults before any tool call. The gate layer holds a single lesson database, a single set of prevention rules, and a single PreToolUse hook surface.</p>
|
|
87
|
-
|
|
88
|
-
<table>
|
|
89
|
-
<thead>
|
|
90
|
-
<tr>
|
|
91
|
-
<th>Concern</th>
|
|
92
|
-
<th>Per-agent prompt rules</th>
|
|
93
|
-
<th>Shared gate layer</th>
|
|
94
|
-
</tr>
|
|
95
|
-
</thead>
|
|
96
|
-
<tbody>
|
|
97
|
-
<tr class="mapping-row">
|
|
98
|
-
<td>New mistake caught once</td>
|
|
99
|
-
<td>Other agents still vulnerable</td>
|
|
100
|
-
<td>All agents protected immediately</td>
|
|
101
|
-
</tr>
|
|
102
|
-
<tr class="mapping-row">
|
|
103
|
-
<td>Rule consistency</td>
|
|
104
|
-
<td>Drifts across agents over time</td>
|
|
105
|
-
<td>Single source of truth on disk</td>
|
|
106
|
-
</tr>
|
|
107
|
-
<tr class="mapping-row">
|
|
108
|
-
<td>Enforcement</td>
|
|
109
|
-
<td>Best-effort — agent can override</td>
|
|
110
|
-
<td>Hard block at the tool boundary</td>
|
|
111
|
-
</tr>
|
|
112
|
-
<tr class="mapping-row">
|
|
113
|
-
<td>Token cost of repeated failures</td>
|
|
114
|
-
<td>N× per task (one per agent)</td>
|
|
115
|
-
<td>1× per task (gate refuses)</td>
|
|
116
|
-
</tr>
|
|
117
|
-
</tbody>
|
|
118
|
-
</table>
|
|
119
|
-
|
|
120
|
-
<h2>How ThumbGate implements this</h2>
|
|
121
|
-
<p>ThumbGate is a single MCP server with a PreToolUse hook. Every agent in the swarm — whether it speaks to Claude, GPT, Gemini, or any other model — issues tool calls through the same MCP layer. The hook fires once per tool call, regardless of which agent issued it.</p>
|
|
122
|
-
|
|
123
|
-
<p>Three concrete properties make this work in a swarm:</p>
|
|
124
|
-
|
|
125
|
-
<ul>
|
|
126
|
-
<li><strong>Single feedback directory.</strong> Point every agent at the same <code>.thumbgate/</code> on disk (or set the <code>THUMBGATE_FEEDBACK_DIR</code> environment variable). All lessons, gates, and feedback land in one place.</li>
|
|
127
|
-
<li><strong>Model-agnostic hook.</strong> The PreToolUse hook does not care which model produced the tool call. It pattern-matches against the call itself.</li>
|
|
128
|
-
<li><strong>Append-only feedback log.</strong> Concurrent thumbs-up/down captures from different agents are JSONL appends — no contention, no lock-out, no lost lessons.</li>
|
|
129
|
-
</ul>
|
|
130
|
-
|
|
131
|
-
<div class="callout callout-green">
|
|
132
|
-
<strong>The swarm becomes one learner.</strong> Agent A makes a mistake, you thumbs-down it, the gate is promoted. The next tool call from agent B, C, or D matching that pattern is blocked. You paid once for the lesson; every agent benefits.
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<h2>What this does not solve</h2>
|
|
136
|
-
<p>Honesty matters here. A shared gate layer is not a swarm orchestrator. It does not route work between agents, decide which model is best for a subtask, or balance load. Those are the swarm framework's job.</p>
|
|
137
|
-
<p>What the gate layer does is make the swarm cheaper to operate by removing the most expensive failure mode: paying the same mistake-tax N times. If your swarm framework gives you concurrency and the gate layer gives you shared safety memory, the combination is what makes multi-agent systems economically viable for production work.</p>
|
|
138
|
-
|
|
139
|
-
<h2>Try it on your swarm</h2>
|
|
140
|
-
<p>If your swarm runs locally, point every agent at the same project directory:</p>
|
|
141
|
-
|
|
142
|
-
<pre><code>cd /path/to/your-project
|
|
143
|
-
npx thumbgate init</code></pre>
|
|
144
|
-
|
|
145
|
-
<p>If your agents run as separate processes or containers, share the feedback dir via env var:</p>
|
|
146
|
-
|
|
147
|
-
<pre><code>export THUMBGATE_FEEDBACK_DIR=/shared/thumbgate
|
|
148
|
-
# every agent in the swarm reads from and writes to this directory</code></pre>
|
|
149
|
-
|
|
150
|
-
<p>That is the entire integration. The gate layer is now in front of every tool call in the swarm, learning from feedback captured anywhere in the swarm.</p>
|
|
151
|
-
|
|
152
|
-
<div class="cta-box">
|
|
153
|
-
<h2 style="color:var(--text);font-size:1.3rem;margin:0 0 8px;">One gate layer. Every model in your swarm.</h2>
|
|
154
|
-
<p>Works with Claude Code, Cursor, Codex, Gemini, Amp, OpenCode, and any MCP-compatible agent.</p>
|
|
155
|
-
<div class="cta-install">$ npx thumbgate init</div>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
<div class="related">
|
|
159
|
-
<h3>Related articles</h3>
|
|
160
|
-
<a href="/learn/agent-harness-pattern">The Agent Harness Pattern: Why Your AI Needs a Seatbelt →</a>
|
|
161
|
-
<a href="/learn/mcp-pre-action-checks-explained">MCP Pre-Action Checks Explained →</a>
|
|
162
|
-
<a href="/learn/ai-agent-persistent-memory">AI Agent Persistent Memory: How It Works →</a>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
<div class="sticky-cta">
|
|
168
|
-
<span style="color:var(--muted)">Try it now:</span>
|
|
169
|
-
<code>npx thumbgate init</code>
|
|
170
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub →</a>
|
|
171
|
-
</div>
|
|
172
|
-
</body>
|
|
173
|
-
</html>
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Agentic Enterprise Context Brain: Memory Plus Enforcement — ThumbGate</title>
|
|
7
|
-
<script defer data-domain="thumbgate.ai" src="https://plausible.io/js/script.js"></script>
|
|
8
|
-
<meta name="description" content="Enterprise agents need more than a context brain or memory stack. Learn how to connect facts, prior failures, approvals, evidence, and pre-action gates so AI agents stop repeating risky actions before they execute.">
|
|
9
|
-
<meta name="keywords" content="agentic enterprise, enterprise AI agents, AI context brain, Memory OS, AI agent memory, pre-action gates, agent governance, AI agent enforcement">
|
|
10
|
-
<meta property="og:title" content="Agentic Enterprise Context Brain: Memory Plus Enforcement">
|
|
11
|
-
<meta property="og:description" content="A practical architecture for teams moving from agent memory to enforceable agent operations.">
|
|
12
|
-
<meta property="og:type" content="article">
|
|
13
|
-
<meta property="og:url" content="https://thumbgate.ai/learn/agentic-enterprise-context-brain">
|
|
14
|
-
<link rel="canonical" href="https://thumbgate.ai/learn/agentic-enterprise-context-brain">
|
|
15
|
-
<script type="application/ld+json">
|
|
16
|
-
{
|
|
17
|
-
"@context": "https://schema.org",
|
|
18
|
-
"@type": "TechArticle",
|
|
19
|
-
"headline": "Agentic Enterprise Context Brain: Memory Plus Enforcement",
|
|
20
|
-
"description": "Enterprise agents need more than a context brain or memory stack. Learn how to connect facts, prior failures, approvals, evidence, and pre-action gates so AI agents stop repeating risky actions before they execute.",
|
|
21
|
-
"author": { "@type": "Person", "name": "Igor Ganapolsky", "url": "https://github.com/IgorGanapolsky" },
|
|
22
|
-
"publisher": { "@type": "Organization", "name": "ThumbGate", "url": "https://thumbgate.ai" },
|
|
23
|
-
"datePublished": "2026-06-03",
|
|
24
|
-
"dateModified": "2026-06-03",
|
|
25
|
-
"mainEntityOfPage": "https://thumbgate.ai/learn/agentic-enterprise-context-brain",
|
|
26
|
-
"about": [
|
|
27
|
-
{ "@type": "Thing", "name": "agentic enterprise" },
|
|
28
|
-
{ "@type": "Thing", "name": "AI agent memory" },
|
|
29
|
-
{ "@type": "Thing", "name": "pre-action gates" },
|
|
30
|
-
{ "@type": "Thing", "name": "enterprise AI governance" }
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
</script>
|
|
34
|
-
<link rel="stylesheet" href="/learn/learn.css">
|
|
35
|
-
<style>
|
|
36
|
-
.matrix { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; }
|
|
37
|
-
.matrix th, .matrix td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
|
|
38
|
-
.matrix th { color: var(--cyan); font-weight: 600; }
|
|
39
|
-
</style>
|
|
40
|
-
</head>
|
|
41
|
-
<body>
|
|
42
|
-
<nav>
|
|
43
|
-
<a href="/" class="brand"><img src="/assets/brand/thumbgate-mark-inline.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
|
|
44
|
-
<a href="/guide">Setup Guide</a>
|
|
45
|
-
<a href="/learn">Learn</a>
|
|
46
|
-
<a href="/dashboard">Dashboard</a>
|
|
47
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
|
|
48
|
-
</nav>
|
|
49
|
-
|
|
50
|
-
<div class="container">
|
|
51
|
-
<div class="breadcrumb"><a href="/learn">Learn</a> / Agentic Enterprise Context Brain</div>
|
|
52
|
-
<h1>Agentic enterprise context brains need enforcement.</h1>
|
|
53
|
-
<p style="color:var(--muted);">7 min read · For platform teams turning AI agents into controlled enterprise operators</p>
|
|
54
|
-
|
|
55
|
-
<div class="tldr"><strong>TL;DR:</strong> Enterprise agents need shared context, but context alone does not stop a repeated bad action. The high-ROI architecture is a memory layer that promotes trusted failures, policies, approvals, and evidence into pre-action gates before agents touch code, money, data, or customer systems.</div>
|
|
56
|
-
|
|
57
|
-
<h2>The problem is not only fragmented context</h2>
|
|
58
|
-
<p>Enterprise agents fail when they lack context, but they also fail when they have context and still execute the wrong action. The first is a retrieval problem. The second is an enforcement problem.</p>
|
|
59
|
-
<p>Context-brain projects connect documents, tables, tickets, policies, prior runs, and chat history. That is useful. But if the output is only another prompt note, the agent can still miss it or reason around it.</p>
|
|
60
|
-
|
|
61
|
-
<div class="callout">
|
|
62
|
-
<strong>ThumbGate's thesis:</strong> The enterprise context brain should not only inform the agent. It should compile high-confidence lessons into checks that run before the next tool call.
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<h2>Memory OS-style stacks are useful, but incomplete</h2>
|
|
66
|
-
<p>Layered memory systems with structured facts, trust scores, hybrid search, curated wikis, deduplication, and context injection reduce repeated explanation. The operational question is what happens after memory learns that an action caused harm.</p>
|
|
67
|
-
<p>If the answer is "inject another note into the prompt," memory stays advisory. If the answer is "block the matching action before execution," memory becomes governance.</p>
|
|
68
|
-
|
|
69
|
-
<table class="matrix">
|
|
70
|
-
<thead>
|
|
71
|
-
<tr><th>Layer</th><th>Memory-only outcome</th><th>ThumbGate outcome</th></tr>
|
|
72
|
-
</thead>
|
|
73
|
-
<tbody>
|
|
74
|
-
<tr><td>Facts</td><td>The agent recalls policies and prior incidents.</td><td>The same facts are available to gates, dashboards, and proof exports.</td></tr>
|
|
75
|
-
<tr><td>Trust</td><td>The agent sees source quality.</td><td>Low-trust facts cannot justify production changes without evidence.</td></tr>
|
|
76
|
-
<tr><td>Retrieval</td><td>The agent retrieves context before answering.</td><td>Relevant failed actions are checked before shell, file, git, API, deploy, or publish tools run.</td></tr>
|
|
77
|
-
<tr><td>Lessons</td><td>Lessons become readable documentation.</td><td>Repeated lessons promote into prevention rules with audit trails.</td></tr>
|
|
78
|
-
<tr><td>Context injection</td><td>The agent gets better instructions.</td><td>The runtime gets enforceable approvals, blocks, and logs.</td></tr>
|
|
79
|
-
</tbody>
|
|
80
|
-
</table>
|
|
81
|
-
|
|
82
|
-
<h2>The high-ROI implementation path</h2>
|
|
83
|
-
<ol>
|
|
84
|
-
<li><strong>Capture the failure:</strong> thumbs-down, failed test, rejected PR, incident note, or approval denial.</li>
|
|
85
|
-
<li><strong>Normalize the memory:</strong> strip ephemeral IDs, timestamps, temp paths, and session noise before promotion.</li>
|
|
86
|
-
<li><strong>Attach evidence:</strong> test logs, PR URLs, command output, screenshots, ticket IDs, and source hashes.</li>
|
|
87
|
-
<li><strong>Choose routing:</strong> block, pause for approval, warn, or log.</li>
|
|
88
|
-
<li><strong>Evaluate before action:</strong> run the gate before tool execution.</li>
|
|
89
|
-
<li><strong>Measure blocked repeats:</strong> report how often the system stopped the second bad action before execution.</li>
|
|
90
|
-
</ol>
|
|
91
|
-
|
|
92
|
-
<div class="callout callout-green">
|
|
93
|
-
<strong>Sales wedge:</strong> Sell "memory that blocks the repeat," not another RAG project. The proof metric is blocked repeat attempts before execution.
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div class="cta-box">
|
|
97
|
-
<h2 style="color:var(--text);font-size:1.3rem;margin:0 0 8px;">Turn enterprise memory into enforceable operations</h2>
|
|
98
|
-
<p>Start with one workflow, one repeated mistake, and one pre-action gate.</p>
|
|
99
|
-
<div class="cta-install">$ npx thumbgate init</div>
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
<div class="related">
|
|
103
|
-
<h3>Related articles</h3>
|
|
104
|
-
<a href="/learn/deterministic-agent-workflows">Deterministic Agent Workflows Need Runtime Gates →</a>
|
|
105
|
-
<a href="/learn/ai-agent-persistent-memory">AI Agent Persistent Memory: How It Works →</a>
|
|
106
|
-
<a href="/learn/background-agent-control-layer">Background Agents Need a Control Layer →</a>
|
|
107
|
-
<a href="/learn/mcp-pre-action-checks-explained">MCP Pre-Action Checks Explained →</a>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
<div class="sticky-cta">
|
|
112
|
-
<span style="color:var(--muted)">Try it now:</span>
|
|
113
|
-
<code>npx thumbgate init</code>
|
|
114
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub →</a>
|
|
115
|
-
</div>
|
|
116
|
-
</body>
|
|
117
|
-
</html>
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Agentic OS Team Governance: Three Tiers Plus Gates — ThumbGate</title>
|
|
7
|
-
<script defer data-domain="thumbgate.ai" src="https://plausible.io/js/script.js"></script>
|
|
8
|
-
<meta name="description" content="A team-ready Agentic OS needs human-editable knowledge, agent-operating files, git backup, permission mirroring, and memory scoping. ThumbGate adds pre-action gates and audit proof.">
|
|
9
|
-
<meta name="keywords" content="Agentic OS, team AI operating system, Claude Code team setup, AI agent governance, human editable knowledge, RLS memory, pre-action gates, ThumbGate enterprise">
|
|
10
|
-
<meta property="og:title" content="Agentic OS Team Governance: Three Tiers Plus Gates">
|
|
11
|
-
<meta property="og:description" content="Separate human-editable knowledge, agent operating files, and git backup, then enforce permissions and memory scope before agents act.">
|
|
12
|
-
<meta property="og:type" content="article">
|
|
13
|
-
<meta property="og:url" content="https://thumbgate.ai/learn/agentic-os-team-governance">
|
|
14
|
-
<link rel="canonical" href="https://thumbgate.ai/learn/agentic-os-team-governance">
|
|
15
|
-
|
|
16
|
-
<script type="application/ld+json">
|
|
17
|
-
{
|
|
18
|
-
"@context": "https://schema.org",
|
|
19
|
-
"@type": "TechArticle",
|
|
20
|
-
"headline": "Agentic OS Team Governance: Three Tiers Plus Gates",
|
|
21
|
-
"description": "A team-ready Agentic OS needs human-editable knowledge, agent-operating files, git backup, permission mirroring, and memory scoping. ThumbGate adds pre-action gates and audit proof.",
|
|
22
|
-
"author": { "@type": "Person", "name": "Igor Ganapolsky", "url": "https://github.com/IgorGanapolsky" },
|
|
23
|
-
"publisher": { "@type": "Organization", "name": "ThumbGate", "url": "https://thumbgate.ai" },
|
|
24
|
-
"datePublished": "2026-06-03",
|
|
25
|
-
"dateModified": "2026-06-03",
|
|
26
|
-
"mainEntityOfPage": "https://thumbgate.ai/learn/agentic-os-team-governance",
|
|
27
|
-
"about": [
|
|
28
|
-
{ "@type": "Thing", "name": "Agentic OS" },
|
|
29
|
-
{ "@type": "Thing", "name": "team AI governance" },
|
|
30
|
-
{ "@type": "Thing", "name": "permission-scoped memory" },
|
|
31
|
-
{ "@type": "Thing", "name": "pre-action gates" }
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<link rel="stylesheet" href="/learn/learn.css">
|
|
37
|
-
<style>
|
|
38
|
-
.matrix { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; }
|
|
39
|
-
.matrix th, .matrix td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
|
|
40
|
-
.matrix th { color: var(--cyan); font-weight: 600; }
|
|
41
|
-
</style>
|
|
42
|
-
</head>
|
|
43
|
-
<body>
|
|
44
|
-
|
|
45
|
-
<nav>
|
|
46
|
-
<a href="/" class="brand"><img src="/assets/brand/thumbgate-mark-inline.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
|
|
47
|
-
<a href="/guide">Setup Guide</a>
|
|
48
|
-
<a href="/learn">Learn</a>
|
|
49
|
-
<a href="/dashboard">Dashboard</a>
|
|
50
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
|
|
51
|
-
</nav>
|
|
52
|
-
|
|
53
|
-
<div class="container">
|
|
54
|
-
<div class="breadcrumb"><a href="/learn">Learn</a> / Agentic OS Team Governance</div>
|
|
55
|
-
<h1>A team Agentic OS needs three tiers plus runtime gates.</h1>
|
|
56
|
-
<p style="color:var(--muted);">7 min read · For founders and platform teams turning agent workflows into shared operating systems</p>
|
|
57
|
-
|
|
58
|
-
<div class="tldr"><strong>TL;DR:</strong> A team-ready Agentic OS should separate human-editable source-of-truth files, agent-updated operating files, and git backup. That solves portability and collaboration. ThumbGate adds the missing enforcement: permission-mirrored gates, local overrides, scoped memory, and audit proof before agents execute.</div>
|
|
59
|
-
|
|
60
|
-
<h2>The three-tier architecture</h2>
|
|
61
|
-
<table class="matrix">
|
|
62
|
-
<thead>
|
|
63
|
-
<tr><th>Tier</th><th>What lives there</th><th>Governance requirement</th></tr>
|
|
64
|
-
</thead>
|
|
65
|
-
<tbody>
|
|
66
|
-
<tr><td>Human source of truth</td><td>Company rules, brand context, operating principles, client context, review standards.</td><td>Non-technical users can edit it, but changes must sync to a versioned backup.</td></tr>
|
|
67
|
-
<tr><td>Agent operating layer</td><td>Skills, prompts, MCP settings, workflow contracts, hooks, and executable agent instructions.</td><td>Agents can update it, but risky edits need pre-action checks and evidence.</td></tr>
|
|
68
|
-
<tr><td>Version control</td><td>Markdown exports, config files, skills, generated context packs, policy templates, and auditable changes.</td><td>Git becomes the backup and review trail; humans do not all need to touch it directly.</td></tr>
|
|
69
|
-
</tbody>
|
|
70
|
-
</table>
|
|
71
|
-
|
|
72
|
-
<div class="callout">
|
|
73
|
-
<strong>ThumbGate's role:</strong> Keep the Agentic OS portable in markdown and folders, then enforce who can use which memory, tools, paths, and client data before any tool call executes.
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<h2>Where teams get hurt</h2>
|
|
77
|
-
<ul>
|
|
78
|
-
<li>Shared drive permissions and GitHub permissions drift apart, leaking client or internal context.</li>
|
|
79
|
-
<li>Agent-updated skills become invisible infrastructure that nobody reviews.</li>
|
|
80
|
-
<li>Local personal preferences accidentally commit into team instructions.</li>
|
|
81
|
-
<li>Central memory retrieval returns lessons from the wrong client or user scope.</li>
|
|
82
|
-
<li>The team has docs, but no runtime gate that stops an agent from breaking the policy anyway.</li>
|
|
83
|
-
</ul>
|
|
84
|
-
|
|
85
|
-
<h2>The ThumbGate implementation pattern</h2>
|
|
86
|
-
<ol>
|
|
87
|
-
<li><strong>Mirror permissions:</strong> store expected source-of-truth users, repo users, and client scopes in a machine-readable policy file.</li>
|
|
88
|
-
<li><strong>Protect local overrides:</strong> allow <code>*.local.md</code> for personal preferences and ensure those files are ignored, never synced or exported.</li>
|
|
89
|
-
<li><strong>Scope memory:</strong> local-only memory for individuals; shared Postgres or hosted team memory only when row-level scope is explicit.</li>
|
|
90
|
-
<li><strong>Gate agent-operating files:</strong> edits to skills, MCP config, hooks, workflow contracts, and source-of-truth exports require evidence or approval.</li>
|
|
91
|
-
<li><strong>Version the OS:</strong> markdown exports, skills, and policies should be git-reviewable even when non-technical teammates edit the upstream source.</li>
|
|
92
|
-
</ol>
|
|
93
|
-
|
|
94
|
-
<h2>Team policy contract</h2>
|
|
95
|
-
<div class="callout">
|
|
96
|
-
<pre><code>{
|
|
97
|
-
"client_scope": "acme",
|
|
98
|
-
"source_of_truth": ["Google Drive", "Notion"],
|
|
99
|
-
"version_backup": "github.com/company/acme-agentic-os",
|
|
100
|
-
"local_overrides": ["CLAUDE.local.md", "AGENTS.local.md"],
|
|
101
|
-
"protected_paths": [".agents/skills/**", ".mcp.json", "AGENTS.md"],
|
|
102
|
-
"memory_scope": {
|
|
103
|
-
"mode": "shared",
|
|
104
|
-
"requires_rls": true,
|
|
105
|
-
"filter_keys": ["client_id", "user_id", "workspace_id"]
|
|
106
|
-
},
|
|
107
|
-
"required_evidence": ["permission_diff", "git_diff", "sync_log"]
|
|
108
|
-
}</code></pre>
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
<p>That contract can feed ThumbGate's task scope and workflow gates. If an agent tries to edit a protected operating file, access the wrong client memory, or publish a sync without evidence, the gate blocks or pauses the action before execution.</p>
|
|
112
|
-
|
|
113
|
-
<h2>High-ROI product work</h2>
|
|
114
|
-
<ul>
|
|
115
|
-
<li><strong>Agentic OS audit command:</strong> inspect markdown tiers, local override ignores, protected agent files, and sync evidence.</li>
|
|
116
|
-
<li><strong>Permission mirror report:</strong> compare declared drive/editor access to repo and hosted-memory access.</li>
|
|
117
|
-
<li><strong>Memory-scope gate:</strong> warn on local-only teams trying to share memory; block shared stores without client/user scope.</li>
|
|
118
|
-
<li><strong>Operating-file gate template:</strong> protect skills, MCP config, hooks, workflow contracts, and source-of-truth exports by default.</li>
|
|
119
|
-
</ul>
|
|
120
|
-
|
|
121
|
-
<div class="callout callout-green">
|
|
122
|
-
<strong>Enterprise wedge:</strong> "Bring your Notion, Drive, GitHub, and agents. ThumbGate verifies the boundaries before the Agentic OS acts."
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
<div class="cta-box">
|
|
126
|
-
<h2 style="color:var(--text);font-size:1.3rem;margin:0 0 8px;">Audit one team Agentic OS</h2>
|
|
127
|
-
<p>Start with one client scope, one source-of-truth folder, and one repo-backed agent operating layer.</p>
|
|
128
|
-
<div class="cta-install">$ npx thumbgate agentic-os-audit --check</div>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<div class="related">
|
|
132
|
-
<h3>Related articles</h3>
|
|
133
|
-
<a href="/learn/codex-role-plugins-need-governance">Codex Role Plugins Need Pre-Action Governance →</a>
|
|
134
|
-
<a href="/learn/agentic-enterprise-context-brain">Agentic Enterprise Context Brain →</a>
|
|
135
|
-
<a href="/learn/deterministic-agent-workflows">Deterministic Agent Workflows Need Runtime Gates →</a>
|
|
136
|
-
<a href="/learn/mcp-pre-action-checks-explained">MCP Pre-Action Checks Explained →</a>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
|
|
140
|
-
<div class="sticky-cta">
|
|
141
|
-
<span style="color:var(--muted)">Try it now:</span>
|
|
142
|
-
<code>npx thumbgate init --team</code>
|
|
143
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub →</a>
|
|
144
|
-
</div>
|
|
145
|
-
</body>
|
|
146
|
-
</html>
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>AI Agent Governance — The Four Layers and Where ThumbGate Fits</title>
|
|
7
|
-
<script defer data-domain="thumbgate.ai" src="https://plausible.io/js/script.js"></script>
|
|
8
|
-
<meta name="description" content="AI agent governance has four layers: prompt rules, decorator wrappers, pre-action hooks, sandbox isolation. Pick the layer that matches your stack — and understand why prompt rules alone fail.">
|
|
9
|
-
<meta name="keywords" content="AI agent governance, runtime governance, pre-action hooks, agent policy enforcement, agent decorator, ThumbGate, agent sandbox, Claude Code governance">
|
|
10
|
-
<meta property="og:title" content="AI Agent Governance — The Four Layers Pattern">
|
|
11
|
-
<meta property="og:description" content="Four governance layers exist for AI agents. Each catches a different failure mode. Picking the right one is the whole game.">
|
|
12
|
-
<meta property="og:type" content="article">
|
|
13
|
-
<meta property="og:url" content="https://thumbgate.ai/learn/ai-agent-governance">
|
|
14
|
-
<link rel="canonical" href="https://thumbgate.ai/learn/ai-agent-governance">
|
|
15
|
-
|
|
16
|
-
<script type="application/ld+json">
|
|
17
|
-
{
|
|
18
|
-
"@context": "https://schema.org",
|
|
19
|
-
"@type": "TechArticle",
|
|
20
|
-
"headline": "AI Agent Governance — The Four Layers and Where ThumbGate Fits",
|
|
21
|
-
"description": "AI agent governance breaks into four layers: prompt rules, decorator wrappers, pre-action hooks, and sandbox isolation. Each catches a different failure mode; picking the right one for your stack is the whole game.",
|
|
22
|
-
"author": {
|
|
23
|
-
"@type": "Person",
|
|
24
|
-
"name": "Igor Ganapolsky",
|
|
25
|
-
"url": "https://github.com/IgorGanapolsky"
|
|
26
|
-
},
|
|
27
|
-
"publisher": {
|
|
28
|
-
"@type": "Organization",
|
|
29
|
-
"name": "ThumbGate",
|
|
30
|
-
"url": "https://thumbgate.ai"
|
|
31
|
-
},
|
|
32
|
-
"datePublished": "2026-05-15",
|
|
33
|
-
"dateModified": "2026-05-15",
|
|
34
|
-
"mainEntityOfPage": "https://thumbgate.ai/learn/ai-agent-governance"
|
|
35
|
-
}
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<link rel="stylesheet" href="/learn/learn.css">
|
|
39
|
-
<style>
|
|
40
|
-
.layers { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 1.5rem 0; }
|
|
41
|
-
.layer { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; }
|
|
42
|
-
.layer h3 { margin-top: 0; }
|
|
43
|
-
.layer .where { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
|
|
44
|
-
.layer .catches { color: var(--green); font-weight: 600; font-size: 0.9rem; }
|
|
45
|
-
.layer .misses { color: var(--red); font-weight: 600; font-size: 0.9rem; }
|
|
46
|
-
</style>
|
|
47
|
-
</head>
|
|
48
|
-
<body>
|
|
49
|
-
|
|
50
|
-
<nav>
|
|
51
|
-
<a href="/" class="brand"><img src="/assets/brand/thumbgate-mark-inline.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
|
|
52
|
-
<a href="/guide">Setup Guide</a>
|
|
53
|
-
<a href="/learn">Learn</a>
|
|
54
|
-
<a href="/pricing">Pricing</a>
|
|
55
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
|
|
56
|
-
</nav>
|
|
57
|
-
|
|
58
|
-
<div class="container">
|
|
59
|
-
<div class="breadcrumb"><a href="/learn">Learn</a> / AI Agent Governance</div>
|
|
60
|
-
<h1>AI Agent Governance</h1>
|
|
61
|
-
<p style="color:var(--muted);">6 min read · For teams choosing where to enforce agent behavior</p>
|
|
62
|
-
|
|
63
|
-
<div class="tldr"><strong>TL;DR:</strong> AI agent governance has four layers — prompt rules, decorator wrappers, pre-action hooks, and sandbox isolation. Each catches a different class of failure. Prompt rules alone fail because they live inside the agent's context and get evicted under pressure. The layer you actually need depends on whether your stakes are per-call (decorator), per-tool (hook), or per-process (sandbox).</div>
|
|
64
|
-
|
|
65
|
-
<h2>What "governance" actually means here</h2>
|
|
66
|
-
<p>The dominant failure mode of agent frameworks isn't that the agent picked the wrong next step in isolation — it's that the agent took an action you can't undo. Dropped a production table. Force-pushed over a colleague's commit. Wrote credentials to a public log file. Installed a package the team had already rejected.</p>
|
|
67
|
-
<p>Governance is the layer of code that decides whether an action is allowed <em>before</em> the action runs. The post-hoc audit log is forensics; governance is prevention.</p>
|
|
68
|
-
|
|
69
|
-
<h2>The four layers</h2>
|
|
70
|
-
|
|
71
|
-
<div class="layers">
|
|
72
|
-
<div class="layer">
|
|
73
|
-
<h3>1. Prompt-level rules</h3>
|
|
74
|
-
<div class="where">Lives in <code>CLAUDE.md</code>, <code>.cursorrules</code>, system prompt, AGENTS.md.</div>
|
|
75
|
-
<p>Tell the agent what not to do. Cheap, fast, expressive.</p>
|
|
76
|
-
<p class="catches">Catches: stylistic and intent-level mistakes the agent can recognize.</p>
|
|
77
|
-
<p class="misses">Misses: anything the agent forgets when context pressure compresses the early instructions out. Misses every action the agent doesn't categorize as "rule-relevant" at decision time.</p>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<div class="layer">
|
|
81
|
-
<h3>2. Decorator wrappers</h3>
|
|
82
|
-
<div class="where">In-process wrapper around the agent's tool functions. Examples: Rein (Python), function decorators in LangChain-style frameworks.</div>
|
|
83
|
-
<p>Wrap the function. The wrapper checks a policy before forwarding the call to the underlying tool.</p>
|
|
84
|
-
<p class="catches">Catches: actions through the wrapped function path. Per-call policy enforcement. Audit-trail capture.</p>
|
|
85
|
-
<p class="misses">Misses: actions that bypass the wrapped function — direct subprocess calls, raw HTTP requests, plugins that skip the framework's tool registry.</p>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<div class="layer">
|
|
89
|
-
<h3>3. Pre-action hooks</h3>
|
|
90
|
-
<div class="where">Out-of-process intercept at the agent runtime's tool-call boundary. Examples: MCP PreToolUse hooks, Claude Code hooks, ThumbGate.</div>
|
|
91
|
-
<p>The hook runs in a separate process from the agent. The agent emits a tool-call intent; the hook accepts, rejects, or transforms it before the tool itself sees it.</p>
|
|
92
|
-
<p class="catches">Catches: every tool call the agent runtime mediates. Works across agent CLIs (Claude Code, Cursor, Codex, Gemini, Amp, Cline, OpenCode). Survives context-eviction because the hook is not in the agent's context.</p>
|
|
93
|
-
<p class="misses">Misses: actions taken by tools the runtime doesn't know about (e.g., a sub-process opening its own network socket after the initial allowed call).</p>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div class="layer">
|
|
97
|
-
<h3>4. Sandbox isolation</h3>
|
|
98
|
-
<div class="where">OS- or VM-level isolation. Examples: Docker / microVMs / seccomp / AppArmor / macOS sandbox profiles.</div>
|
|
99
|
-
<p>The agent runs inside a sandboxed environment that physically cannot reach production data, the host filesystem outside the project, or arbitrary network endpoints.</p>
|
|
100
|
-
<p class="catches">Catches: every action the agent might try, including ones the agent runtime doesn't even know about. Last-line defense.</p>
|
|
101
|
-
<p class="misses">Misses: nothing at the boundary, but operationally heavy. Requires sandbox-friendly tools, controlled mounts, and a usability cost — the agent can't reach things it legitimately needs without explicit grants.</p>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<h2>Why prompt rules alone fail</h2>
|
|
106
|
-
<p>Prompt rules live inside the agent's context. Context is finite. As the conversation grows, the early-system instructions are the first thing to lose attention weight when the model decides what to compress. By the time the agent is on hour two of a session, the <code>CLAUDE.md</code> rule that said "never force-push to main" may not even be in the active reasoning frame.</p>
|
|
107
|
-
<p>Decorator wrappers, pre-action hooks, and sandbox isolation all live <em>outside</em> the agent's context. They cannot be reasoned around by a model under context pressure — they're not part of the model's input at all.</p>
|
|
108
|
-
|
|
109
|
-
<div class="callout callout-green">
|
|
110
|
-
<strong>Mental model:</strong> Prompt rules are speed limit signs. Decorators are speed bumps. Pre-action hooks are physical barriers at the intersection. Sandbox isolation is a chain-link fence around the whole street.
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<h2>Where ThumbGate fits</h2>
|
|
114
|
-
<p>ThumbGate runs at layer 3 — pre-action hooks. The hook process intercepts tool calls from Claude Code, Cursor, Codex, Gemini, Amp, Cline, and OpenCode before they fire. Three things make this layer worth the engineering minutes:</p>
|
|
115
|
-
<ul>
|
|
116
|
-
<li><strong>Context-eviction immunity.</strong> The hook runs in a different process. The agent can compress, forget, or hallucinate away the rule, and the rule still fires.</li>
|
|
117
|
-
<li><strong>Cross-agent portability.</strong> One installation, every agent runtime the team uses. The rule "no force-push to main" applies whether today's session is Claude Code or Cursor.</li>
|
|
118
|
-
<li><strong>Learning loop.</strong> When you give the agent a thumbs-down on a session-time mistake, the feedback becomes a structured prevention rule that auto-fires the next time the same pattern shows up. No policy-authoring step — the operator's correction <em>is</em> the policy.</li>
|
|
119
|
-
</ul>
|
|
120
|
-
|
|
121
|
-
<h2>Picking the layer that matches your stack</h2>
|
|
122
|
-
|
|
123
|
-
<ul>
|
|
124
|
-
<li><strong>If you're writing prompt rules and they "work most of the time":</strong> add a hook layer. Most of the failures you've already absorbed are this category.</li>
|
|
125
|
-
<li><strong>If you're a Python production app in a regulated domain:</strong> a decorator-level governance layer (e.g. Rein) is the right tradeoff. Per-call stakes are high enough to justify the integration cost.</li>
|
|
126
|
-
<li><strong>If you're running AI coding agents (Claude Code, Cursor, Codex, Gemini, Amp, Cline, OpenCode):</strong> hook-level governance is the right layer. Your tool-call volume is high; per-call stakes are mixed; learning from feedback dominates.</li>
|
|
127
|
-
<li><strong>If you're running agents on untrusted code or data:</strong> stack a sandbox layer on top. Hook + sandbox is the strongest combination.</li>
|
|
128
|
-
</ul>
|
|
129
|
-
|
|
130
|
-
<p>These layers are not mutually exclusive. A real production setup typically combines them: prompt rules at the top for intent, a hook layer for tool-call enforcement, a sandbox at the bottom for blast radius.</p>
|
|
131
|
-
|
|
132
|
-
<h2>The honest constraint</h2>
|
|
133
|
-
|
|
134
|
-
<p>No governance layer is correct if the rules you encode in it are wrong. Layers 2, 3, and 4 enforce policy; they don't generate it. The hard part of governance has never been the enforcement boundary — it's <em>knowing what the agent will get wrong before the agent gets it wrong</em>. That's why ThumbGate emphasizes the feedback loop: most teams can't write the rule until they've watched the agent fail in their codebase. The thumbs-down is the rule's origin.</p>
|
|
135
|
-
|
|
136
|
-
<div class="cta-box">
|
|
137
|
-
<h2 style="color:var(--text);font-size:1.3rem;margin:0 0 8px;">Pick the layer. Install it once. Move on.</h2>
|
|
138
|
-
<p>For AI coding agents, the hook layer is where the leverage is. ThumbGate ships as <code>npx thumbgate init</code> and is MIT-licensed at the core.</p>
|
|
139
|
-
<div class="cta-install">$ npx thumbgate init</div>
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<div class="related">
|
|
143
|
-
<h3>Related guides</h3>
|
|
144
|
-
<a href="/compare/rein">ThumbGate vs Rein — different layer, different stack →</a>
|
|
145
|
-
<a href="/learn/spec-driven-development">Spec-Driven Development for AI Agents →</a>
|
|
146
|
-
<a href="/learn/vibe-coding-safety-net">The Vibe Coding Safety Net You Are Missing →</a>
|
|
147
|
-
<a href="/learn/mcp-pre-action-checks-explained">MCP Pre-Action Checks Explained →</a>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<div class="sticky-cta">
|
|
153
|
-
<span style="color:var(--muted)">Try it now:</span>
|
|
154
|
-
<code>npx thumbgate init</code>
|
|
155
|
-
<a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub →</a>
|
|
156
|
-
</div>
|
|
157
|
-
</body>
|
|
158
|
-
</html>
|