agentleFS
databus23databus23/helm-diff/.github/copilot-instructions.md

helm-diff

Copilot instructions3.5k starsChanged 3 days agoApache-2.0View on GitHub

Helm Diff is a Go-based Helm plugin that provides diff functionality for comparing Helm charts and releases. It shows what changes would occur during helm upgrade, rollback, or between different releases/revisions. Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here. Prerequisites: - Go >= 1.27 (currently uses Go 1.27.1) - Helm v3 (tested with v3.17.4 and v3.18.6) Build Process: - Build the plugin: make…

We split this copilot-instructions.md into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does …

    line 5
  2. Distinctive:

    NEVER CANCEL builds. Set timeout to 2+ minutes for build operations.

    line 15
  3. Very specific:

    Run unit tests: make test - includes coverage analysis.

    line 18
  4. Very specific:

    Test coverage is generated in cover.out with detailed function-level coverage reports.

    line 20
  5. Very specific:

    ALWAYS run make format and make lint before committing changes.

    line 26
  6. Very specific:

    Always run tests after modifying cmd/ or diff/ packages

    line 84
  7. Very specific:

    Check plugin.yaml version if making release changes

    line 85
  8. Very specific:

    Verify Makefile targets if changing build process

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Helm Diff Plugin

Helm Diff is a Go-based Helm plugin that provides diff functionality for comparing Helm charts and releases. It shows what changes would occur during helm upgrade, rollback, or between different releases/revisions.

Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.

Working Effectively

Prerequisites:

  • Go >= 1.27 (currently uses Go 1.27.1)
  • Helm v3 (tested with v3.17.4 and v3.18.6)

Build Process:

  • Build the plugin: make build - includes linting and compiles the binary.
  • NEVER CANCEL builds. Set timeout to 2+ minutes for build operations.

Testing:

  • Run unit tests: make test - includes coverage analysis. Takes ~12 seconds. NEVER CANCEL - set timeout to 3+ minutes.
  • Tests include comprehensive coverage (38.7% overall) and use a fake helm binary for isolation.
  • Test coverage is generated in cover.out with detailed function-level coverage reports.

Linting and Code Quality:

  • Local linting: make lint - runs gofmt, go vet. Takes ~2 seconds.
  • Code formatting: make format - applies gofmt formatting automatically. Takes <1 second.
  • Full golangci-lint runs only in CI via GitHub Actions, not available locally.
  • ALWAYS run make format and make lint before committing changes.

Plugin Installation:

  • Install as Helm plugin: make install or make install/helm - builds and installs to Helm plugins directory. Takes ~3 seconds.
  • The plugin installs via install-binary.sh script which handles cross-platform binary installation.

Validation Scenarios

ALWAYS test your changes with these scenarios:

  1. Basic Plugin Functionality:
    # Test the binary directly
    ./bin/diff version
    ./bin/diff --help
    ./bin/diff upgrade --help
  2. Real Chart Diffing:
    # Create a test chart and diff it
    cd /tmp && helm create test-chart
    cd /path/to/helm-diff
    HELM_NAMESPACE=default HELM_BIN=helm ./bin/diff upgrade --install --dry-run test-release /tmp/test-chart
  3. Plugin Installation Verification:
    # Test plugin installation
    export HELM_DATA_HOME=/tmp/helm-test
    make install
    /tmp/helm-test/plugins/helm-diff/bin/diff version

Build Times and Timeouts

CRITICAL: NEVER CANCEL long-running commands. Use these timeout values:

  • make build: ~9 seconds (set timeout: 3+ minutes)
  • make test: ~12 seconds (set timeout: 3+ minutes)
  • make lint: ~2 seconds (set timeout: 1 minute)
  • make format: <1 second (set timeout: 1 minute)
  • make install: ~3 seconds (set timeout: 2 minutes)

Common Tasks

Repository Structure:

  • main.go - Entry point that delegates to cmd package
  • cmd/ - Command-line interface implementation (upgrade, release, revision, rollback, version)
  • diff/ - Core diffing logic and output formatting
  • manifest/ - Kubernetes manifest parsing and handling
  • scripts/ - Build and verification scripts (gofmt, govet)
  • testdata/, */testdata/ - Test fixtures and mock data
  • plugin.yaml - Helm plugin configuration
  • install-binary.sh - Cross-platform installation script
  • Makefile - Build system with all common targets

Key Files to Check After Changes:

  • Always run tests after modifying cmd/ or diff/ packages
  • Check plugin.yaml version if making release changes
  • Verify Makefile targets if changing build process
  • Review install-binary.sh if modifying installation process

Environment Variables for Testing:

  • HELM_NAMESPACE - Kubernetes namespace for operations
  • HELM_BIN - Path to helm binary (for direct testing)
  • HELM_DIFF_USE_UPGRADE_DRY_RUN - Use helm upgrade --dry-run instead of template
  • HELM_DIFF_THREE_WAY_MERGE - Enable three-way merge diffing
  • HELM_DIFF_THREE_WAY_MERGE_MODE - Apply the three-way merge patch via the API server (auto/server) or locally (client)
  • HELM_DIFF_NORMALIZE_MANIFESTS - Normalize YAML before diffing
  • HELM_DIFF_OUTPUT_CONTEXT - Configure output context lines

CI/CD Information:

  • GitHub Actions runs on push/PR to master branch
  • Tests run on Ubuntu, macOS, Windows with multiple Helm versions
  • Integration tests use Kind (Kubernetes in Docker)
  • Linting uses golangci-lint via GitHub Actions (not available locally)
  • Cross-platform plugin installation is tested via Docker

Direct Binary Usage (for development):

# Build and test directly without Helm plugin installation
go build -o bin/diff -ldflags="-X github.com/databus23/helm-diff/v3/cmd.Version=dev"
HELM_NAMESPACE=default HELM_BIN=helm ./bin/diff upgrade --install --dry-run my-release ./chart-path

Common Commands Reference:

# Full development cycle
make build         # Build with linting  
make test          # Run all tests
make format        # Format code
make install       # Install as Helm plugin

# Validation
./bin/diff version                    # Check version
./bin/diff upgrade --help            # Check help
make test                           # Run test suite

Important Notes

  • The plugin supports Helm v3 only (v2 support was removed)
  • Uses Go modules for dependency management
  • Cross-platform support: Linux, macOS, Windows, FreeBSD
  • Multiple output formats: diff, simple, template, dyff
  • Supports both client-side and server-side dry-run modes
  • Includes three-way merge capabilities for advanced diffing
  • Plugin binary is named diff and installed as helm diff command

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 2 mentionsSep 2026: 4 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the databus23/helm-diff repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about databus23/helm-diff

The biggest 5 of 57 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 57

Talked about on GitHub, Stack Overflow and Hacker News (57 times).

On GitHub · 50

45 more on GitHub
  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.