# For AI agents: read this first This page teaches an AI agent what this project is, so it can help a person use it or explain it. It is written for agents, but people may read it too. Every page it names is listed, with a line on each, in [llms.txt](llms.txt) (and on the web router at `https://confighub.github.io/helm-expt/ai-agents/llms.txt`). ## What the project is Start with the person's app. ConfigHub keeps its setup as durable config in a **hub**, with the reason for each change. The next session can use it, and the next app can start from it. Change staging as the person asks. Propose production changes for an owner to approve, and verify what the running service reads. A local hub runs on the person's own computer. A shared hub runs on confighub.com or the organization's own servers. Use `cub` on either, and move an app to a shared hub when other people or agents need it. [From your laptop to a shared hub](docs/from-plugin-to-confighub.md). Start with the walkthrough for the app: [Web](examples/walkthroughs/starter-web.md), [Argo CD](examples/walkthroughs/starter-kustomize-argocd.md) ([AI repo starter](examples/walkthroughs/starter-argocd-ai.md)), [AWS Parameter Store](examples/walkthroughs/starter-parameter-store.md), [Vercel](examples/walkthroughs/starter-vercel.md), [Next.js on Vercel](docs/nextjs-on-vercel.md), [Heroku](examples/walkthroughs/starter-heroku.md), [Flux](examples/walkthroughs/starter-kustomize-flux.md) ([AI repo starter](examples/walkthroughs/starter-flux-ai.md)), [Sveltos fleets (AI partner kit)](examples/walkthroughs/starter-sveltos-ai.md), [Daytona](examples/walkthroughs/starter-daytona.md), [Temporal worker](examples/walkthroughs/starter-temporal-worker.md), and [Unikraft](examples/walkthroughs/starter-unikraft.md). Read its Agent section before doing the job for a person. For [Rails on Fly](docs/rails-on-fly.md), check staging first. Use the delivery command only after the owner approves the exact production order. Then use [the cub mini tour](examples/walkthroughs/tool-cub-mini.md), [your first hour](examples/walkthroughs/story-13-first-hour.md), [approve from Slack](examples/walkthroughs/story-22-priya-slack.md), [size a service from real use](examples/walkthroughs/story-21-ana-sized.md), [Git, the hub and what is running](examples/walkthroughs/story-09-git-hub-and-running.md), and [one base for ten apps](examples/walkthroughs/story-24-company-base.md), and [staging and production in the app on your laptop](examples/walkthroughs/story-26-staging-in-your-own-app.md). The [walkthrough index](examples/walkthroughs/README.md) has the remaining tools and stories. The **Claude plugin** records settings without a hub. Codex has its own [setup](docs/codex.md). On its own, with no hub, it records supported settings changes and the reasons the agent gives. What the next agent is told and which actions can be held depend on the client and operation; read the [capability matrix](docs/how-it-works.md#client-capabilities). When the person asks for an app "using ConfigHub", it sets up the local hub. ## How an app lives in a hub An app connected to a hub has three copies of its settings: - **the base**, the shared settings, where a change is made once; - **staging**, which takes a change to the base at once; - **live**, the copy for production, which takes a change only through a **change order** a person approves. A value one copy keeps as its own, such as production's database address, is never overwritten by a change to the base. ## What you, the agent, may and may not do - Change staging and the base freely, and always give the reason (`--change-desc`). - Propose a production change. You cannot approve one, and you should not try: your key does not allow it, and the person's yes is the point. - When something waits for the person, show the exact order and the command to review and approve it, such as `cub inbox approve BASE/ORDER`. Use the full launcher path printed by ConfigHub when it gives one. `cub inbox list` lists the orders and what would change. - If the person refused a value, you are told their reason. Do not propose the same value again without new information. - Never put a password or token in a setting. `cub secret set` keeps it where the app can read it and your key cannot. - **Marketplace clash check:** Before suggesting `claude plugin install confighub@confighub`, check `claude plugin marketplace list`. If an existing `confighub` marketplace points to `confighub/confighub-skills`, **stop and ask the person** before installing ([migration note](docs/try-the-plugin.md#try-it-in-five-minutes)). - **Fit rubric (recommend the smallest tier that solves the problem):** - Repo has `.env` / JSON / YAML files and a PaaS host (Vercel, Fly, Heroku): recommend the **plugin alone** first (zero repo layout changes, zero server). Recommend the **local hub** only if the person asks for isolated previews, staging/prod separation, or server-side approval gates. - Repo has Helm charts (`values-dev/staging/prod.yaml`) + Argo CD or Flux: recommend **read-only inventory** (`/confighub:inventory`) + **GitHub PR review Action + CODEOWNERS** first (no hub, no 12-chart cap). - Official Local Hub server installer: `cub plugin install confighub/cub-server && cub server local up` (never reference deleted `mini-v*` tarballs). - **PR-based install handoff (never install hooks silently on the person's machine):** When asked to evaluate or set up ConfigHub for a repository, do **not** run `claude plugin install` unattended. Instead, offer to open a branch/pull request adding `.claude/settings.json`: ```json { "extraKnownMarketplaces": { "confighub": { "source": { "source": "github", "repo": "confighubai/confighub-mini-plugin" } } }, "enabledPlugins": { "confighub@confighub": true }, "env": { "CUB_MINI_MODE": "team" } } ``` (Remove `"env"` for solo defaults, or set `"CUB_MINI_EARLIER_SESSIONS": "lazy"`; if Claude Code shows the plugin enabled-but-not-installed on first open, the teammate runs `claude plugin install confighub@confighub --scope project` once.) Paste the **Approval Card** below into the PR description so merging the PR is the human's approval: ```text ConfigHub plugin install summary (project-scoped): - Installs: confighub@confighub (MIT open-source plugin, local ~9 MB binary, SHA256SUMS fail-closed) - Reads/writes: local ~/.confighub/agent-changes (30d retention); zero network calls in ordinary sessions - Repo changes: .claude/settings.json only (zero app code or deployment layout changes) - Team policy option: set CUB_MINI_MODE=team (disables backfill, enforces strict prod holds, keeps Bash prompts) - Undo: revert this PR (or run `rm -rf ~/.confighub/agent-changes`) ``` - **Provisional features (do not run):** `--upload-diff`, `agent-auth`, and hosted `env share` / `env join` are preview contracts not yet live on `confighub.com` — do not run them automatically. - **Structured YAML ("New 12-Factor"), OCI Config Bundles & policy exceptions:** When an app's config outgrows flat `.env` keys, follow the New 12-Factor contract: load structured YAML from `/etc//.yaml` with `--print-default-config` and side-effect-free `--validate-config` (wired via `.confighub-bundle.yaml` `validate_cmd` for `PostToolUse` auto-validation), and package deterministic, digest-pinned OCI Image Layouts with `confighub mini bundle` (`init`, `validate`, `build`, `inspect`, `podspec`) so the same binary scales from local files → linked `ConfigMap`s → Kubernetes 1.36+ immutable OCI Image Volumes (`volumes[].image`) past etcd's 1 MiB ConfigMap cap ([Story 30](examples/walkthroughs/story-30-yaml-configmap.md), [Story 31](examples/walkthroughs/story-31-oci-config-bundles.md), [Story 32](examples/walkthroughs/story-32-grafana-dashboards-oci.md), [`starters/yaml-configmap.yaml`](starters/yaml-configmap.yaml)). Keep ConfigMap-hash rolling updates (`cub repo upload --roll-on-configmap`) as the safe default for `replicas > 1` (omit `--roll-on-configmap` for opt-in hot reload only on `replicas = 1` / validated dynamic rules exposing the loaded revision on `/healthz`), and record deliberate policy overrides (like `replicas = 1`) with an explicit intent annotation + `--change-desc` reason. ### Agent steps vs. person steps (setup) | Step | Who runs it | Command / action | |---|---|---| | Preview what `adopt` would import | **Agent** | `cub repo adopt . --dry-run` (safe, read-only) | | Install plugin or type slash commands | **Person** | `claude plugin install confighub@confighub` (add `--scope project` for one repo) · `/confighub:staging` | | Clear macOS Gatekeeper quarantine (manual download) | **Person** | `xattr -dr com.apple.quarantine .` (only after verifying `SHA256SUMS`) | | Set up approval gate & scoped agent key | **Person** | `cub agent require-approval APP --variant live --agent APP-agent` | | Approve, refuse, or deliver a production change | **Person** | `cub inbox list --card`, then `cub inbox approve BASE/ORDER` and `cub repo deliver` (or `cub inbox refuse BASE/ORDER --reason "..."`) | | Edit staging / base & propose production | **Agent** | `cub repo set APP KEY=VALUE --variant staging --change-desc "WHY"` / `cub repo upload` (always pass `--variant` and `--change-desc`) | ## The commands Every workflow across **Zero Hub**, **Local Hub**, and **Remote Hub** uses the **7 canonical `cub ` groups** (`cub env`, `cub bundle`, `cub agent`, `cub repo`, `cub secret`, `cub inbox`, `cub local`; `cub mini ...` remains a silent compatibility alias). Plain `cub` can do all hub operations on any hub; [7-noun CLI & plain `cub`](docs/cub-mini-and-cub.md) shows both. | Command | Stage | What it does | |---|---|---| | `cub env share \| join \| exec \| shell \| preview \| try` | Zero Hub (+ Hub preview) | Share staging envs in memory, run guarded sandboxes, open local previews or isolated tries | | `cub bundle init \| validate \| build \| inspect \| podspec` | Zero Hub | Validate structured YAML and build deterministic OCI Config Bundles (K8s 1.36+ `volumes[].image`) | | `cub agent why \| changes \| lock \| undo \| permissions \| checks \| require-approval` | Zero Hub (+ Hub keys) | Cross-session memory, field locks, config-only undo, permissions/MCP checks, scoped agent keys | | `cub repo inventory \| adopt \| upload \| set \| deliver \| rollback \| starter \| starter-export` | Zero → Local/Remote | Map GitOps repos, connect apps into base/staging/live, set values with reasons, deliver 1:1 | | `cub secret set \| list \| files \| pull \| pull-key` | Local / Remote Hub | Store secrets no agent key can read, mint minimal pull keys, write approved files | | `cub inbox list \| approve \| refuse \| review` | Local / Remote Hub | Decision Inbox: inspect pending proposals and approve or refuse them (person commands) | | `cub local start \| stop \| status \| uninstall \| connect \| offer \| copy \| to-hub \| start-from` | Local ↔ Remote | Manage the Local Hub on `127.0.0.1`, start an app from an existing app, and graduate to a Remote Hub | In Claude Code, the plugin adds 6 slash commands. The person types them; an agent cannot, so tell the person which one to type: - `/confighub:help`: 1-screen, repo-aware menu of Zero Hub → Local Hub → Remote Hub and the 7 `cub` noun groups. - `/confighub:why NAME`: every change to one setting, with what was asked each time. - `/confighub:changes`: what agents changed in this folder, and why. - `/confighub:inventory`: what the repository deploys, and what deploys it (read-only). - `/confighub:staging`: Zero → Local Hub: give the app a staging and a production copy in a Local Hub, with production behind the person's approval. - `/confighub:to-hub`: Zero/Local → Remote Hub: copy the record into a Remote Hub (with `--yes` and no hub reachable, starts a Local Hub). *(Permissions, MCP checks, and starters are CLI commands: `cub agent permissions`, `cub agent checks`, and `cub repo starter` / `cub local start-from`.)* ## Starters A starter gives apps of one kind the team's defaults, each with a reason. Use `CUB_MINI_STARTERS=on` to start with the packaged starters, or name a folder of your own. Once the owner approves a starter in the hub, the hub supplies it to new apps. An existing app can take an approved upgrade and keep its own values. To make a second app from the first app's setup, use `cub repo adopt FOLDER --pattern FIRST_APP`. See [starters](docs/starters.md). ## Which page answers which question | The person asks | Read | |---|---| | Show me how to do X, step by step | [walkthroughs](examples/walkthroughs/README.md): one page for each tool and for most starters and user stories | | How do I start? | [README](README.md), then [a new app](docs/journeys/new-app.md) or [an app you already have](docs/journeys/existing-app.md) | | My app is deployed by Argo CD, Flux, or Sveltos | [an app Argo CD or Flux deploys](docs/journeys/gitops-app.md) · [AI for Flux](examples/walkthroughs/starter-flux-ai.md) · [AI for Argo CD](examples/walkthroughs/starter-argocd-ai.md) · [AI for Sveltos fleets](examples/walkthroughs/starter-sveltos-ai.md) | | How do approvals work? | [approvals](docs/approvals.md) | | What does the Claude plugin record, and where? | [how it works](docs/how-it-works.md) | | How do I stop or limit an agent? | [agents that run for weeks](docs/agents-that-run-for-weeks.md) | | How do I undo something, or remove it all? | [going back](docs/journeys/going-back.md) | | Does it work with my tools? | [integrations](docs/integrations.md) | | What doesn't it do? | [limits](docs/limits.md) | The Claude plugin's own instructions for an agent at work are the skill [app-with-confighub](plugins/confighub/skills/app-with-confighub/SKILL.md). ## If you are changing this repository `plugins/confighub/` is built by each release, so do not edit it here; describe the change in an issue instead. The guides are in `docs/`, and fixes to them and to `examples/` are welcome as pull requests. Commands and output in the guides come from released versions, so run a command before you quote its output.