Astabyte

Design and engineering studio, Indonesia

All research

A repo that briefs its own agents

Context engineering

3 December 2026

We write AGENTS.md like the first day of a new teammate: a few hard rules, one index and a duty to report the impact.

Each of our repos has a file for coding agents: AGENTS.md or CLAUDE.md. The agent reads it before each task. A long file wastes context, and a vague file gives vague work. This is the pattern that works for us.

Keep the root file short

The root file has about ten rules. Each rule is a fact or a limit that the agent cannot find in the code: what the product sells, which parts are still placeholders, where secrets must not go and which command must pass before the work is complete.

Point to an index

The first rule says: read the guidelines index before you start. The index lists each other guide and map in the repo. The agent loads a guide only when the task touches that area.

Read the business rules first

Before the agent changes code, it searches the knowledge docs for the business rules and features that the request touches. If the request goes against a rule, the agent says so before it writes code.

Report the impact

After the change, the agent tells us which rules, features and areas the change affects. Then it updates those docs in the same branch. The docs and the code stay together.

Say who owns what

The root file belongs to a person. The agent changes it only when we ask, and it proposes the words first. The agent maintains all other guides. The core rules stay stable, and the details stay current.

Write it like the brief for a new teammate. Then make the agent keep it true.