Skip to content

Commit ef7d8c8

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

File tree

1 file changed

+51
-15
lines changed

1 file changed

+51
-15
lines changed

AGENTS.md

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
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.
6+
Enabling users to define, install, and upgrade complex Kubernetes applications using charts.
7+
This document provides an overview of the codebase structure, development guidelines, and key patterns for contributors.
8+
9+
The codebase supports both a SDK for advanced users, and a CLI for direct end user usage.
10+
11+
The project is currently supporting v3 and v4 versions, based on on the `dev-v3` and `main` branches respectively.
12+
13+
## Build and test
14+
715
```bash
816
make build # Build binary
917
make test # Run all tests (style + unit)
@@ -14,35 +22,63 @@ golangci-lint run # Direct linting
1422
go test -run TestName # Specific test
1523
```
1624

17-
## Code Structure
18-
- `/cmd/helm/` - CLI entry point (Cobra-based)
19-
- `/pkg/` - Public API
25+
## Code structure
26+
27+
Major packages:
28+
29+
- `cmd/helm/` - CLI entry point (Cobra-based)
30+
- `pkg/` - Public API
2031
- `action/` - Core operations (install, upgrade, rollback)
2132
- `chart/v2/` - Stable chart format
2233
- `engine/` - Template rendering (Go templates + Sprig)
2334
- `registry/` - OCI support
2435
- `storage/` - Release backends (Secrets/ConfigMaps/SQL)
25-
- `/internal/` - Private implementation
36+
- `internal/` - Private implementations
2637
- `chart/v3/` - Next-gen chart format
2738

28-
## Development Guidelines
39+
## Development
40+
41+
## Compatibility
42+
43+
Changes are required to maintain backward compatibility as described in [HIP-0004: Document backwards-compatibility rules](https://helm.sh/community/hips/hip-0004).
44+
45+
Typically this means that:
46+
47+
- the signatures of public APIs ie. those in the `pkg/` directory should not change
48+
- CLI commands and parameters should not be removed or changed in a way that would break existing scripts or workflows
49+
- this includes CLI output
50+
- functional behaviour (as implied or documented) must not be modified in a way that would break existing users' expectations
51+
52+
### Code standards
2953

30-
### Code Standards
3154
- Use table-driven tests with testify
3255
- Golden files in `testdata/` for complex output
3356
- Mock Kubernetes clients for action tests
3457
- All commits must include DCO sign-off: `git commit -s`
3558

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

40-
### Dependencies
61+
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.
62+
Bug and security fixes are also backported to `dev-v3` where applicable.
63+
64+
Development branches:
65+
66+
- `main` - Helm v4
67+
- `dev-v3` - Helm v3 (backport security and bugfixes from main)
68+
69+
Release branches:
70+
71+
- `release-v3.X` - Release branches for v3.X versions
72+
- `release-v4.X` - Release branches for v4.X versions
73+
74+
### Major dependencies
75+
4176
- `k8s.io/client-go` - Kubernetes interaction
4277
- `github.com/spf13/cobra` - CLI framework
4378
- `github.com/Masterminds/sprig` - Template functions
4479

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
80+
### Key patterns
81+
82+
- **Actions**: High-level operations live in `pkg/action/`, typlically using a shared Configuration
83+
- **Chart versions**: Charts v2 (stable) in `pkg/charts/v2`, v3 (under development) in `internal/charts/v3`
84+
- **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)