Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# AGENTS.md

Guidance for AI coding agents working in this repository. Human contributors should also read [docs/contributing.md](docs/contributing.md), [docs/development.md](docs/development.md), and [docs/testing.md](docs/testing.md), which are the source of truth.

## Project summary

Config Sync synchronizes configurations and policies from a source of truth (Git repository, OCI image, or Helm chart) to a Kubernetes cluster, ensuring consistency at scale. It simplifies and automates configuration management across single or multi-cluster environments, managing both cluster-scoped and namespace-scoped resources.

**Key Technologies & Architecture:**
- **Language & Frameworks:** Go, Kubernetes, Kubebuilder / Controller Runtime, Kustomize.
- **Core Custom Resources:** `RootSync` (cluster-scoped synchronization) and `RepoSync` (namespace-scoped synchronization).
- **Reconciler Manager:** Controller component that manages the lifecycle of individual reconciler deployments.
- **Reconcilers:** Specialized controllers spawned for each sync target that watch the upstream source and apply manifests to the cluster.
- **Admission Webhook:** Validates configuration and state changes for Config Sync custom resources.
- **Nomos CLI:** Command-line interface for inspecting status, troubleshooting, and interacting with Config Sync deployments.

## Repository layout

| Path | What lives there |
| --- | --- |
| [cmd/](cmd/) | Main entrypoints for controllers (`reconciler-manager`, `reconciler`, `admission-webhook`) and the `nomos` CLI. |
| [pkg/](pkg/) | Core implementation logic: reconcilers, git/OCI sync logic, manifest parsers, validation logic, and webhook handlers. |
| [manifests/](manifests/) | Base Kubernetes manifests and Kustomize configurations used to deploy Config Sync components. |
| [e2e/](e2e/) | End-to-end test framework and test suites (Go-driven, runnable against kind or GKE). |
| [docs/](docs/) | Documentation for usage, installation, contributing, development, and testing. |
| [examples/](examples/) | Sample Git repositories and configurations used for tutorials and verification. |
| [scripts/](scripts/) | Shell scripts for CI, verification, and auxiliary build tasks. |
| [build/](build/) | Build setups, container entrypoints, base Dockerfiles, and build dependencies. |

When in doubt about ownership or review requirements, check the nearest `OWNERS` file.

## Build, test, lint

All primary build and testing workflows run through the [Makefile](Makefile). Prefer using `make` targets over invoking native tools directly to maintain consistency with CI.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not seeing the dependency bump rules described, I guess the agent is only counting in the build/test rules for now, not our customized maintenance logics. Is it now an option to deploy agents in the repo and help us bump the deps like Helm? It would be super nice to see a sample of that.


- `make build-cli` — Compiles the `nomos` CLI binary.
- `make build-manifests` — Generates deployment manifests into `.output/staging/oss`.
- `make build-images` — Builds required Docker container images for Config Sync controllers.
- `make config-sync-manifest` — Builds images and manifests from source in a single step.
- `make test` — Runs fast Go unit tests.
- `make test-e2e-kind` — Runs end-to-end validation against a local kind cluster (requires pre-installing kind via `make install-kind`).
Comment on lines +40 to +41
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The description for make test has been updated to accurately reflect that it includes linting and kustomization tests as defined in the Makefile (line 394). Additionally, make fmt-go is included in the list as it is a critical step for ensuring code style compliance before submission.

Suggested change
- `make test` — Runs fast Go unit tests.
- `make test-e2e-kind` — Runs end-to-end validation against a local kind cluster (requires pre-installing kind via `make install-kind`).
- `make test` — Runs unit tests, kustomization tests, and linting.
- `make test-e2e-kind` — Runs end-to-end validation against a local kind cluster (requires pre-installing kind via `make install-kind`).
- `make fmt-go` — Formats Go code using gofmt and goimports.


For detailed testing parameters (including running targeted E2E test regexes or reusing test cluster environments), consult [docs/testing.md](docs/testing.md).

## Agent Skills

Shared agent skills and custom automations for working in this repository should be organized within an `.agents/` directory following emerging repository standards.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The file is missing a newline at the end. It is a standard practice to end text files with a newline to ensure compatibility with various Unix tools and to avoid issues with diffs.

Suggested change
Shared agent skills and custom automations for working in this repository should be organized within an `.agents/` directory following emerging repository standards.
Shared agent skills and custom automations for working in this repository should be organized within an .agents/ directory following emerging repository standards.

107 changes: 0 additions & 107 deletions GEMINI.md

This file was deleted.