Federated Context Governance 标志

Federated Context Governance

社区
AnthonyAlcaraz
federated-context-governance

Govern agent-configuration drift once tool orchestration scales from one developer to a team. Detects where independently-authored context configs (CLAUDE.md-style settings + installed skills) diverge, classifies the fragmentation stage, enforces a FEDERATED org base whose nonnegotiable settings (security, architectural, compliance) every team must inherit unchanged while owning their negotiable extensions, and routes a governance need to the right architectural layer (Config-as-Code / Shared Knowledge Layer / Governance Control Plane). Use when multiple developers or teams configure agents independently and their outputs are diverging. NOT for a single developer's setup (there is no drift), NOT a code linter (it governs agent CONTEXT, not source code), NOT a secrets manager (it flags a policy key, it does not store secrets).

Add to TypingMind

概览

发布者AnthonyAlcaraz
代码仓库agentic-graph-rag-skills
技能名称federated-context-governance
星标数
29
复刻数
9
附带文件
3
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 3 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 AnthonyAlcaraz 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Federated Context Governance AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/tool-orchestration/federated-context-governance
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/tool-orchestration/federated-context-governance .claude/skills/federated-context-governance
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Federated Context Governance,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Federated Context Governance。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Federated Context Governance 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Federated Context Governance

Overview

The tool-orchestration stack (discovery, selection, gateway, execution) assumes a single coherent context. That assumption breaks when orchestration scales from one developer to a team. When one developer configures an AI coding agent — a CLAUDE.md, installed skills, hooks — the result is coherent and personalized. When five developers do the same thing independently, the result is five divergent architectures: each agent receives different instructions, applies different patterns, and produces code shaped by different assumptions.

Marc Baselga documented this after deploying Claude Code across an engineering team; Ben Erez called it the "unexpected tax." Two developers asking their agents to "follow our coding standards" receive different standards if their contexts diverge. The fragmentation follows a predictable progression:

individual optimization -> silent divergence -> visible inconsistency
-> coordination overhead

The chapter's three solution architectures are not competing options but LAYERS of one federated architecture (Table 6-4), mapped to organizational scale:

ScaleLayerToolMechanism
TeamConfiguration as CodeAPM (Meppiel)versioned, composable skill/rule/prompt packages; apm install gives everyone the same base
DepartmentShared Knowledge LayerNia Skills (Rakhmetzhanov)a central indexed knowledge base any agent queries
EnterpriseGovernance Control PlaneRuntime (Jarjoura)business rules, constraints, ownership, decisions as infrastructure

The architecture is FEDERATED, not centralized: teams own domain-specific context but inherit an organizational base encoding nonnegotiable standards (security policies, architectural constraints, code-review requirements, compliance rules). Jarjoura's diagnosis is the decisive one: "Context failure, not AI failure." Agents amplify whatever structure they receive; incomplete or inconsistent structure produces amplified ambiguity at the speed of token generation.

When to Use

  • Multiple developers or teams configure agents independently
  • Code reviews reveal conflicting patterns produced by different agents
  • Onboarding is hard because no single config represents team practice
  • You need to enforce nonnegotiable standards (security/compliance) across teams while letting teams keep their domain-specific extensions

Phrases that invoke this skill: "config drift", "our agents diverge", "context governance", "federated config", "enforce the org base", "which governance layer".

When NOT to Use

  • A single developer's setup — one config is coherent by definition; there is no drift to detect.
  • As a code linter — it governs agent CONTEXT (settings, skills, rules), not source code. Lint code with a code linter.
  • As a secrets manager — secrets_in_env_only is a policy KEY it enforces; it does not store or rotate secrets.
  • Where teams legitimately need different nonnegotiables — then the setting is not actually nonnegotiable; move it to the negotiable set rather than forcing false uniformity.

Process

StepInputActionOutputVerification
1Governance JSON (org_base + team_configs)lib.load_governance(path)Governance dictHas org_base (with nonnegotiable) and team_configs
2Team configslib.detect_drift(configs)Settings that disagree + partial skillsA key with differing values across ≥2 teams is reported
3Team configslib.fragmentation_stage(configs)Stage on the four-stage progressionMore drift → later stage (coordination overhead)
4Org base + team configslib.check_federation(org_base, teams)Per-team compliance + violationsA team overriding a nonnegotiable key is flagged non-compliant
5Org base + one teamlib.resolve_effective_config(org_base, team)Effective config with nonnegotiable keys locked to baseA team's override of a locked key is ignored; base value wins
6Scale (team/department/enterprise)lib.recommend_layer(scale)The matching layer + tool + compositionLarger scales inherit the smaller layers beneath

Rationalizations

