Skip to content

Commit 87604ca

Browse files
committed
chore: Improve AGENTS.md
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
1 parent 4a91f3a commit 87604ca

File tree

1 file changed

+57
-17
lines changed

1 file changed

+57
-17
lines changed

AGENTS.md

Lines changed: 57 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,88 @@
11
# AGENTS.md
22

33
## Overview
4-
Helm is a package manager for Kubernetes written in Go, supporting v3 (stable) and v4 (unstable) APIs.
54

6-
## Build & Test
5+
Helm is a package manager for Kubernetes written in Go. It enables users to define, install, and upgrade complex Kubernetes applications using charts.
6+
This document provides an overview of the codebase structure, development guidelines, and key patterns for contributors.
7+
8+
The codebase supports both a SDK for advanced users, and a CLI for direct end user usage.
9+
10+
The project currently supports Helm v3 and Helm v4 versions, based on the `dev-v3` and `main` branches respectively.
11+
12+
## Build and test
13+
714
```bash
815
make build # Build binary
916
make test # Run all tests (style + unit)
1017
make test-unit # Unit tests only
1118
make test-coverage # With coverage
12-
make test-style # Linting
13-
golangci-lint run # Direct linting
19+
make test-style # Linting (wraps golangci-lint)
1420
go test -run TestName # Specific test
1521
```
1622

17-
## Code Structure
18-
- `/cmd/helm/` - CLI entry point (Cobra-based)
19-
- `/pkg/` - Public API
23+
## Code structure
24+
25+
Major packages:
26+
27+
- `cmd/helm/` - CLI entry point, wires CLI flags to `pkg/cmd/` commands
28+
- `pkg/` - Public API
2029
- `action/` - Core operations (install, upgrade, rollback)
30+
- `cmd/` - Cobra command implementations bridging CLI flags to `pkg/action/`
2131
- `chart/v2/` - Stable chart format
2232
- `engine/` - Template rendering (Go templates + Sprig)
33+
- `kube/` - Kubernetes client abstraction layer
2334
- `registry/` - OCI support
35+
- `release/` - Release types and interfaces (`v1/`, `common/`)
36+
- `repo/` - Chart repository indexing and interaction
2437
- `storage/` - Release backends (Secrets/ConfigMaps/SQL)
25-
- `/internal/` - Private implementation
38+
- `internal/` - Private implementations
2639
- `chart/v3/` - Next-gen chart format
40+
- `release/v2/` - Release package for chart v3 support
41+
42+
## Development
43+
44+
### Compatibility
45+
46+
Changes are required to maintain backward compatibility as described in [HIP-0004: Document backwards-compatibility rules](https://helm.sh/community/hips/hip-0004).
47+
48+
Typically this means that:
2749

28-
## Development Guidelines
50+
- the signatures of public APIs ie. those in the `pkg/` directory should not change
51+
- CLI commands and parameters should not be removed or changed in a way that would break existing scripts or workflows
52+
- functional behaviour (as implied or documented) must not be modified in a way that would break existing users' expectations
53+
54+
An exception to the above is where incompatiby changes are needed to fix a security vulnerability, where minimal breaking changes may be made to address the issue.
55+
56+
### Code standards
2957

30-
### Code Standards
3158
- Use table-driven tests with testify
3259
- Golden files in `testdata/` for complex output
3360
- Mock Kubernetes clients for action tests
3461
- All commits must include DCO sign-off: `git commit -s`
3562

3663
### Branching
37-
- `main` - Helm v4 development
38-
- `dev-v3` - Helm v3 stable (backport from main)
3964

40-
### Dependencies
65+
Standard workflow is for PR development changes to the `main` branch. Minor release branches are cut from `main`, then maintained for critical fixes via patch releases.
66+
Bug and security fixes are also backported to `dev-v3` where applicable.
67+
68+
Development branches:
69+
70+
- `main` - Helm v4
71+
- `dev-v3` - Helm v3 (backport security and bugfixes from main)
72+
73+
Release branches:
74+
75+
- `release-v3.X` - Release branches for v3.X versions
76+
- `release-v4.X` - Release branches for v4.X versions
77+
78+
### Major dependencies
79+
4180
- `k8s.io/client-go` - Kubernetes interaction
4281
- `github.com/spf13/cobra` - CLI framework
4382
- `github.com/Masterminds/sprig` - Template functions
4483

45-
### Key Patterns
46-
- **Actions**: Operations in `/pkg/action/` use shared Configuration
47-
- **Dual Chart Support**: v2 (stable) in `/pkg/`, v3 (dev) in `/internal/`
48-
- **Storage Abstraction**: Pluggable release storage backends
84+
### Key patterns
85+
86+
- **Actions**: High-level operations live in `pkg/action/`, typlically using a shared Configuration
87+
- **Chart versions**: Charts v2 (stable) in `pkg/chart/v2`, v3 (under development) in `internal/chart/v3`
88+
- **Plugins and extensibility**: Enabling additional functionality via plugins and extension points, such as custom template functions or storage backends is preferred over incorporating into Helm's codebase

0 commit comments

Comments
 (0)