|
1 | 1 | # Repository Guidelines |
2 | 2 |
|
| 3 | +All rules in this document are requirements — not suggestions. ALWAYS follow them. |
| 4 | + |
3 | 5 | Nelm is a Go-based Kubernetes deployment tool, which deploys Helm charts, is compatible with Helm releases, and is an alternative to Helm. Nelm is built on top of a Helm fork ([werf/3p-helm](https://github.com/werf/3p-helm)) and is also used as the deployment engine of [werf](https://github.com/werf/werf). |
4 | 6 |
|
5 | | -## Commands |
| 7 | +## Commands (MANDATORY) |
| 8 | + |
| 9 | +ALWAYS use these `task` commands. NEVER use raw `go build`, `go test`, `go fmt`, or `golangci-lint` directly. |
6 | 10 |
|
7 | 11 | - `task build` — Build binary for current OS/arch to `./bin/`. Accepts `pkg=...` to build a specific package. |
8 | 12 | - `task format` — Run all formatters. Accepts `paths="./pkg/..."` to scope to a specific package. |
@@ -33,28 +37,28 @@ Nelm is a Go-based Kubernetes deployment tool, which deploys Helm charts, is com |
33 | 37 | - `internal/ts/` — TypeScript support (bundling, rendering). |
34 | 38 | - `internal/util/` — internal utility functions. |
35 | 39 |
|
36 | | -## Testing |
| 40 | +## Testing (MANDATORY) |
37 | 41 |
|
38 | | -- When writing new tests → use `testify` (`assert`, `require`, `suite`). |
39 | | -- When writing tests as an AI agent → name the file `*_ai_test.go`, add `//go:build ai_tests` build tag, prefix test functions with `TestAI_`. |
40 | | -- Place tests alongside source files, not in a separate directory. |
| 42 | +- ALWAYS use `testify` (`assert`, `require`) when writing new tests. |
| 43 | +- When writing tests as an AI agent → ALWAYS name the file `*_ai_test.go`, add `//go:build ai_tests` build tag, prefix test functions with `TestAI_`. |
| 44 | +- ALWAYS place tests alongside source files, not in a separate directory. |
41 | 45 | - Test helpers go in `helpers_test.go` (or `helpers_ai_test.go` for AI-written helpers). |
42 | 46 | - Test fixtures go in `testdata/` subdirectory next to the tests. |
43 | 47 | - Shared test helpers are in `internal/test/`. |
44 | 48 |
|
45 | | -## Work standards |
| 49 | +## Work standards (MANDATORY) |
46 | 50 |
|
47 | | -- Always use `task` commands for build/test/lint/format — never raw `go build`, `go test`, `go fmt`, or `golangci-lint` directly. |
48 | | -- When logging → use `log.Default` from `pkg/log`. Never use `fmt.Println`, `slog`, or `logrus` directly. |
49 | | -- Read and strictly follow the project code style defined in [CODESTYLE.md](CODESTYLE.md). |
50 | | -- Verify, don't assume — always check the actual state before making changes. |
51 | | -- Don't leave TODOs, stubs, or partial implementations. |
| 51 | +- ALWAYS use `task` commands for build/test/lint/format — NEVER raw `go build`, `go test`, `go fmt`, or `golangci-lint` directly. |
| 52 | +- ALWAYS use `log.Default` from `pkg/log` for logging. NEVER use `fmt.Println`, `slog`, or `logrus` directly. |
| 53 | +- ALWAYS read and strictly follow the project code style defined in [CODESTYLE.md](CODESTYLE.md). Every rule in it is a requirement. |
| 54 | +- ALWAYS verify, don't assume — check the actual state before making changes. |
| 55 | +- NEVER leave TODOs, stubs, or partial implementations. |
52 | 56 |
|
53 | | -## PR review guidelines |
| 57 | +## PR review guidelines (MANDATORY) |
54 | 58 |
|
55 | | -- Do not add new external dependencies without flagging to the user first. |
56 | | -- Do not introduce breaking user-facing changes (not API changes) unless they are hidden behind a feature flag. Flag to the user first. |
57 | | -- Do not introduce changes that may compromise security. Flag to the user first. |
| 59 | +- NEVER add new external dependencies without flagging to the user first. |
| 60 | +- NEVER introduce breaking user-facing changes (not API changes) unless they are hidden behind a feature flag. Flag to the user first. |
| 61 | +- NEVER introduce changes that may compromise security. Flag to the user first. |
58 | 62 |
|
59 | 63 | ## Related repositories |
60 | 64 |
|
|
0 commit comments