Agent rationalizationDocumented rebuttal
"Each developer's config working for them is fine."It is fine individually and incoherent at the team level. Two agents given "follow our standards" produce different standards — the exact drift the chapter names. Individual coherence is not team coherence.
"Centralize all config in one file everyone shares."The architecture is FEDERATED, not centralized. Teams own domain-specific context; forcing one file loses the backend/frontend/data specialization that made per-team config valuable. Inherit the base, extend locally.
"A team can override any setting it needs to."Not the nonnegotiable ones. Security, architectural, and compliance keys are locked to the org base; a team disabling code review is a violation, not a preference. resolve_effective_config locks them by construction.
"Config drift is a people problem, not infrastructure."Jarjoura: "Context failure, not AI failure." Agent config is shared infrastructure requiring versioning, testing, deployment, and monitoring — the same engineering discipline as any other shared infra.
"Pick one governance tool and use it everywhere."The three layers map to scale and COMPOSE: Config-as-Code (team) inside Shared Knowledge (department) inside a Governance Control Plane (enterprise). One tool cannot span all three scales.

Red Flags

  • Zero drift reported across many independently-authored configs. Either the configs are already governed (good) or the drift detector is not comparing the right setting keys.
  • A nonnegotiable violation reported as compliant. The federation check is bypassed — a locked key must fail closed.
  • resolve_effective_config lets a team override a locked key. The lock is inert; nonnegotiable keys must always resolve to the base value.
  • Fragmentation stuck at "individual optimization" despite obvious divergence. The stage thresholds are miscalibrated for the number of configs.
  • CLI --help exits non-zero. SKILL.md / CLI mismatch; multi-harness invariant broken.

Non-Negotiable Verification

  1. Run the benchmark battery.

    python cli.py benchmark

    Confirm drift is detected across teams, the fragmentation stage reflects it, and the seeded rogue-frontend nonnegotiable violation (disabling code_review_required) is caught.

  2. Prove the lock holds in the effective config.

    python cli.py effective rogue-frontend

    code_review_required MUST resolve to True (the base value) even though the team set it False.

  3. Prove federation fails closed on the nonnegotiable.

    python cli.py federate --json | python -c "import json,sys; d=json.load(sys.stdin); assert not d['all_compliant']"
  4. Prove layer composition.

    python cli.py layer enterprise

    Enterprise scale must inherit [team, department, enterprise].

Security Posture

  • Prompt injection. Context configs are the agent's instructions; a compromised config is a direct injection vector. The nonnegotiable base is the defense — security-relevant keys (secrets_in_env_only, code_review_required) are locked and a team cannot silently disable them.
  • Data exfiltration. No network calls in lib.py; governance is read from an explicit path. In production the org base is itself a versioned, reviewed artifact (the chapter's "agent config is shared infrastructure" point).
  • Privilege escalation. resolve_effective_config locking nonnegotiable keys to the base is exactly the anti-escalation control — a team cannot grant itself a laxer security posture than the org mandates.

Composition

  • Wraps the whole tool-orchestration stack: rag-mcp-tool-selection, mcp-gateway-two-meta-tools, hierarchical-orchestration-router all assume a coherent context — this skill is the layer that keeps it coherent at team scale.
  • Pairs with hierarchical-orchestration-router — hierarchical routing needs a coherent per-domain context to route into; this governs that context.
  • The nonnegotiable base is the natural home for the security policies from information-flow-control-gate and the quality thresholds from skill-quality-evaluator.
  • Mirrors an org-baseline-plus-local-extensions config-sync discipline: an org base every machine inherits, with local extensions composed on top.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly), Chapter 6 — Tool Orchestration, section "Context Governance: The Missing Layer in Tool Orchestration". Named references:

  • Marc Baselga — documented config drift after team Claude Code deployment; Ben Erez — the "unexpected tax"
  • Daniel Meppiel — APM (Agent Package Manager), Configuration as Code (team scale)
  • Arlan Rakhmetzhanov — Nia Skills, Shared Knowledge Layer (department scale)
  • Daniel Jarjoura — Runtime, Governance Control Plane (enterprise scale); "Context failure, not AI failure"

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Federated Context Governance AI 技能有什么作用?

Govern agent-configuration drift once tool orchestration scales from one developer to a team. Detects where independently-authored context configs (CLAUDE.md-style settings + installed skills) diverge, classifies the fragmentation stage, enforces a FEDERATED org base whose nonnegotiable settings (security, architectural, compliance) every team must inherit unchanged while owning their negotiable extensions, and routes a governance need to the right architectural layer (Config-as-Code / Shared Knowledge Layer / Governance Control Plane). Use when multiple developers or teams configure agents...

为什么在 TypingMind 中使用 Federated Context Governance?

因为您只需安装一次,就能搭配任何模型使用。Federated Context Governance 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Federated Context Governance?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/tool-orchestration/federated-context-governance。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Federated Context Governance?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Federated Context Governance 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Federated Context Governance 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Federated Context Governance AI 技能免费吗?

是的。AnthonyAlcaraz 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