Stop Pasting Your Whole Repo Into the Agent
Описание и применение
Ограничьте начальный контекст, используя короткий манифест файлов, чтобы агент фокусировался на ключевых файлах и мог запрашивать дополнительные при необходимости, тем самым снижая риск ошибок.
Задача
Agents often receive too much undifferentiated context when developers paste entire repositories, causing the model to dilute relevant signals and make incorrect edits.
Результат
Limiting initial context to a curated set of files reduces noise, enables the agent to ask clarifying questions, and prevents incorrect edits across large codebases.
Рабочий процесс
- Create a short AGENT_CONTEXT.md manifest mapping task types to key files.
- Include a read_first list of the most relevant files and a don_not_inject list of non‑essential files.
- Use the manifest to supply only the specified files to the agent on the first turn.
- Allow the agent to ask for additional files if needed.
- Mark the authoritative source (e.g., contract, schema, migration, invariant test) explicitly.
- Avoid auto‑attaching large reference files like README.
- Iterate the manifest weekly based on high‑frequency tasks.
Доказательства
Instead of pasting files reactively, maintain a short file-level manifest that maps a task type to the files the agent should read first.
The failure mode isn't "not enough context." It's "too much undifferentiated context."
For API work specifically, the highest-leverage artifact isn't any code file — it's the contract.
- Дата записи: 2026-10-10T01:41:00.237Z