Governance infrastructure that compiles and validates organization-level agent rules for all projects in an org.
The Org Agentic Toolkit (OAT) defines, compiles, and distributes the authoritative agent rules for all projects within an organization. It ensures every project inherits org rules by construction, allows optional personal overlays without weakening org authority, and produces deterministic, auditable agent instructions.
Inspiration:
This project is partly inspired by nAItmare, an open-source repository for centralizing multi-agent standards.
- Single org-wide agentic constitution: Enforce consistent rules across all projects
- Explicit inheritance: Projects explicitly declare which skills and personas they use
- Personal overlays: Optional developer-specific preferences (lowest precedence)
- Deterministic compilation: Same inputs produce same output byte-for-byte
- IDE integration: Output to IDE-specific configuration files (Cursor, Windsurf, etc.)
- Validation: Comprehensive validation of configuration and referenced files
git clone <repository-url>
cd org_agentic_toolkit
# Install in editable mode using uv, based on pyproject.toml with dev dependencies
uv pip install -e ".[dev]"This uses uv following dependencies declared in
pyproject.toml, with the package installed as a development-only dependency.
First, create your organization's constitution documents:
mkdir my-org
cd my-org
oat init orgThis creates the full structure for an organization's agent rules, including:
.oat-root- Discovery marker file.agent/memory/constitution.md- Organization constitution.agent/memory/general-context.md- General context.agent/memory/manifest.yaml- Memory manifest- Directory structure for skills, personas, and teams
Then, initialize each project to reference the organization:
cd your-project
oat init project --org-root ../my-orgIf the org root is in a parent directory, OAT will auto-detect it:
cd your-project
oat init projectThis creates:
AGENTS.md- Entry point for agents.agent/inherits.yaml- Project configuration (references org root).agent/project.md- Project-specific rules
Organization Root Discovery:
- OAT automatically discovers org roots by walking up the directory tree looking for
.oat-root - If
.oat-rootis not found, it falls back to checking for.agent/memory/constitution.md - You can also specify the org root path in
.agent/inherits.yamlor via theOAT_ROOTenvironment variable
Edit .agent/inherits.yaml to specify which skills and personas your project uses:
org_root: ../my-org
skills:
universal:
- git
- test
- db
languages:
python:
- django
- pytest
personas:
- backend-developer
- tech-lead
target_agents:
- cursor
- windsurfoat compileThis produces AGENTS.compiled.md with all rules merged in the correct precedence order.
oat validateChecks that all referenced files exist and configuration is valid.
To create a personal overlay for your own preferences:
oat init personalPersonal overlays have the lowest precedence and cannot override org rules.
Compile agent instructions from org rules, project rules, and personal overlay.
Options:
--out <path>: Override output path (default:AGENTS.compiled.md)--target <name>: Compile for specific IDE (e.g.,cursor,windsurf)--no-personal: Ignore personal overlay--print: Print compiled content to stdout--hash: Include content hash in output--diff: Show changes since last compilation--include-skill <name>: Additionally include a skill--exclude-skill <name>: Exclude a skill from manifest--include-persona <name>: Additionally include a persona--exclude-persona <name>: Exclude a persona from manifest--repo <path>: Explicit repo root path
Examples:
# Basic compilation
oat compile
# Compile for Cursor IDE
oat compile --target cursor
# Compile with hash
oat compile --hash
# Print to stdout
oat compile --printValidate repository configuration and referenced files.
Options:
--repo <path>: Explicit repo root path--strict: Treat warnings as errors--json: Output JSON format
Examples:
# Basic validation
oat validate
# Strict validation
oat validate --strict
# JSON output
oat validate --jsonShow diagnostic information about the current repository configuration.
Options:
--json: Output JSON format
Example:
oat doctorOutput includes:
- Repo root and org root paths
- Entry point location
- Constitution version
- Memory files loaded
- Skills and personas from manifest
- Teams referenced
- Project rules location
- Personal overlay status
- Available but not included items
Initialize a project repository with agentic toolkit configuration.
Options:
--org-root <path>: Explicit org root path--force: Overwrite existing files--suggest: Suggest skills/personas based on project files
Examples:
# Basic initialization
oat init project
# With suggestions
oat init project --suggest
# With explicit org root
oat init project --org-root ../org-agentic-toolkitInitialize an organization root repository.
Options:
--name <name>: Organization name (default: "My Org")--force: Overwrite existing files
Initialize personal overlay directory.
Options:
--path <path>: Override personal folder path--force: Overwrite existing files
org-agentic-toolkit/
├── .oat-root # Discovery marker
├── AGENTS.md # Entry point
├── .agent/
│ ├── memory/
│ │ ├── constitution.md # Immutable org rules
│ │ ├── general-context.md
│ │ ├── manifest.yaml
│ │ └── teams/ # Team-specific context
│ ├── skills/ # Atomic knowledge modules
│ │ ├── git.md
│ │ ├── test.md
│ │ └── [language]/ # Language-specific skills
│ ├── personas/ # Specialized personas
│ └── toolkit/ # Toolkit implementation
└── repos/ # Project repositories
project-repo/
├── AGENTS.md # Entry point (optional)
└── .agent/
├── inherits.yaml # Project configuration (required)
└── project.md # Project-specific rules (required)
The compiled document follows strict precedence (highest to lowest):
- Entry Point (
AGENTS.mdfrom repo) - Org Memory (constitution, general-context, teams)
- Universal Skills (from
inherits.yaml, in order) - Language/Stack Skills (grouped by language, in order)
- Org Personas (from
inherits.yaml, in order) - Project Rules (
project.md) - Personal Overlay (optional, lowest authority)
OAT_ROOT: Explicitly set the org root pathORG_AGENTIC_TOOLKIT_ROOT_NAME: Control org root directory naming patternAGENT_PERSONAL_FOLDER: Path to personal overlay directory (default:~/.agent)
The toolkit supports outputting to IDE-specific configuration files via the --target option:
oat compile --target cursor # Outputs to .cursorrules
oat compile --target windsurf # Outputs to .windsurfrulesSupported targets are defined in .agent/toolkit/targets.yaml.
Developers can maintain personal preferences in ~/.agent/ (or path specified by AGENT_PERSONAL_FOLDER):
~/.agent/
├── memory/
│ └── personal-context.md
├── skills/
│ └── personal-git.md
└── personas/
└── me.md # Team membership (gitignored)
Personal overlay has the lowest precedence and cannot override org rules.
The validator checks:
AGENTS.mdexists (warning if missing).agent/inherits.yamlexists and is valid (error if missing)skillsandpersonassections exist (error if missing)org_rootresolves and contains constitution- All referenced skills exist
- All referenced personas exist
- All referenced teams exist
.agent/project.mdexists (error in strict mode, warning otherwise).agent/project.mdexists (error in strict mode, warning otherwise)- No forbidden constructs (absolute paths, etc.)
Validation automatically detects the context:
- Org Root: Checks
.oat-root, constitution, manifest, etc. - Personal Overlay: Checks personal context, me.md
- Project Repo: Checks inherits.yaml and inheritance
.agent/inherits.yaml:
org_root: ../..
skills:
universal:
- git
- test
- db
- review-checklist
languages:
python:
- django
- pytest
personas:
- backend-developer
- tech-lead
teams:
- platform
target_agents:
- cursor.agent/inherits.yaml:
org_root: ../..
skills:
universal:
- git
- test
languages:
javascript:
- react
- nodejs
- jest
personas:
- frontend-developer
- backend-developer
- tech-leadpytestorg_agentic_toolkit/
├── oat/ # Main package
│ ├── cli.py # CLI commands
│ ├── discovery.py # Root discovery
│ ├── config.py # YAML loading
│ ├── compiler.py # Compilation engine
│ ├── validator.py # Validation logic
│ ├── template_manager.py # Template manager
│ └── templates/ # Template files (package data)
├── tests/ # Test suite
├── pyproject.toml # Package config
└── MANIFEST.in # Package data config
MIT
Contributions welcome! Please read CONTRIBUTING.md for guidelines on how to contribute, including:
- Development setup and installation
- Code style and testing guidelines
- How to submit pull requests
- Project structure and workflow
We appreciate all contributions, whether they're bug fixes, new features, documentation improvements, or other enhancements.