Ler original em português

← All content

dooopSoftware · Process · 12 min

How to Prepare Repositories for AI-Assisted Work

See how to make commands, conventions and boundaries discoverable in the repository to reduce ambiguities in AI-assisted changes.

Published on September 6, 2026

MAIN THESIS

Agents do not fail just because of short context. They fail when the repository hides how the team works.

Commands, conventions and boundaries need to be on the path of change, not in the team’s informal memory.

A repository for code agents is not ready when it gains a huge file of instructions for artificial intelligence. It is ready when commands, conventions and boundaries can be found, executed and verified without relying on someone’s memory.

If an agent opens the project and only discovers the rules after failing a pull request, the problem is not AI. It is the lack of operational discoverability in the repository itself.

What an Agent Needs to Find Before Changing Code

A code agent, in this article, is a resource capable of receiving a task, navigating files, suggesting or changing code and returning a proposed change. It does not replace the team’s judgment. GitHub’s documentation, for example, describes agent features with distinct environments and permissions and emphasizes human supervision and output review.

Therefore, preparing the repository is not trying to turn AI into someone who knows the entire product history. It is about reducing ambiguity at the point where the change happens.

Before touching code, a new person or an agent should locate three types of information:

  • Executable commands: how to install dependencies, set up the environment, run tests, check style, generate builds and reproduce a common failure.
  • Writing conventions: how the project organizes folders, names, errors, logs, tests, commit messages and pull requests.
  • Decision boundaries: which areas require specialized review, which changes should not be made without justification and which public behaviors cannot be altered as a side effect.

This information already exists in many teams but appears in fragile places: an old conversation, a pull request comment, a script with a similar name, a pinned chat message, a practice known by two people.

This fragility becomes more costly when an AI-assisted change seems plausible but violates the team’s real way of working. The prepared repository reduces this space for improvisation.

The question, then, is smaller and more operational than the broad discussion about artificial intelligence strategy: when someone opens the repository, what needs to be discoverable so that an AI-assisted change does not start in the dark?

Minimum Commands: Install, Test, Validate and Reproduce

The first sign of readiness is simple: is there a short path to run the project and validate a change?

It does not need to be sophisticated. It needs to be canonical. If there are five ways to run tests and none is recognized as the main one, the agent tends to choose by apparent standard, not the correct standard. The same applies to a new developer.

A good operational entry point should answer, within the repository:

  • What prerequisites need to exist before installing dependencies.
  • Which command installs or prepares the local environment.
  • Which command runs the most relevant tests for a common change.
  • Which command validates style, formatting or static analysis.
  • Which command generates a build or checks packaging, when that makes sense.
  • Which minimum routine reproduces a local diagnosis before opening a pull request.

The difference between “documenting commands” and “preparing commands” is that the latter requires removing concurrency. If test, test:local, test:new, check-tests and ci-test do similar things, the team must decide which is the entry point and explain when to use the variations.

It is also worth aligning commands with continuous integration. DORA describes continuous integration as frequent integration into the main code, accompanied by automated builds and tests. The same source states that fixing a broken build should have priority over new changes.

For AI-assisted work, this has a practical implication: the agent should not be instructed only to “make the change.” It should be instructed to perform the minimum verification the team considers acceptable before human review. When verification does not exist, the task still depends on human reading too late.

Conventions That Should Become Rules, Not Memories

In many teams, part of code review ends up correcting preferences that could be visible before the change: file name, error pattern, test format, layer where a rule should be, how to record logs, commit message style.

When this happens with people, the team calls it alignment. When it happens with agents, it is often called hallucination or low quality. Sometimes it is. But in many cases, the repository did not provide a discoverable rule.

There are three better ways to make conventions useful:

  • Automate when possible: formatting, linting, simple checks and repetitive patterns should not depend on subjective reading.
  • Place close to usage: a testing convention should be in the template, the test folder or a short guide inside the repository, not lost in an old presentation.
  • Convert recurring rejections into rules: if the same comment appears in several reviews, it probably deserves to become configuration, example or checklist.

This does not mean turning the repository into an encyclopedia. The goal is to guide code changes, not preserve all organizational knowledge. Broad documentation has another role. Here, the focus is on what changes the agent’s or developer’s decision during execution.

A useful criterion is to ask: if this convention is not read, can the change seem correct and still be rejected? If yes, it needs to be closer to the code or become a check.

Anthropic defines context engineering as selecting and maintaining the information available to the model during inference, including instructions, tools, external data and history, within a limited window. Applied to the repository, this reinforces a choice about information organization: it is no use dumping everything into context. It is necessary to make the right information easy to locate.

Explicit Boundaries for AI-Assisted Changes

The repository also needs to say where an AI-assisted change should slow down.

A boundary is not a generic sign saying “caution.” It is an operational instruction. It should point to sensitive areas, types of changes that require review and situations where the agent should not continue without a human decision.

Some common boundaries in software include:

  • Authentication, authorization and permissions.
  • Data migrations.
  • Billing, subscription, pricing, plans or business rules.
  • External integrations with public behavior.
  • Infrastructure configuration files.
  • API contracts, events or messages consumed by other systems.
  • Handling of personal data or sensitive information.

The wording must be concrete. “Do not touch billing” can block legitimate changes. “Changes in renewal, cancellation or plan eligibility calculations require justification in the pull request and review by a person responsible for the domain” guides better.

Another point: boundaries should not be hidden in a distant corporate document. If the agent changes the repository, the boundary needs to be in the repository. It can be in a short guidance file, in pull request templates, in code owner files when the team uses this mechanism or in comments near critical points, provided they do not become noise.

