Skip to content

Commit 3e83b48

Browse files
committed
chore: make AI instructions stronger
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
1 parent 885cba0 commit 3e83b48

File tree

3 files changed

+39
-27
lines changed

3 files changed

+39
-27
lines changed

AGENTS.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Repository Guidelines
22

3+
All rules in this document are requirements — not suggestions. ALWAYS follow them.
4+
35
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).
46

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.
610

711
- `task build` — Build binary for current OS/arch to `./bin/`. Accepts `pkg=...` to build a specific package.
812
- `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
3337
- `internal/ts/` — TypeScript support (bundling, rendering).
3438
- `internal/util/` — internal utility functions.
3539

36-
## Testing
40+
## Testing (MANDATORY)
3741

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.
4145
- Test helpers go in `helpers_test.go` (or `helpers_ai_test.go` for AI-written helpers).
4246
- Test fixtures go in `testdata/` subdirectory next to the tests.
4347
- Shared test helpers are in `internal/test/`.
4448

45-
## Work standards
49+
## Work standards (MANDATORY)
4650

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.
5256

53-
## PR review guidelines
57+
## PR review guidelines (MANDATORY)
5458

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.
5862

5963
## Related repositories
6064

CLAUDE.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
# Claude Code Instructions
22

3-
Follow @AGENTS.md for universal project guidelines.
3+
ALWAYS strictly follow @AGENTS.md for universal project guidelines.
44

5-
## Exploring the codebase
5+
## Exploring the codebase (MANDATORY)
66

7-
- To find definitions, references, callers, or implementations → use **LSP** (`goToDefinition`, `findReferences`, `incomingCalls`/`outgoingCalls`, `workspaceSymbol`).
8-
- To find code by intent or understand how something works → use **CodeAlive MCP** (`codebase_search`, `codebase_consultant`). Call `get_data_sources` first.
9-
- To explore broad architecture across many files → use **Task/Explore** subagent as a last resort.
7+
These are NOT suggestions — they are requirements. NEVER skip them in favor of Grep/Glob.
108

11-
## External documentation
9+
- ALWAYS use **LSP** (`goToDefinition`, `findReferences`, `incomingCalls`/`outgoingCalls`, `workspaceSymbol`) to find definitions, references, callers, or implementations. NEVER use Grep for these — LSP is precise, Grep is a guess.
10+
- ALWAYS use **CodeAlive MCP** (`codebase_search`, `codebase_consultant`) to find code by intent or understand how something works. Call `get_data_sources` first. NEVER substitute this with Grep-based keyword searching when the query is semantic/intent-based.
11+
- Only fall back to **Grep/Glob** for simple literal pattern matching (e.g., finding a specific string, config key, or error message).
12+
- Only use **Task/Explore** subagent as a last resort when the above tools are insufficient.
1213

13-
- To look up documentation for any technology, library, or tool → use **Context7 MCP** (`resolve-library-id` + `query-docs`).
14+
## External documentation (MANDATORY)
1415

15-
## E2E testing
16+
These are NOT suggestions — they are requirements. NEVER skip them in favor of Grep.
1617

17-
After making changes, verify them end-to-end against the local dev cluster:
18+
- ALWAYS use **LSP** `hover` to look up documentation, type signatures, and godoc for any symbol in the codebase (including symbols from external dependencies).
19+
- ALWAYS use **Context7 MCP** (`resolve-library-id` + `query-docs`) to look up broader documentation, guides, or examples for any technology, library, or tool. NEVER guess at APIs — look them up.
20+
21+
## Verifying changes (MANDATORY)
22+
23+
After making changes, ALWAYS verify them end-to-end against the local dev cluster:
1824

1925
1. `task build` — build the binary.
2026
2. Run the built binary from `./bin/nelm` against the cluster to deploy/test.
21-
3. Use **Kubernetes MCP tools** (`mcp__kubernetes__*`) to inspect the cluster state — get resources, describe them, check logs, exec into pods, etc. Prefer these over raw `kubectl` via Bash.
27+
3. ALWAYS use **Kubernetes MCP tools** (`mcp__kubernetes__*`) to inspect the cluster state — get resources, describe them, check logs, exec into pods, etc. NEVER use raw `kubectl` via Bash when an MCP tool can do it.
2228

23-
## Code style
29+
## Code style (MANDATORY)
2430

25-
- When writing or modifying Go code, strictly follow @CODESTYLE.md.
31+
- ALWAYS strictly follow @CODESTYLE.md when writing or modifying Go code. Every rule in it is a requirement. Read it before writing any code if you haven't already in this session.

CODESTYLE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
> **AI agents**: all rules below are mandatory. NEVER deviate from them.
2+
13
## Design
24

35
* Prefer stupid and simple over abstract and extendable.

0 commit comments

Comments
 (0)