Skip to content

Guide the Agent From Your Repo ​

Two things shape how the agent behaves in your repository, and they have different jobs:

  • The memory file is CLAUDE.md or AGENTS.md at your repository root: the guidance file your Runtime already loads on its own in any coding session.
  • The task prompt is the message the Dispatcher writes to start each dispatched Run, telling the agent which Issue to implement and how to conduct the attempt. Your optional .zozo/agent.md file is appended to it.

This page explains what reaches the agent through each channel and what to put where.

Two Channels Reach the Agent ​

The memory file. Each Runtime loads its own memory file from the repository root exactly as it would in interactive use: Claude Code reads CLAUDE.md, and Codex reads AGENTS.md. Zozo passes this file through untouched. It never reads, rewrites, or composes it, so everything the file does for you in a terminal session it also does inside a Run.

The task prompt. Every dispatched Run starts from a prompt the Dispatcher builds:

  • the instruction to implement one named Issue, with the Issue body embedded verbatim as the authoritative spec
  • a parent Spec section, present only for sub-issues of a Spec (the parent Issue that carries their implementation plan), supplying reference context and the Doc Delta alongside the authoritative Issue body
  • a fixed set of process rules the loop depends on (see below)
  • your optional .zozo/agent.md, appended verbatim as project-specific guidance when the file exists

The two channels divide the work: the memory file describes how code is written in your repository, and the task prompt describes how the attempt is conducted.

What Belongs in CLAUDE.md / AGENTS.md ​

Write it for any coding session, not just for Zozo:

  • architecture and layout: where things live, what depends on what
  • coding conventions: naming, style, patterns to follow or avoid
  • commands: how to build, test, and lint
  • gotchas: the things a newcomer gets wrong in their first week

Maintain the file that matches your Project's pinned Provider: CLAUDE.md for Claude Code, AGENTS.md for Codex. If you might switch Providers later, keep both files in sync, or make one a one-line pointer to the other. See Understanding Credentials for how the pin works.

Native Agent Files Are No Longer Loaded ​

Zozo-owned definitions are the only way a Run delegates work to other agents. The Runtime no longer loads agent definition files from your repository: .claude/agents (Claude Code) and .codex/agents (Codex) are ignored in every Run. Everything else keeps loading, including CLAUDE.md, AGENTS.md, skills, and project settings.

When a Project's repository contains either directory, the Dispatcher records a warning on the Run and the Dashboard shows an "agent files not loaded" warning on the Project. If you relied on those files without knowing it, move the guidance you need into your memory file or into a Subagent file; see Project Agents and Subagents.

The Process Rules Are Fixed ​

The Dispatcher's task prompt commits the agent to a fixed process, because the loop's own bookkeeping depends on it:

  • work only in the provided working directory, never in another checkout
  • keep the build and tests green, running them synchronously before finishing
  • commit on the current branch, and leave pushing, Pull Request creation, and label changes to the Dispatcher
  • end the Run to signal completion
  • ask through Clarification when a load-bearing detail is genuinely missing

Keep process instructions out of the memory file

A memory file that tells the agent to push its branch, open a Pull Request, manage labels, or run tests in the background contradicts the task prompt. Zozo doesn't validate your files against the process rules, and a conflict doesn't produce an error; it produces a confused agent and flakier Runs. The fix is the division of labor above: keep the memory file about the code.

What Belongs in .zozo/agent.md ​

Use .zozo/agent.md for guidance that only applies when Zozo drives the work:

  • cross-cutting completeness rules, such as "a change that adds an API route must update the API reference in the same change"
  • boundaries, such as "never edit files under generated/"
  • extra verification, such as "run the schema check after touching migrations/"

The Dispatcher reads the file from the working directory at dispatch time and appends its content verbatim, so it applies to commits that contain it and is reviewed like any other code change. The file is optional; most projects start without one and add it when a recurring miss shows up in Pull Request review.

Coding conventions still belong in the memory file. Duplicating them in .zozo/agent.md doubles your maintenance without changing behavior.

Optional frontmatter ​

.zozo/agent.md may start with a YAML frontmatter block. The file then defines the Project Agent that every dispatched Run for the Project is created from: policy sets the Permission Policy, model and effort are keyed by Provider, and stop sets default stop limits (maxTurns, maxTokens, maxCost, timeoutMs) that replace the matching Project settings. The text after the frontmatter stays appended project guidance, and never replaces the Runtime's own system prompt. A repository with no file, or a file without frontmatter, runs exactly as before. Every field, the Subagent file format, and the validation command are covered in Project Agents and Subagents.

If the Project Agent file or a Subagent file under .zozo/agents/ is malformed, the Dispatcher starts no Run. It comments on the Issue with each error, moves the Issue to needs-info, and shows the problem on the Issue row in the Dashboard. The Project stays active and the refusal does not count as a failed attempt. Fix the file and relabel the Issueready-for-agent.

Write Self-Contained Issues ​

The Issue body travels inside the task prompt as the authoritative spec, and the agent works from that embedded copy. Write Issues to stand on their own: acceptance criteria, file pointers, and the decision already made. Repository guidance can teach the agent your conventions, but it can't supply a missing requirement. When a load-bearing detail is absent, the attempt pauses in Clarification and waits for your answer.

Docs for Zozo: a coding-agent harness.