Published on

How my AI coding agents system works

Authors
  • avatar
    Name
    John Moreno

Agent AI is a way of working with a language model as an autonomous collaborator rather than a chat window. Instead of answering a single prompt, the agent is given a goal and the context it needs: the repository, the conventions of the project, and a written specification of what should change. From that, it plans. It reads the relevant files, breaks the goal into smaller steps, decides what order they belong in, and notes what it does not yet know, so that each later action follows from an explicit understanding of the task rather than from a guess.

Once the plan exists, the agent acts on it. It edits files, runs the project's commands, reads the output, and uses those results to decide what to do next, looping between making a change and checking it until the work matches the spec. When a command fails or a test breaks, it inspects the error and adjusts instead of pushing ahead blindly. The task is finished only when the behaviour is verified and the changes are committed in small, reviewable steps, which leaves a clear record of what the agent did and why.

Each agent is defined by a YAML frontmatter block followed by the instructions it follows. The block holds a description of what the agent is for, its mode, the model it runs on, a temperature, the number of steps it may take, and permission rules for task, edit and shell, which decide what it may hand to another agent, which files it may change and which commands it may run. The instructions come after the block, in plain prose, and describe how the agent should plan, act and verify its work.

---
description: Implements one approved spec task as a small, reviewable change
mode: primary
model: anthropic/claude-sonnet-4
temperature: 0.1
steps: 40
permission:
  task: deny
  edit:
    '*': allow
    '.env*': deny
    'specs/*': deny
  shell:
    '*': ask
    'yarn lint:check': allow
    'git push*': deny
---

Read the approved spec and the task you were given, then read the code you will change.
Implement only that task and respect the spec's out of scope.
Run the project's lint and tests, fix any failure before committing, and commit the change
with a conventional message.

All of this happens inside one system, with a single agent reading and writing the same repository. Real work rarely stays that tidy: a piece of the job may belong to an agent that runs somewhere else, owned by another team or another tool, and the two still have to cooperate. The Agent2Agent protocol, or A2A, exists for that case. It is an open standard for how agents talk to each other across systems, so one agent can hand work to another, follow what comes back, and keep the exchange understandable on both sides without every pair of tools needing its own private integration. That is what makes a setup like this one more than a single agent: the loop of planning, acting and verifying stays the same, while the work can spread across agents that were never built together.