|
| 1 | +# AGENTS.md — Burrito |
| 2 | + |
| 3 | +Monorepo for **Burrito**: a Kubernetes operator that automates Terraform (TACoS). |
| 4 | +This file is the canonical guidance for AI agents. `CLAUDE.md` is a symlink to it. |
| 5 | +Nested `AGENTS.md` files add directory-specific rules — read them when working in their scope. |
| 6 | + |
| 7 | +## Working Principles |
| 8 | + |
| 9 | +- **Think first.** State assumptions; if multiple interpretations exist, surface them instead of picking silently. If something is unclear, ask. |
| 10 | +- **Simplicity.** Minimum code that solves the problem. No speculative features, abstractions, or config that wasn't requested. |
| 11 | +- **Surgical changes.** Touch only what the task requires. Match existing style. Don't refactor or reformat unrelated code; flag dead code rather than deleting it. |
| 12 | +- **Verify.** Turn tasks into checkable goals and run the relevant build/test/lint command before claiming done. |
| 13 | + |
| 14 | +## Monorepo Map |
| 15 | + |
| 16 | +- `api/v1alpha1/` — CRD Go types (see nested AGENTS.md). **Codegen-sensitive.** |
| 17 | +- `internal/controllers/` — reconciliation logic, one package per resource (see nested AGENTS.md). |
| 18 | +- `ui/` — React/Vite/TS dashboard (see nested AGENTS.md). |
| 19 | +- `deploy/charts/burrito/` — Helm chart (see nested AGENTS.md). |
| 20 | +- `cmd/` — binary entrypoints. `hack/` — dev/build scripts. `manifests/` & `config/crd/bases/` — generated manifests. `testdata/` — fixtures. `docs/` — documentation. |
| 21 | + |
| 22 | +## Never Touch (generated / vendored) |
| 23 | + |
| 24 | +Do not read, edit, or use as reference: |
| 25 | + |
| 26 | +- `*zz_generated.deepcopy.go` (produced by `controller-gen`). |
| 27 | +- Lock files: `go.sum`, `ui/yarn.lock`. |
| 28 | +- Generated manifests in `config/crd/bases/` and `manifests/`. |
| 29 | + |
| 30 | +To change CRDs: edit `api/v1alpha1/*_types.go`, then run `make manifests` (and `make generate`). |
| 31 | + |
| 32 | +## Build & Validation |
| 33 | + |
| 34 | +- **Go:** `make build` · `make test` (spins up envtest + docker-compose — heavy) · `make vet` |
| 35 | +- **Lint (Go):** `golangci-lint run ./...` — there is no `make` target; it runs in CI ([.github/workflows/ci.yaml](.github/workflows/ci.yaml)). |
| 36 | +- **After API changes:** `make manifests && make generate` |
| 37 | +- **UI:** `yarn --cwd ui lint` · `yarn --cwd ui build` · `yarn --cwd ui format-check` |
| 38 | + |
| 39 | +## Go Style |
| 40 | + |
| 41 | +- Always check errors explicitly. Never `_ = err` or silently ignored returns. |
| 42 | +- No `panic()` in reconcilers — see `internal/controllers/AGENTS.md`. |
| 43 | + |
| 44 | +## Commits — Conventional Commits |
| 45 | + |
| 46 | +Format: `<type>(<scope>): <description>`. |
| 47 | + |
| 48 | +- **Types:** `feat`, `fix`, `chore`, `docs`, `test`, `refactor`. |
| 49 | +- **Scopes** (use the closest fit): `controller`, `api`, `ui`, `helm`, `ci`, `deps`, `docker`. Scope is optional when none applies. |
0 commit comments