~/cxo.dev/ai-engineering-acceleration/agent-ready-codebase

Make your codebase ready for coding agents

Agents can only work as well as your repo lets them. If a strong new hire can’t get productive in a few days without asking anyone questions, an agent can’t either. We help engineering teams put context, fast checks, and guardrails into the repo so every agent run starts with what it needs.

For staff engineers, developer experience and platform leads, and engineering managers whose teams use coding agents every day.

AGENTS.md
## Setup
pnpm setup                     # install, seed, start dev

## While you work
pnpm test -- <changed paths>   # fast, scoped tests

## Before you open a PR
pnpm check                     # lint, format, types, all tests

## Where things live
docs/architecture.md           # system overview
docs/schema.md                 # database reference
.agents/skills/                # shared skills

## Rules
- UI uses tokens from design/tokens.css
- Never edit generated files in src/gen/
- Migrations need a rollback and an owner

How an agent run should feel

Every run starts with repo context, uses shared skills, and gets an answer from each check in seconds. Hooks enforce the mechanical rules.

  1. AGENTS.mdcontext loaded
  2. skillsrepro-bug, write-test
  3. lint< 5s
  4. tests< 10s, scoped
  5. hooksblocked 1 write
  6. previewchecked in browser

Where repos hold agents back

We start every engineering engagement with a readiness pass. These are the gaps we find most often, and what we put in place.

Area
What we see
What we install
Context

Architecture and conventions live in Slack threads, old PRs, and a few senior engineers’ heads.

AGENTS.md at the root and in key packages, architecture and schema docs in the repo, and a .env.example so agents know what exists.

Skills

Each engineer has their own prompts and nobody else benefits from them.

A shared skills directory in the repo, a skill that helps people write new skills, and shared packages for skills used across repos.

Feedback loops

Lint takes minutes, tests are flaky, and CI is a long wait. Agents burn tokens waiting or skip the checks.

Lint, format, typecheck, and scoped tests that run in seconds, plus CI that is parallelized and cached.

Guardrails

Reviewers keep catching the same hallucinated icons, wrong tokens, and missing feature flags.

Hooks that block edits that break a rule before they land, plus checks that run after every edit.

Permissions

Engineers approve every shell command by hand, so they stop reading the prompts.

Pre-approved permissions checked into the repo, paired with hooks for the checks that matter.

Telemetry

The admin console shows seats and suggestion acceptance rates.

Tool call, skill, hook, and MCP telemetry from agent OpenTelemetry exports, hooks, and your gateway, sent to the observability stack you already use.

Ready when you are

How ready is your repo?

We run a readiness pass across context, feedback loops, guardrails, and telemetry, then work with your platform team on the biggest gaps.

Talk to us →

What we put in the repo

Most of this helps your human engineers as much as your agents. Agents can write a lot of it themselves once you know what you want.

  1. 01

    Docs agents can find

    Top-level and nested AGENTS.md files, an architecture overview, a schema reference, and a contributing guide with PR and commit conventions. For new work we set up spec-driven development: write the spec, add failing acceptance tests, then let the agent implement.

  2. 02

    Feedback in seconds

    Agents run your checks over and over while they work. Slow checks make agents slow and expensive, and then people stop using them. We set a time budget for each check and fix the slowest first.

    feedback-budgets.txt
    check          budget
    lint           < 5s    changed files
    format         < 5s    changed files
    unit tests     < 10s   scoped to changed files
    typecheck      < 45s   incremental
    dev server     < 30s   one command
    ci             parallel, cached, ordered
  3. 03

    Hooks for the rules that matter

    A hook is a script that runs at set points in an agent session. A pre-tool hook can block an edit before it lands, like an icon outside the allowlist or a change to generated files. A post-edit hook runs lint and checks design tokens and feature flags right away, so reviewers see fewer repeat issues.

    .claude/settings.json
    "hooks": {
      "PostToolUse": [{
        "matcher": "Edit|Write",
        "hooks": [{ "type": "command",
          "command": "pnpm lint:changed" }]
      }],
      "PreToolUse": [{
        "matcher": "Edit|Write",
        "hooks": [{ "type": "command",
          "command": "scripts/check-icons.sh" }]
      }]
    }
  4. 04

    Shared skills

    A skill is a markdown file with instructions, plus any scripts or templates it needs. Commit them in .agents/skills/ and sync them to each harness your team uses, so every engineer and every agent gets the same workflows. Package the ones that cross repos as plugins.

  5. 05

    Telemetry on real use

    Accepted suggestions and lines of AI code don’t tell you much. We set up tracking for weekly active users, repos and task types, skill invocations, hook fire and deny rates, tool calls, and MCP calls.

  6. 06

    Level up once the basics hold

    Then come specs as code, shared MCP server configs, agentic code review, visual regression and other deterministic PR checks, agents in the cloud, and Slack and issue tracker integrations.

How we know it’s working

Readiness shows up in how fast agents get feedback and how often their work lands.

Signal
What it tells you
Where it comes from
New-hire test

Whether a new engineer can get productive in a few days without asking anyone a question.

Onboarding, docs review

Time to first check

How long an agent waits to find out if a change works.

Local scripts, CI timing

PRs that pass CI first try

Whether agents have enough context to get it right without a human fixing it up.

Git host, CI

Hook deny rate

Which rules agents break most, and where context is missing.

Hook telemetry

Skill invocations

Which shared workflows people actually use, and which ones nobody touches.

Agent telemetry

Questions we get

What is an agent-ready codebase?

A repo where an agent can find the context it needs, run fast checks on its own work, and follow your rules without a human repeating them. In practice that means docs in the repo, shared skills, quick feedback loops, hooks, and telemetry.

Where should we start?

Run the new-hire test. Then do the quick wins: AGENTS.md, docs in the repo, a .env.example, pre-approved permissions, and a skills directory. Agents can draft most of these quickly. Speeding up lint, tests, and CI takes longer and helps your engineers as much as your agents.

Do we need a platform team for this?

Someone has to own it. The teams getting the most from AI put real engineering headcount on developer experience and agent enablement. We can work alongside that team or help you stand it up.

Talk to us about making your repo agent-ready.

Tell us how your team uses agents today and what your codebase makes hard.