Skip to content

Repositories for autonomous agents: An agent is only as good as its repo

UÎllustration eines Roboters der an einem System arbeitet.

In the first part of this series, we showed which tasks our agent Muro already handles. The second part was all about sessions, tools, skills and execution environments.

Now we're flipping the perspective: What kind of repository do we let this agent work in?

Because coding agents have long been good enough for plenty of real tasks. What they often lack isn't a better model. It's a better repository.

You hand an agent a ticket. It reads the code, changes a few files, runs tests and prepares a pull request. In the next project, the same agent produces three new patterns for a long-solved problem. Plus a button that looks _almost_ like all the other buttons.

The model is the same. The difference is the repository.

Our short answer: the agent needs context, constraints and fast feedback.

Context. Constraints. Feedback.

Autonomous? Easy there. 🤖

By an autonomous repository, we don't mean a GitHub repo that secretly builds features at night and proudly deploys them in the morning.

Would be handy. We're not there yet.

We mean a repository in which a coding agent can work as independently and reliably as possible. For that, it has to be able to answer three questions:

  1. Context: How does this system work?
  2. Constraints: Which rules must I not break?
  3. Feedback: How do I know my change works?

The more answers the repository holds, the less the agent has to guess. Guessing is expensive. Especially when it comes to architecture, permissions and data access.

Context has to be explicit

Humans are surprisingly good at working with implicit knowledge. After a few months on a project, a developer knows where API calls belong, how we build forms and why legacy-utils-old-final-v2.ts is absolutely not a template to copy.

A coding agent knows none of this. It sees code and draws conclusions from it.

That's why we make relevant knowledge explicit. Not as a novel, but right where it's needed:

  • AGENTS.md describes lasting rules and boundaries.
  • Architecture docs explain decisions where the why matters.
  • A generated API contract defines what the backend can actually do.
  • Skills guide the agent through recurring workflows.
  • Types, linting and CI enforce machine-checkable rules.

This matters: Not every piece of information belongs in Markdown. If the agent can't break a rule in the first place, that's stronger than any friendly reminder.

Requirements rarely live entirely in the repository either. Scope, status and decisions often sit in a planning tool. The technical truth might be in the API contract or the backend code.

So we pull the relevant context into the working environment automatically and read-only. The external source stays in charge. The agent gets an up-to-date, machine-readable view of it.

Before it gets started, it checks:

Task
  ↓
Anforderungen und Entscheidungen
  ↓
Status und offene Fragen
  ↓
Technische Abhängigkeiten
  ↓
API-Contract
  ↓
Starten oder blockieren

If an operation or field is missing from the contract, the capability counts as non-existent. No made-up endpoint. No mock that builds a nice parallel universe.

Instead: name the blocker. Ask for a decision.

Autonomy doesn't mean guessing more boldly. It means recognizing on your own when guessing is off-limits.

Skills make workflows reproducible

Docs explain how the system works. Skills explain how we get a task done.

A development skill ties together task, context and code. It checks the API contract, looks for existing patterns, derives tests from the acceptance criteria and guides the agent through implementation and verification.

Design needs a different entry point. An exploration may start with clearly separated mock data, even though the production API is still missing. Development is stricter: it only starts once status, blockers and technical capabilities line up.

Another skill can describe the local development loop:

  1. Check the app and route.
  2. Implement the change.
  3. Read compilation errors, logs and browser errors.
  4. Test the behavior in the browser.
  5. Fix and repeat.

The number of skills was never the goal. Our rule is simpler:

If we're explaining the same workflow to an agent for the fifth time, it deserves a skill.

The strongest sentence in the repo starts with “forbidden”

Take an architecture rule:

«The application only accesses the API through the generated client.»

As a sentence, that's good. As a gate, it's better.

A project-specific lint rule forbids direct fetch() calls outside the API package. The error message points straight to the permitted pattern.

The same principle applies to other rules:

  • Auth checks belong where the data is accessed, not in the layout.
  • URL state goes through typed parsers instead of raw URLSearchParams.
  • Production code doesn't import preview components.
  • Tailwind palette colors are off-limits. The design system provides semantic tokens.

“Please remember” becomes: “The repository won't accept this change.”

That helps humans. Agents even more.

If a mistake keeps showing up in review, we turn it into infrastructure. First we ask: can the type make the wrong variant impossible? If not, a lint rule, an existing code doctor or a CI gate comes next.

