> ## Documentation Index
> Fetch the complete documentation index at: https://vietbui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Start small

> A coding-agent setup should start lean and grow only when something fails. This guide is that

# Start small

A coding-agent setup should start lean and grow only when something fails. This guide is that
starting point. Each step is small, and each links to the wiki pages that explain why. Nothing here
asks you to copy anyone's dotfiles: the [How I Work](https://vietbui.mintlify.site/guides/workflows.md) pages show one owner's
setup as an example, not a template.

The rule behind every step: **add a piece of setup in response to a failure you have seen, not one
you expect.** Setup you add up front is context the agent reads on every turn, and most of it never
earns its place ([context engineering](https://vietbui.mintlify.site/concepts/context-engineering.md)).

## 1. Know what you are configuring

A coding agent is a model, a loop and a set of tools. The harness is everything around the model:
instructions, tools, permissions, checks. You will mostly be tuning the harness.

Read: [minimal coding agent](https://vietbui.mintlify.site/syntheses/minimal-coding-agent.md),
[agent harness](https://vietbui.mintlify.site/concepts/agent-harness.md), [AI coding agents](https://vietbui.mintlify.site/entities/ai-coding-agents.md).

## 2. Write one short context file

One `AGENTS.md` (or `CLAUDE.md`) at the repo root. Put in only what the agent cannot work out from
the code: how to build and test, conventions that are not obvious, and the project's vocabulary.
Keep it short; long context files make agents worse, not better. Treat it as a map, not a manual.

Read: [agent context instructions](https://vietbui.mintlify.site/concepts/agent-context-instructions.md),
[AGENTS.md format](https://vietbui.mintlify.site/entities/agents-md-format.md), [domain glossary](https://vietbui.mintlify.site/concepts/domain-glossary.md).

## 3. A few rules, and when a rule becomes a hook

Start with a handful of rules. When the agent breaks the same rule twice, the rule belongs in
something that runs, not in prose: a hook, a permission setting, a linter. Security rules
especially: a "do not" sentence in a context file is not enforced by anything.

Read: [rules vs hooks](https://vietbui.mintlify.site/concepts/rules-vs-hooks.md),
[self-improving agent setup](https://vietbui.mintlify.site/concepts/self-improving-agent-setup.md) (its minimal recipe),
[design principles](https://vietbui.mintlify.site/patterns/principles.md) (YAGNI applies to setup too).

## 4. Plan before code, keep diffs small

Ask for a plan first on anything bigger than a one-file change, and keep each change small enough to
review. Agent mistakes hide in large diffs.

Read: [spec-driven frameworks vs native](https://vietbui.mintlify.site/comparisons/spec-driven-frameworks-vs-native.md),
[AI-specific pitfalls](https://vietbui.mintlify.site/concepts/ai-specific-pitfalls.md), [deep modules](https://vietbui.mintlify.site/concepts/deep-modules.md).

## 5. One verification step and one review step

Run the tests and the type-checker before calling anything done, and read the diff yourself. Passing
tests are weak evidence on their own: agents can write tests that pass for the wrong reason.

Read: [verification pipeline](https://vietbui.mintlify.site/concepts/verification-pipeline.md),
[agent test verification](https://vietbui.mintlify.site/concepts/agent-test-verification.md),
[AI code review](https://vietbui.mintlify.site/concepts/ai-code-review.md), [unit testing](https://vietbui.mintlify.site/concepts/unit-testing.md).

## 6. A safety baseline

Run the agent with the narrowest permissions that still let it work, inside a sandbox when it runs
commands unattended. Treat anything it reads from the web or from files as possible instructions
from someone else.

Read: [sandbox controls](https://vietbui.mintlify.site/concepts/agentic-sandbox-controls.md),
[indirect prompt injection](https://vietbui.mintlify.site/concepts/indirect-prompt-injection.md),
[OWASP AI agent risks](https://vietbui.mintlify.site/concepts/owasp-ai-agent-risks.md).

## 7. Keep long sessions healthy

Long sessions degrade. Clear or compact at natural break points, and write the state you need into
files so a fresh session can pick it up.

Read: [context window](https://vietbui.mintlify.site/concepts/context-window.md),
[context degradation](https://vietbui.mintlify.site/concepts/context-degradation.md),
[context compression](https://vietbui.mintlify.site/concepts/context-compression.md), [prompt caching](https://vietbui.mintlify.site/concepts/prompt-caching.md).

## 8. Add skills, subagents and hooks only when a failure repeats

Skills, subagents, plugins and model routing are each an answer to a specific problem. Reach for one
when you have that problem twice. A single loop with good tools beats a team of agents more often
than it seems.

Read: [agent skills](https://vietbui.mintlify.site/concepts/agent-skills.md), [subagents](https://vietbui.mintlify.site/concepts/agent-subagents.md),
[choosing an agent primitive](https://vietbui.mintlify.site/syntheses/agent-primitive-selection.md),
[subagent cost model](https://vietbui.mintlify.site/concepts/subagent-cost-model.md),
[model tier routing](https://vietbui.mintlify.site/concepts/model-tier-routing.md).

## 9. Learn from mistakes, and prune

Keep a short lessons file. When a lesson keeps coming back, promote it into enforcement (step 3).
Cap the file and prune it: rules that no longer fire are noise.

Read: [self-improving agent setup](https://vietbui.mintlify.site/concepts/self-improving-agent-setup.md),
[compound engineering](https://vietbui.mintlify.site/concepts/compound-engineering.md),
[agent self-correction](https://vietbui.mintlify.site/concepts/agent-self-correction.md).

## 10. Scale out later

Parallel agents, worktrees, multi-model review and long autonomous loops pay off once the basics
above hold. Add them one at a time.

Read: [worktree isolation](https://vietbui.mintlify.site/concepts/worktree-isolation.md),
[branch strategy for agents](https://vietbui.mintlify.site/concepts/branch-strategy-for-agents.md),
[agent teams](https://vietbui.mintlify.site/concepts/agent-teams.md), [council pattern](https://vietbui.mintlify.site/concepts/council-pattern.md),
[Ralph loop](https://vietbui.mintlify.site/concepts/ralph-loop.md), [agentic CI/CD](https://vietbui.mintlify.site/concepts/agentic-cicd.md).

## See one setup grown this way

The [How I Work](https://vietbui.mintlify.site/guides/workflows.md) section shows where one owner's setup ended up after many rounds
of this: [architecture](https://vietbui.mintlify.site/guides/architecture.md), [workflows](https://vietbui.mintlify.site/guides/workflows.md) and
[send-it](https://vietbui.mintlify.site/guides/send-it.md). Borrow what solves a failure you have; skip the rest.

Knowledge graph (visual). The same links are listed under Linked pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.