A Zig tool for scaffolding AI-agent projects using the AgentFlow methodology.
init-agent generates project kits that establish shared memory (state) between you and any AI working on your codebase. It provides the structured files, conventions, and skills necessary to keep AI agents oriented, deterministic, and autonomous without drift.
The latest init-agent introduces two major upgrades to the AgentFlow methodology:
Previously, AGENTS.md was bloated with every possible process and workflow instruction, causing context exhaustion and confusion.
Now, AGENTS.md is a slim router. The actual workflows live in skills/ files, grouped logically:
development-loop.md— how to write, test, and commit codetest-as-lee.md— how to verify work before presenting itdocumentation.md— what to update and whenbacklog.md— how to scope and create taskscode-review.md— how to perform an objective codebase review
Agents only load the specific skill they need based on triggers defined in AGENTS.md. This drops the cognitive load significantly and makes agents far more effective at complex tasks.
Code review is no longer a manual afterthought — it's wired into the sprint lifecycle:
- The sprint
Definition of Doneexplicitly demands running theskills/code-review.mdprotocol. - The review outputs structurally to
code-reviews/review-YYYY-MM-DD.md(a directory now scaffolded by all profiles). - The
sprint-review.mdtemplate prompts an external/fresh AI to pull that review file when assessing the sprint's quality.
You cannot close a sprint in an AgentFlow project without an AI pointing out the edge cases you missed.
# macOS / Linux (from source)
git clone https://github.com/lee/init-agent.git
cd init-agent
make installCreate a new project:
init-agent my-awesome-app --profile web-app --author "Lee"Available profiles:
python: Python package withpyproject.tomlweb-app: React + Vite + TypeScript applicationzig-cli: Zig command-line tool
Update an existing project's AgentFlow files without overwriting user data:
cd my-awesome-app
init-agent --update --profile web-appinit-agent is written in Zig 0.13.0.
# Build
make build
# Test
make test
# Verify template sync (always run before committing)
make check-syncThis project embeds templates at compile time using @embedFile.
- Human-editable templates live in
templates/(project root). - Compiled templates live in
src/templates/. When you edit a template, you must update both. Usemake check-syncto verify.