Then we prove the rule in both directions. A deliberate violation has to trigger the check. Permitted code has to stay green.

The agent doesn't just learn in the chat. The repository learns along with it.

Dead code is part of these boundaries, too. A human might recognize an old file as historical junk. An agent sees an example and builds the pattern all over again.

For humans, dead code is clutter. For agents, it's potentially wrong documentation. So whatever gets replaced disappears in the same pull request. Git is the archive.

The agent needs eyes

An agent that can only change files is working blind. An agent that can run and observe the application gets a feedback loop:

Task
  ↓
Implementieren
  ↓
App ausführen
  ↓
Browser + Logs + Runtime prüfen
  ↓
Fehler erkennen
  ↓
Korrigieren
  ↺

Two local environments have proven their worth for this.

The design system workbench shows tokens and components in isolation. New or visually changed components get a demo there with their relevant states.

The application sandbox renders real routes and the real app shell against mock auth and a mock API. Switchable personas make roles, permissions and empty states visible.

A component isn't done just because TypeScript is happy. It has to visibly work.

Tests also give the agent machine-readable feedback: unit tests for load-bearing logic, typed fixtures against the API contract and browser tests for routes, roles and data flows.

On pull requests, only the browser tests that are likely affected run. If the mapping can't reliably classify a change, the full suite runs as a conservative fallback. It also runs on main and nightly.

Short loops, but not at the expense of the safety net.

Implementation and evaluation stay separate

Humans still look at pull requests. Especially when it comes to architecture, security, auth and data isolation.

Still, we automate part of the verification. Not as a multi-agent circus with ten bots writing “Great point!” to each other.

Before implementation, a research agent derives test scenarios from the task, context and contract. After implementation, a separate verify agent checks the same requirements against the diff and the tests. The second agent isn't allowed to change anything. It looks for mistakes.

Task + Kontext + Contract
       ↓
Scenario Research
       ↓
Implementierung
       ↓
Types / Lint / Tests / Browser
       ↓
Unabhängige Verifikation
       ↓
Fix Loop
       ↓
Human Review

The idea behind it is simple:

The doer doesn't grade their own homework.

What a complete task looks like

Let's take a small task:

«Add a status filter to an overview.»

In an autonomy-ready repository, it goes like this:

  1. The agent loads the task, acceptance criteria and relevant decisions.
  2. It checks for blockers and verifies the required fields in the API contract.
  3. It looks for the most similar existing pattern and derives test scenarios.
  4. It implements the smallest sensible change.
  5. Types, linting, unit and browser tests provide feedback.
  6. The agent checks the flow in the sandbox and shows visual changes as a screenshot.
  7. An independent verification checks requirements, diff and evidence. Then comes the human review.

The model matters. But a great deal of the quality comes from everything around it.

This takes work. Period.

A repository doesn't become autonomy-ready because we toss in an AGENTS.md and add a rocket emoji. 🚀

Docs have to stay up to date. Skills can contradict each other. Lint rules need helpful error messages. Tests mustn't become slow and redundant. Mocks have to respect the real contract. Dead code really has to go.

Context comes at a cost. Outdated context costs double.

That's why we treat the repository like a product: recurring mistakes become gates, outdated rules disappear, duplicate tests get consolidated and skills grow out of real workflows rather than an urge to collect them.

Autonomy isn't a setup sprint. It's ongoing product maintenance.

Maybe agent-friendly engineering is simply good engineering

Almost everything that makes a repository better for agents helps humans too:

  • clear architecture
  • visible sources of truth
  • up-to-date documentation
  • little dead code
  • helpful error messages
  • typed contracts
  • automated tests
  • explicit boundaries
  • reproducible workflows

Coding agents don't reinvent these disciplines. They just make it brutally obvious where we've been running on implicit knowledge until now.

The model of the future will get better. Almost certainly a whole lot better.

Even so, we're not waiting for it to intuitively guess every quirk of our project. We'd rather build repositories where it has less to guess.

The model changes. The repository stays.

Ein Mann mit Brille, kurzen dunklen Haaren und Bart steht mit den Händen in den Taschen da. Er trägt ein marineblaues T-Shirt und Jeans in Orange.

Written by
Josh Wirth

Artificial Intelligence|September 2026

Got a similar challenge on your plate? Let's talk.

More Articles