ai-governance-oss
AGENTS.md2 starsChanged 4 months agoApache-2.0View on GitHub
This file governs the AI Governance Control Plane OSS repository. Child AGENTS.md files refine these rules for their own directories. AI Governance Control Plane OSS is an independently usable governance control plane for AI workflows and governed assets. Preserve explicit ownership of governance state, evidence, policy, audit, replay and persistence contracts. - src/ai_governance/api, src/ai_governance/mcp, and src/ai_governance/cli are transport adapters. src/ai_governance/services coordinates use cases; domain contracts and repository interfaces remain below that layer. - Repository backend selection is a control-plane concern…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,117 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- console/AGENTS.mdAGENTS.md
- keycloak-postgres/AGENTS.mdAGENTS.md
- api-changeSkill
- domain-featureSkill
- governance-policySkill
- keycloak-service-identitySkill
- model-runtime-capability-profileSkill
- tenant-isolationSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
14 rules. About 1 is common, 10 are distinctive, and 3 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
When an external wire identifier needs a compact prefix, use ai_governance_.
- Distinctive: line 41
Do not add an Enterprise business concept to Core when it can be carried by an existing plugin, SPI, handler, event, or provider extension …
- Distinctive: line 44
Before editing Core for an Enterprise feature:
- Distinctive: line 48
Prefer an Enterprise-owned, namespaced, versioned operation or payload over a feature-specific Core enum, route, setting, persistence …
- Very specific: line 50
Treat a proposed Core symbol containing an Enterprise feature name (for example SLO, Impact, or Contract) as a boundary violation unless …
- Distinctive: line 55
Before making any Core edit, state the proposed generic contract, explain why the existing extension points are insufficient, and obtain …
- Common: line 91
Do not log credentials, raw tokens, protected prompt content, or tenant-sensitive data.
- Distinctive: line 98
Follow established contracts exactly for authentication and authorization, tenant context, repository selection, public compatibility, …
- Distinctive: line 105
Follow the nearest established pattern for services, adapters, repository implementations, workers, provider integrations, and Studio pages.
- Distinctive: line 110
Use judgement for behavior-preserving internal refactors, documentation organisation, test helpers, and developer tooling that do not alter …
- Very specific: line 116
Treat pyproject.toml/uv.lock as the source of truth for Python packages and Compose files as the source of truth for local service-image …
- Distinctive: line 118
Use GitHub Issues or Projects for active dependency and migration backlog items.
- Distinctive: line 124
Do not upgrade a Docker service image merely to match a client-library version.
- Distinctive: line 131
Use skills for repeatable task workflows.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scope
This file governs the AI Governance Control Plane OSS repository. Child AGENTS.md files refine
these rules for their own directories.
Purpose
AI Governance Control Plane OSS is an independently usable governance control plane for AI workflows and governed assets. Preserve explicit ownership of governance state, evidence, policy, audit, replay and persistence contracts.
Architectural Facts
src/ai_governance/api,src/ai_governance/mcp, andsrc/ai_governance/cliare transport adapters.src/ai_governance/servicescoordinates use cases; domain contracts and repository interfaces remain below that layer.- Repository backend selection is a control-plane concern owned by the
factories in
src/ai_governance/repositories/factories/; API dependency providers compose factories with settings. Do not choose a concrete backend in a service or adapter. - Extensions use the public
AIGovernancePluginand SPI (Service Provider Interfaces) contracts. OSS discovers entry points in theai_governance.pluginsgroup and does not import or detect a separately installed Enterprise distribution. Seedocs/architecture/EXTENSIBILITY.md. - The current tree still contains Enterprise-named settings. Optional
Enterprise MCP tools are discovered through the
ai_governance.mcp.pluginsentry point rather than OSS environment switches. Do not add dependencies on an Enterprise distribution from OSS.
Naming
- Core modules, service names, schema fields, and internal identifiers use the
ai_governanceprefix. Do not introducebhanujas a code, service, or schema prefix. - When an external wire identifier needs a compact prefix, use
ai_governance_.
Core / Enterprise Extension Boundary
AI Governance Control Plane Core owns stable, generic contracts. Enterprise owns its business concepts, semantics, validation, persistence, metrics, routes and handlers. Do not add an Enterprise business concept to Core when it can be carried by an existing plugin, SPI, handler, event, or provider extension point.
Before editing Core for an Enterprise feature:
- Inspect the existing extension points and use the narrowest one that can carry the feature.
- Prefer an Enterprise-owned, namespaced, versioned operation or payload over a feature-specific Core enum, route, setting, persistence table, or import.
- Treat a proposed Core symbol containing an Enterprise feature name (for
example
SLO,Impact, orContract) as a boundary violation unless its generic ownership is explicitly demonstrated. - Introduce a Core change only when it is generic, has no Enterprise dependency, and has at least two plausible independent consumers.
- Before making any Core edit, state the proposed generic contract, explain why the existing extension points are insufficient, and obtain explicit approval.
Core extension contracts must remain open for plugin implementation but closed to plugin-specific semantic changes.
Architectural Invariants
REST / MCP / CLI adapters
↓
application services and analyzers
↓
domain and repository contracts
↓
storage or provider implementations- Adapters do not own domain decisions or persistence selection. Services do not contain storage-engine SQL. Storage implementations do not create alternative domain semantics.
- Public REST, MCP, CLI, SPI, event, and persisted-artifact contracts evolve compatibly unless a deliberate versioned change is made.
- Governance decisions must be deterministic, explainable, and auditable. Replay source evidence and finalized decision records are historical evidence, not mutable working state.
- Resolve tenant scope through the approved runtime path. REST uses
get_tenant_contextorget_compatible_tenant_contextinsrc/ai_governance/api/dependencies/tenancy.py; Keycloak mode constructs context from a validatedAuthenticatedPrincipalwithTenantContextFactory. Development-mode scope headers are validated against the control plane; they are not a replacement for server-side authorization. - Carry
TenantContextthrough protected reads, writes, jobs, audit records, ontology operations, and provider calls. Do not bypass scope enforcement by direct repository access. - Do not log credentials, raw tokens, protected prompt content, or tenant-sensitive data.
Degrees of Freedom
Low freedom
Follow established contracts exactly for authentication and authorization, tenant context, repository selection, public compatibility, idempotency, settings precedence, audit persistence, replay source evidence, and deterministic ontology identifiers.
Medium freedom
Follow the nearest established pattern for services, adapters, repository implementations, workers, provider integrations, and Studio pages.
High freedom
Use judgement for behavior-preserving internal refactors, documentation organisation, test helpers, and developer tooling that do not alter the contracts above.
Dependency Upgrades
- Treat
pyproject.toml/uv.lockas the source of truth for Python packages and Compose files as the source of truth for local service-image pins. - Use GitHub Issues or Projects for active dependency and migration backlog
items. Do not maintain a second mutable task list in
AGENTS.md. - For a dependency change that establishes a cross-component compatibility,
migration, or operational-support decision, update
docs/maintenance/DEPENDENCY_MANAGEMENT.mdand link the affected operations documentation. Record released behavior inCHANGELOG.md. - Do not upgrade a Docker service image merely to match a client-library version. Major database or infrastructure-image upgrades require a dedicated migration issue/PR, vendor migration review, backup/restore rehearsal, and integration validation against the upgraded service.
Repository Skills
Use skills for repeatable task workflows; they do not replace these architectural constraints.
skills/api-change/SKILL.mdskills/domain-feature/SKILL.mdskills/governance-policy/SKILL.mdskills/model-runtime-capability-profile/SKILL.mdskills/tenant-isolation/SKILL.md
Related Guidance
src/ai_governance/api/AGENTS.mdsrc/ai_governance/domain/AGENTS.mdsrc/ai_governance/repositories/AGENTS.mdsrc/ai_governance/services/AGENTS.mdsrc/ai_governance/tenancy/AGENTS.mdsrc/ai_governance/workers/AGENTS.mddocs/architecture/ARCHITECTURE.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

