Skip to content
ConfigHub for coding agents
Reference / examples/gitops-ai/flux/AGENTS.md Source on GitHub

Flux + ConfigHub Agent Instructions

This repository is reconciled by Flux and tracked by ConfigHub. Use each tool for the half it owns, never mix their responsibilities or bypass production approval.

Division of labor

Question or taskUseExamples
Live cluster reconciliation, health, events, suspend/resumeFlux CLI or Flux MCP server (flux-operator-mcp)flux get kustomizations -A, flux get helmreleases -A, flux diff kustomization orders
What this repo deploys, which folder maps to which Kustomization or HelmRelease, orphaned manifestsConfigHub plugin (read-only, no hub or cluster access needed)/confighub:inventory, confighub mini inventory .
Why a value was changed, cross-env diff, change history across sessionsConfigHub plugin or local/shared hub/confighub:why KEY, /confighub:changes, cub mini changes --why KEY
Staging edits & human-gated production releases (Kustomize repos)ConfigHub hub (kustomize-flux starter)cub mini upload APP --component APP --change-desc "WHY"

Rules for coding agents

  1. Start read-only. Before proposing any edit in a Flux repo, run /confighub:inventory (or confighub mini inventory .) to map every Kustomization, HelmRelease, and flux-system folder, and check Flux status (flux get all -A or Flux MCP) if a cluster context is active.
  2. Respect the HelmRelease vs. Kustomize boundary.

    • For HelmRelease-heavy repos, use ConfigHub read-only (inventory, values diff across environments, PR review comments) and keep Flux reconciling from Git. Do not propose switching a HelmRelease pipeline to rendered OCI delivery unless the person explicitly asks to migrate away from Helm releases.
    • For Kustomize repos, you may adopt with the kustomize-flux starter and propose changes via cub mini upload with a clear --change-desc.
  3. Never write directly to production clusters. Do not run kubectl apply, kubectl patch, flux reconcile on production to force an unapproved manifest, or cub mini approve / cub mini deploy-from-hub. Always leave the printed cub mini approve BASE/ORDER command for the human owner.
  4. Always state why. Every config edit or cub mini upload must include the business or operational reason so the next agent or on-call engineer can trace the change without digging through old chats.