agentleFS
Bhanuj-AIBhanuj-AI/ai-governance-oss/AGENTS.md

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…

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
  1. Very specific:

    When an external wire identifier needs a compact prefix, use ai_governance_.

    line 35
  2. Distinctive:

    Do not add an Enterprise business concept to Core when it can be carried by an existing plugin, SPI, handler, event, or provider extension …

    line 41
  3. Distinctive:

    Before editing Core for an Enterprise feature:

    line 44
  4. Distinctive:

    Prefer an Enterprise-owned, namespaced, versioned operation or payload over a feature-specific Core enum, route, setting, persistence …

    line 48
  5. Very specific:

    Treat a proposed Core symbol containing an Enterprise feature name (for example SLO, Impact, or Contract) as a boundary violation unless …

    line 50
  6. Distinctive:

    Before making any Core edit, state the proposed generic contract, explain why the existing extension points are insufficient, and obtain …

    line 55
  7. Common:

    Do not log credentials, raw tokens, protected prompt content, or tenant-sensitive data.

    line 91
  8. Distinctive:

    Follow established contracts exactly for authentication and authorization, tenant context, repository selection, public compatibility, …

    line 98
  9. Distinctive:

    Follow the nearest established pattern for services, adapters, repository implementations, workers, provider integrations, and Studio pages.

    line 105
  10. Distinctive:

    Use judgement for behavior-preserving internal refactors, documentation organisation, test helpers, and developer tooling that do not alter …

    line 110
  11. Very specific:

    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 …

    line 116
  12. Distinctive:

    Use GitHub Issues or Projects for active dependency and migration backlog items.

    line 118
  13. Distinctive:

    Do not upgrade a Docker service image merely to match a client-library version.

    line 124
  14. Distinctive:

    Use skills for repeatable task workflows.

    line 131

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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, 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 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 AIGovernancePlugin and SPI (Service Provider Interfaces) contracts. OSS discovers entry points in the ai_governance.plugins group and does not import or detect a separately installed Enterprise distribution. See docs/architecture/EXTENSIBILITY.md.
  • The current tree still contains Enterprise-named settings. Optional Enterprise MCP tools are discovered through the ai_governance.mcp.plugins entry 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_governance prefix. Do not introduce bhanuj as 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:

  1. Inspect the existing extension points and use the narrowest one that can carry the feature.
  2. Prefer an Enterprise-owned, namespaced, versioned operation or payload over a feature-specific Core enum, route, setting, persistence table, or import.
  3. Treat a proposed Core symbol containing an Enterprise feature name (for example SLO, Impact, or Contract) as a boundary violation unless its generic ownership is explicitly demonstrated.
  4. Introduce a Core change only when it is generic, has no Enterprise dependency, and has at least two plausible independent consumers.
  5. 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_context or get_compatible_tenant_context in src/ai_governance/api/dependencies/tenancy.py; Keycloak mode constructs context from a validated AuthenticatedPrincipal with TenantContextFactory. Development-mode scope headers are validated against the control plane; they are not a replacement for server-side authorization.
  • Carry TenantContext through 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.lock as 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.md and link the affected operations documentation. Record released behavior in CHANGELOG.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.md
  • skills/domain-feature/SKILL.md
  • skills/governance-policy/SKILL.md
  • skills/model-runtime-capability-profile/SKILL.md
  • skills/tenant-isolation/SKILL.md

Related Guidance

  • src/ai_governance/api/AGENTS.md
  • src/ai_governance/domain/AGENTS.md
  • src/ai_governance/repositories/AGENTS.md
  • src/ai_governance/services/AGENTS.md
  • src/ai_governance/tenancy/AGENTS.md
  • src/ai_governance/workers/AGENTS.md
  • docs/architecture/ARCHITECTURE.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.