Skip to content

Commit a67d5c1

Browse files
authored
docs: add AGENTS.md with guidelines for AI coding agents (#122)
1 parent eb8b47f commit a67d5c1

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# AGENTS.md
2+
3+
## Always Keep in Mind
4+
5+
Act like a professional software developer and engineer. Adhere to architecture, naming conventions and coding standards in this codebase. If unsure, read similar files and get inspiration from the rest of the codebase. If introducing new features, make sure to cover them via unit tests and don't forget to take edge cases into account.
6+
7+
## Project Overview
8+
9+
Kubernetes operator (controller-runtime) for managing middleware updates for serverless functions deployed with the `func` CLI. Written in Go, uses Ginkgo/Gomega for tests.
10+
11+
## Testing Strategy
12+
13+
Before committing, test locally following the table below:
14+
15+
| If changed | Target | Description |
16+
|------------|--------|-------------|
17+
| `*.go` files | `make test` | Unit tests |
18+
| Any files | `make lint` | Linting |
19+
| `api/` types | `make manifests generate` | Regenerate CRDs and DeepCopy |
20+
| Significant changes | `make test-e2e` | E2E tests (Kind cluster with Gitea required) |
21+
22+
## Project Structure
23+
24+
- `api/v1alpha1/` - Function CRD types
25+
- `internal/` - controller and business logic
26+
- `test/e2e/` - e2e tests using in-cluster Gitea
27+
- `test/utils/` - e2e test helpers (RepositoryProvider, func CLI wrappers)
28+
- `hack/` - cluster setup scripts
29+
- `config/` - Kustomize manifests
30+
31+
## Boundaries
32+
33+
### Always Do
34+
35+
- Run `make test` before considering any change complete
36+
- Run `make lint` before commits
37+
- Run `make manifests generate` after modifying `api/` types
38+
- Read `CONTRIBUTING.md` for development setup and workflow
39+
40+
### Ask First
41+
42+
- Security-related code changes (authentication, credentials, secrets handling)
43+
- API changes
44+
- Adding new dependencies
45+
- Modifying CI/GitHub Actions workflows
46+
47+
### Never Do
48+
49+
- Commit secrets, API keys, or credentials
50+
- Delete files without explicit user approval
51+
- Force push to main/master branch
52+
- Skip tests or linting
53+
54+
## Important Documentation
55+
56+
Read these files to understand the project setup, conventions, and development workflow:
57+
58+
- `README.md` - user-facing usage, API reference table, installation
59+
- `CONTRIBUTING.md` - development setup, workflow, coding conventions
60+
- `docs/development/` - developer guides (e.g. Gitea integration, test patterns)
61+
62+
After implementing a feature or making significant changes, check whether these docs need updating. The API reference table in README.md must stay in sync with `api/v1alpha1/function_types.go`.

0 commit comments

Comments
 (0)