A good boundary does not try to predict all errors. It makes visible where the team does not accept automatic progress.

This distinction is relevant for organizations evaluating AI adoption: the repository needs to show where the team authorizes, reviews, measures and interrupts an assisted change.

Fictional Example: Preparing a Subscription Service

Imagine a subscription service for a digital platform. The example is fictional and serves only to demonstrate the criteria.

The repository has old scripts, slow tests, a billing folder with rules known by few people and recurring review comments: “use the correct helper,” “do not change this rule without reviewing renewal,” “run the cancellation test before opening PR.”

The team wants to use code agents for small changes, such as fixing error messages, adding tests, adjusting validations and refactoring localized sections. Before that, it reorganizes the repository in five steps.

First, it creates a short operational README. It does not explain the entire product. It explains how to install dependencies, configure local variables, run the application in development mode, execute the quick test suite and run the verification used before the pull request.

Second, it standardizes commands. Instead of leaving competing scripts, it defines predictable names for local test, full verification and lint. Old scripts that still exist receive clear descriptions or are removed when no longer needed.

Third, it brings conventions closer to the code. The test folder gains minimal examples for new validations. The pull request template starts asking which behavior was changed, which tests were run and whether there was impact on billing, permissions or subscriber data.

Fourth, it creates a short boundaries file. It indicates that changes in renewal, cancellation, plan eligibility and billing calculation should not proceed without justification and specific review. It also differentiates changes allowed without extra review, such as improving a test name, from risky changes, such as changing a plan transition rule.

Fifth, it makes the next change readable inside the repository. Instead of asking the agent to “improve the subscription module,” the team asks “add a test for cancellation behavior when the subscription is already expired, without changing billing logic.”

None of this proves that AI will produce better code. That is not the point. The hypothesis to measure would be different: with discoverable commands, conventions and boundaries, the team reduces ambiguities before review and can evaluate smaller proposals with less dependence on informal knowledge.

DORA recommends small, independent and testable work units to get feedback on changes and review hypotheses earlier. The same guidance warns about the difficulty of reviewing and integrating large AI-generated changes. For the fictional example, this favors smaller, verifiable requests, not large reforms delivered at once.

Discoverability Checklist for AI-Assisted Repositories

This checklist does not measure code quality or agent autonomy. It measures how much the team depends on informal knowledge to guide a change. For each item, answer “yes,” “no” or “partial” and define the minimum action before expanding AI-assisted work.

Is there an operational entry point in the repository?

Criterion: a person or agent finds, in up to two predictable files, how to install dependencies, set up the local environment, run tests and validate the change.

If the answer is “no” or “partial,” create or update an operational README with canonical commands and prerequisites. Avoid turning this file into an extensive manual. It should work as an entry point.

Are the main commands executable without interpretation?

Criterion: test, build, lint and local verification commands can be copied and executed without depending on omitted steps or verbal knowledge.

If not, standardize scripts and remove competing variations that do the same thing. When variation is necessary, explain usage with a short phrase.

Are code conventions close to the code?

Criterion: rules for structure, style, tests and naming appear in automated configuration, templates or short documentation inside the repository.

If they exist only in the team’s head, convert recurring review preferences into documented rules, examples or automated checks.

Are there explicit boundaries for sensitive areas?

Criterion: the repository identifies modules, files or types of change that require specific review, justification or technical approval before proceeding.

If none exist, create a boundaries section with examples of allowed, risky and forbidden changes without review. Prefer concrete examples to generic warnings.

Is the definition of a small task clear?

Criterion: the team can separate a change into an independent, testable and reviewable unit before asking a code agent for help.

If the task seems too large, first record which part of the repository should guide the change: hypothesis, file, behavior or verifiable test. The goal is not to fragment everything but to avoid proposals mixing refactoring, business rules and visual adjustments without a clear validation point.

Does human review have objective triggers?

Criterion: the repository or pull request template indicates when an AI-generated or assisted change needs additional review.

If it does not, add triggers such as changes in authentication, billing, personal data, permissions, migrations, external integrations or public behavior.

Does continuous integration confirm the basics?

Criterion: the change passes through build and automated tests before being considered ready for final review.

If minimum verification does not exist, prioritize a first layer of continuous integration before expanding assisted changes. Without this, human review becomes the first detector of problems that could have been found earlier.

When Not to Deliver the Task to the Agent Yet

There are situations where the best decision is to prepare the repository before requesting the change.

If commands do not run, the agent may waste energy circumventing the environment instead of solving the task. If tests do not identify relevant regressions, a plausible change may pass locally and still break relevant behavior. If the area requires product or architecture decisions not recorded, the problem is not code execution. It is a missing decision.

It is also too early when human review is not defined. GitHub’s documentation on agents emphasizes human supervision and output review. This should not appear only in governance discourse. It needs to appear in the real flow: who reviews, on which triggers and with what information in the pull request.

The repository prepared for code agents is, at its core, a more honest repository about how the team works. It shows where there is automation, where there is convention and where human judgment is mandatory.

For the next assisted adoption, choose a repository and check if commands, conventions and boundaries are discoverable before activating the agent. If they are not, the first change is not in the product. It is in the repository itself.

If you want to discuss this decision in your company’s context, talk to dooop.

Further Reading

Sources

NEXT DECISION

Discussing Application in the Company

Conversation about the software company context

Content from dooop. Registration allows linking this topic to the reader’s journey and tracking interest in the subject.

Conversation about the software company context

We will use your details to deliver this content and contact you about related topics.