From 4edf05096014f0cc67155917e2344871c41c1f35 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Mon, 13 Oct 2025 17:05:23 -0600 Subject: [PATCH] feature: create copilot structured context Signed-off-by: Terry Howe --- .github/copilot-instructions.md | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..5232bbc82 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,48 @@ +# Copilot Instructions for Helm + +## Overview +Helm is a package manager for Kubernetes written in Go, supporting v3 (stable) and v4 (unstable) APIs. + +## Build & Test +```bash +make build # Build binary +make test # Run all tests (style + unit) +make test-unit # Unit tests only +make test-coverage # With coverage +make test-style # Linting +golangci-lint run # Direct linting +go test -run TestName # Specific test +``` + +## Code Structure +- `/cmd/helm/` - CLI entry point (Cobra-based) +- `/pkg/` - Public API + - `action/` - Core operations (install, upgrade, rollback) + - `chart/v2/` - Stable chart format + - `engine/` - Template rendering (Go templates + Sprig) + - `registry/` - OCI support + - `storage/` - Release backends (Secrets/ConfigMaps/SQL) +- `/internal/` - Private implementation + - `chart/v3/` - Next-gen chart format + +## Development Guidelines + +### Code Standards +- Use table-driven tests with testify +- Golden files in `testdata/` for complex output +- Mock Kubernetes clients for action tests +- All commits must include DCO sign-off: `git commit -s` + +### Branching +- `main` - Helm v4 development +- `dev-v3` - Helm v3 stable (backport from main) + +### Dependencies +- `k8s.io/client-go` - Kubernetes interaction +- `github.com/spf13/cobra` - CLI framework +- `github.com/Masterminds/sprig` - Template functions + +### Key Patterns +- **Actions**: Operations in `/pkg/action/` use shared Configuration +- **Dual Chart Support**: v2 (stable) in `/pkg/`, v3 (dev) in `/internal/` +- **Storage Abstraction**: Pluggable release storage backends