Organizing an AI agent's work on a repository
OSS Agent Playbook provides Markdown rules, templates, and checks for repository work. Start with a small task whose result can be reproduced.
Define the task
Describe current behavior, the required change, scope, and verification. For example: “Empty input must return a clear error; preserve the successful response format. Deliver a patch and the result of the existing parser test.”
Give the agent applicable instructions, worktree state, and real project commands. Preserve other people’s changes. Playbook includes AGENTS.md, CLAUDE.md, and PROJECT_AGENT_CONTEXT.md templates; adapt them without overwriting existing rules.
Gather context for the task: its entry point, affected component, and consumers. See the MCP guide for connecting tools.
Change and verify
- Find the cause and dependencies. A format change affects reading and writing; a handler change can affect its consumers.
- Prepare a small, complete patch. Separate unrelated dependency updates and neighboring refactors.
- Test the required behavior. For a parser, use relevant inputs; for an archive, inspect its contents; for instructions, reproduce the first successful run.
- Review the final diff and new files for stray settings, secrets, forgotten examples, and unsupported claims.
Playbook’s own documentation check is python3 scripts/check_docs.py. It does not replace application tests or builds. If an environment is unavailable, identify the unrun check and how to continue.
Hand over the result
State the change, revision, completed checks and results, and remaining limitations. Building, publishing, and running a service are separate states; verify the one you promised.
Before a long phase or a handoff, record the cause, decisions, changed files, checks, and next step. Recheck mutable facts when continuing. A checkpoint helps recover context; it cannot resume a lost process.
Publish according to project rules and granted permissions. Green tests inform readiness; they do not replace engineering judgment.