This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Kubernetes Custom Resource Definitions (CRDs) for Enterprise Contract Policies. Defines the EnterpriseContractPolicy CRD in the appstudio.redhat.com/v1alpha1 API group, used to configure policy sources, include/exclude rules, signing keys, and Rekor URLs for the Conforma (Enterprise Contract) validation system.
make generate # Regenerate DeepCopy methods and code after changing CRD types
make manifests # Regenerate CRD YAML manifests
make test # Run tests (also runs generate, fmt, vet first)
make build # Validate CRDs (runs generate, fmt, vet)
make docs # Generate Antora documentation from CRD types
make export-schema # Export JSON schema to dist/policy_spec.json
make install # Install CRDs to current kubectl cluster
make fmt # Run go fmt across all modules
make vet # Run go vet across all modulesMulti-module Go project:
api/v1alpha1/— CRD type definitions (enterprisecontractpolicy_types.go), generated DeepCopy code, and the published Go API moduleschema/— JSON schema generation from CRD typestools/— Build tool dependencies (controller-gen, kustomize) pinned via go.moddocs/— Antora documentation and example generation using crd-ref-docsconfig/crd/bases/— Generated CRD YAML manifestsconfig/samples/— Example EnterpriseContractPolicy resources
- Edit types in
api/v1alpha1/enterprisecontractpolicy_types.go - Run
make generateto update DeepCopy methods - Run
make manifeststo regenerate CRD YAML - Run
make testto validate - Commit both source changes and generated files
spec.sources— policy/data bundle URLs with per-source include/exclude config and ruleDataspec.configuration— global include/exclude rulesspec.publicKey— public key for signature validationspec.identity— keyless Sigstore verification settingsspec.rekorUrl— Rekor transparency log URL
All build tools run via go run -modfile tools/go.mod to use pinned versions — no global installs needed.