If you're new to this repository, this guide gives you a practical mental model, a map of where things live, and a fast path to becoming productive.
AgentOps is the operational layer for coding agents: a skills + hooks + CLI system that provides bookkeeping, validation, primitives, and flows so sessions compound instead of restarting from zero.
At a high level:
- Run primitives and flows with skills (
/research,/implement,/validation,/rpi) - Persist bookkeeping in
.agents/ - Inject the best prior learnings into the next session
- Enforce quality through hooks and CI gates
See also:
Think in five layers:
- Product/docs layer —
docs/+ selected repo-root entrypoints such asREADME.md,CHANGELOG.md,GOALS.md, andPRODUCT.md - Skills layer —
skills/, checked-inskills-codex/, andskills-codex-overrides/(SKILL.mdcontracts + per-skill scripts/references + Codex-only tailoring) - Hooks layer —
hooks/with active runtime manifest inhooks/hooks.json - CLI layer —
cli/(cli/cmd/ao/,cli/internal/, generatedcli/docs/COMMANDS.md) - Validation layer —
scripts/,tests/, and.github/workflows/validate.yml
When docs disagree, follow this order:
- Executable code + generated artifacts (
cli/**,hooks/**,scripts/**,cli/docs/COMMANDS.md) - Skill contracts/manifests (
skills/**/SKILL.md,hooks/hooks.json,schemas/**) - Explanatory docs (
docs/**,README.md)
For Codex skills specifically:
skills/<name>/SKILL.mdis the canonical behavior contractskills-codex-overrides/<name>/is the Codex-specific tailoring layerskills-codex-overrides/catalog.jsonrecords the Codex treatment decision for every skillskills-codex/<name>/is the checked-in Codex runtime artifact
For the core Codex execution chain, skills-codex-overrides/catalog.json also
stores machine-readable operator_contract markers. When you change one of
those prompts, update the contract alongside the prose so the validator can
enforce the intended Codex-specific guarantees. After Codex prompt/artifact
changes, run bash scripts/refresh-codex-artifacts.sh --scope worktree so hash
refresh and Codex-specific validators follow one obvious repair path.
The architecture assumes output quality depends on input context quality. Most patterns in this repo are about context scoping, isolation, and compounding.
Use the router in Skills Reference to choose the right entry point:
- Start with uncertainty:
/research - Break work into issues:
/plan - Implement one issue:
/implement - Run multi-issue waves:
/crank - Run end-to-end lifecycle:
/rpi
The active hook manifest in hooks/hooks.json is authoritative for what runs at session boundaries.
cli/docs/COMMANDS.md is generated. If command behavior changes, regenerate docs and keep parity checks passing.
CI validates not just builds/tests but also docs parity, hook safety, skill integrity/schema, security scans, and contract compatibility.
README.mddocs/documentation-index.mddocs/how-it-works.mddocs/ARCHITECTURE.mddocs/SKILLS.md
- CLI behavior:
cli/cmd/ao/,cli/internal/,cli/docs/COMMANDS.md - Skill behavior:
skills/<name>/SKILL.md - Hook/gate behavior:
hooks/hooks.json+hooks/*.sh - Validation/release/security:
scripts/*.sh+tests/+.github/workflows/validate.yml
- Docs-only fix (safe): update wording or cross-links and run docs validation scripts.
- Hook/docs parity fix (medium): update docs to match runtime hook manifest and validate parity.
- Small CLI command improvement (advanced beginner): update command behavior, regenerate CLI docs, and run CLI checks.
- Activate the repo-managed git hooks once per clone/worktree:
bash scripts/install-dev-hooks.sh - Trust runtime files over narrative docs when there is a mismatch.
- Keep changes small and verify with local gates before pushing.
- Treat
.agents/and hooks as first-class parts of the system behavior. - Treat Codex as a first-class runtime: when a skill change affects Codex UX or execution style, inspect
skills-codex-overrides/, updateskills-codex-overrides/catalog.jsonif treatment changes, update the checked-inskills-codex/copy when needed, and run the Codex validation scripts. - If you touch command surfaces or hook contracts, expect related parity checks to fail until updated.