Skip to content
ConfigHub for coding agents
Reference / examples/walkthroughs/story-25-alice-bob-hardened.md Source on GitHub

Each fix Bob makes becomes where Alice's next app starts

Alice connects an app her agents built with a starter, the team's default settings for a kind of app, each with its reason. Bob hardens the running app on a key of his own, and the fixes that suit every app become the starter's version 2. Alice's second app starts with them, and her first app takes them while keeping its own values. Alice and Bob are fictional.

Quick start

You expand Show the full walkthrough below to run setup steps 1–3, then give your agent the hardening request below and review the shop change and shared starter separately (for a simpler single-owner second app without two roles, see a second app from the first). Your agent proposes each change, starts the cart from the approved starter and checks that the shop keeps its own settings.

You need: an unpacked confighub mini package (from the releases page) on macOS or Linux. No Docker, no account.

By handAsk your agent
Harden the appcub --context bob mini set shop REPLICAS=3 --variant base --change-desc "Three instances, so one can fail during a deploy and two still serve.", one per value (step 4)"Harden shop for production. Debug logs carry request bodies, so LOG_LEVEL should be warn; it needs 3 replicas so one can fail during a deploy; its database takes 20 connections (DB_POOL_SIZE). Then make the fixes that suit every web service version 2 of the team's web starter, each with its reason."
Make starter version 2Change the starter in starters-base and ask for it with a change order (step 5)Your agent can run the same command.
Approve version 2cub mini approve starters-base/web-v2 --note "Read it: Bob's fixes, for every web service" --yesYou approve it yourself.
Next app starts with itcub mini adopt cartYour agent can run the same command.
First app takes itcub mini upgrade pattern-web/web-service --change-desc "Version 2 of the web starter: Bob's fixes" --fleetYour agent can run the same command.

The first app keeps its own values, and its production waits for Alice's approval.

Without ConfigHub: your agent edits each app's .env file and the team's starter file separately, production included, and the next session has no record of why.

Deeper dive

The rest of this page is the full version: every command with what it prints, how Bob's key is set up, what an agent leaves to you, and how this was tested.

Show the full walkthrough

Human

For a person following along in a terminal. Alice is the hub's owner; Bob is a second key on the same hub.

What you need

An unpacked confighub mini package (from the releases page) on macOS or Linux. The local hub is a hub, a small ConfigHub server that keeps each setting with who changed it and why, running on your computer only. No Docker, no account.

Steps

  1. Set up a terminal and start a hub. CUB_MINI_STARTERS=on switches starters on, with the hub as where they are kept:
    export MINI=/absolute/path/to/unpacked-confighub-mini
    export PATH="$MINI/bin:$PATH"
    export CUB_CONFIG="$HOME/.confighub-walkthrough"
    unset CUB_CONTEXT
    "$MINI/bin/confighub-mini-app" mini install-plugin "$CUB_CONFIG" >/dev/null
    cub mini install --name alice --use >/dev/null
    export CUB_MINI_STARTERS=on
  2. The files: shop, which Alice's agents wrote, and a copy of the package's web starter as a file, for reading (the package's folder is the one in step 1):
    mkdir -p ~/walkthrough/team-starters && cd ~/walkthrough
    cp /absolute/path/to/unpacked-confighub-mini/starters/web.yaml team-starters/
    mkdir shop && printf 'PORT=3000\nLOG_LEVEL=debug\nRELEASE=shop-1.0.0\nDB_POOL_SIZE=5\n' > shop/.env && printf 'LOG_LEVEL=error\n' > shop/.env.production
  3. Alice connects shop in one action. The first time, the package's starters go into the hub as version 1, kept as a Component, starters, whose approved copy is the Space starters-approved; they wait for her, and she reads and approves them, then production's settings. Then she gives Bob a key of his own, which can change shop's base and staging and propose starter versions and production changes, but approve nothing:
    cub mini adopt shop
    cub variant approve starters-approved --all --note "Read them" >/dev/null
    cub mini approve shop-base/adopt --note "What the agents built" --yes >/dev/null
    cub mini require-approval shop --variant live --agent bob >/dev/null
    BOB=$(cub serviceaccount get bob -o jq=.ServiceAccount.UserID)
    cub space update starters-base --permission View:$BOB --permission ViewChildren:$BOB --permission Edit:$BOB --permission EditChildren:$BOB --quiet
    cub space update starters-approved --permission View:$BOB --permission ViewChildren:$BOB --permission Use:$BOB --permission UseChildren:$BOB --quiet
    Starter: your hub keeps no starters, so the package's 8 (daytona, kustomize-argocd, kustomize-flux, parameter-store, temporal-worker, unikraft, vercel, web) are now in it, as version 1, waiting for your approval: the Component starters, whose approved Variant is the Space starters-approved. Until you approve them, adopt uses the package's files. Read them with cub unit list --space starters-approved, and approve them, which is for the person to do, not an agent, with:
    …
      Sets REPLICAS=2, as a setting: Two instances, so that one can restart without the service going down.
    …
      Leaves LOG_LEVEL alone: it is set already, LOG_LEVEL=debug, by you, in .env.
      Leaves LOG_LEVEL alone in live: it is set already, LOG_LEVEL=error, by you, in .env.production.
  4. Bob hardens shop on his key, each value with his reason:
    cub --context bob mini set shop LOG_LEVEL=warn --variant base --change-desc "Debug logs carry request bodies; warn keeps what an incident needs." | tail -1
    cub --context bob mini set shop REPLICAS=3 --variant base --change-desc "Three instances, so one can fail during a deploy and two still serve." | tail -1
    cub --context bob mini set shop DB_POOL_SIZE=20 --variant base --change-desc "This shop's database takes twenty connections." | tail -1
    Production keeps its own LOG_LEVEL=error, so this change does not reach it.
      ~/.confighub-walkthrough/mini/cub mini approve shop-base/upload-20261114-170614-g250
      ~/.confighub-walkthrough/mini/cub mini approve shop-base/upload-20261114-170618-3c3c
  5. Bob's first two fixes suit every web service; the pool size is shop's alone. The starter is data, so each default is one change in starters-base, with his reason, the first raising the version to 2. He asks for them in starters-approved with a change order; his own approval is refused, and Alice reads it and approves:
    cub --context bob function set --space starters-base --unit web --toolchain AppConfig/YAML --change-desc "Debug logs carry request bodies; warn keeps what an incident needs." -- set-yq '.version = 2 | (.defaults[] | select(.key == "LOG_LEVEL") | .value) = "warn" | (.defaults[] | select(.key == "LOG_LEVEL") | .reason) = "Debug logs carry request bodies; warn keeps what an incident needs."' >/dev/null
    cub --context bob function set --space starters-base --unit web --toolchain AppConfig/YAML --change-desc "Three instances, so one can fail during a deploy and two still serve." -- set-yq '(.defaults[] | select(.key == "REPLICAS") | .value) = "3" | (.defaults[] | select(.key == "REPLICAS") | .reason) = "Three instances, so one can fail during a deploy and two still serve."' >/dev/null
    cub --context bob changeorder create --space starters-base web-v2 --in-scope-space starters-approved --change-workflow workflows/starters-approved-approval --description "Version 2 of the web starter" >/dev/null
    cub --context bob mini approve starters-base/web-v2 --yes || true
    cub mini approve starters-base/web-v2 --note "Read it: Bob's fixes, for every web service" --yes | tail -1
    Done. Each copy kept its own values.
    cub mini: ConfigHub did not take your approval: only a person named as an approver for starters-approved can approve this change, and bob is not one. Nothing was changed
  6. Alice's second app, cart, is born with Bob's fixes:
    mkdir cart && printf 'PORT=3100\nRELEASE=cart-1.0.0\n' > cart/.env
    cub mini adopt cart
    Starter: web (version 2, starters-approved/web revision 3): A small web service whose settings are in a .env, app.env or compose file, made from adopt's starter pattern.
    …
      Sets LOG_LEVEL=warn, as a setting: Debug logs carry request bodies; warn keeps what an incident needs.
      Sets REPLICAS=3, as a setting: Three instances, so one can fail during a deploy and two still serve.
  7. Every app made from the starter takes version 2 in one command: each app's staging at once, and each app's production by a change order of its own. What waits for Alice on shop keeps production's own log level:
    cub mini upgrade pattern-web/web-service --change-desc "Version 2 of the web starter: Bob's fixes" --fleet
    cub mini waiting
    2 apps took pattern-web/web-service's version 4.
    …
    Staging took it now: cart, shop.
    …
      Approving it changes production:
        REPLICAS: 2 → 3
        DB_POOL_SIZE: 5 → 20
      Production keeps its own value for these, so approving does not change them there:
        LOG_LEVEL=error
  8. Alice approves shop's production. It has Bob's fixes and still her own log level:
    orders=$(cub mini waiting --commands | sed -nE 's|^[[:space:]]*cub mini approve (shop-base/fleet-[A-Za-z0-9-]+)([[:space:]].*)?$|\1|p; s|^[[:space:]]*cub variant approve [^[:space:]]+ --change-order (shop-base/fleet-[A-Za-z0-9-]+)([[:space:]].*)?$|\1|p'); count=$(printf '%s\n' "$orders" | awk 'NF {n++} END {print n+0}'); test "$count" -eq 1 && cub mini approve "$orders" --note "Read Bob's fixes" --yes >/dev/null
    cub unit data --space shop-live app
    PORT=3000
    LOG_LEVEL=error
    REPLICAS=3
    …
    DB_POOL_SIZE=20

Undo it

cub mini uninstall --name alice --delete-data; then delete ~/walkthrough and ~/.confighub-walkthrough.

What you have now

A starter whose version 2 is Bob's fixes with his reasons, approved by Alice; a second app born with them; and a first app that took them with its own values kept: shop's pool size stays its own and is not in the starter, and production's log level stays Alice's. cub mini receipts shop --setup lists who set each value and why. The full story adds a customer who runs the app with a hub and the starter inside and keeps their own changes through version 3, and Alice and Bob on two machines with a hub both reach. Starters covers starters kept in a hub.

Agent

For an AI agent working as Bob, on Bob's key: run cub as cub --context bob.

  • The request: "Harden shop for production. Debug logs carry request bodies, so LOG_LEVEL should be warn; it needs 3 replicas so one can fail during a deploy; its database takes 20 connections (DB_POOL_SIZE). Then make the fixes that suit every web service version 2 of the team's web starter, each with its reason."
  • Edit all the shared settings together in shop/.env: set LOG_LEVEL=warn, REPLICAS=3 and DB_POOL_SIZE=20. Leave .env.production alone. Run cub mini upload shop/.env --component shop --change-desc "LOG_LEVEL: keep request bodies out of debug logs; REPLICAS: keep two serving during deploys; DB_POOL_SIZE: match this shop’s database capacity" once on Bob's key. The app gets one production order whose reason names each setting. Calling cub mini set separately can open extra production orders.
  • Make version 2 of the starter: one cub function set --space starters-base --unit web --toolchain AppConfig/YAML --change-desc WHY -- set-yq '...' for each default that suits every app (not shop's own DB_POOL_SIZE), the first also setting .version = 2; then a change order in starters-base with --in-scope-space starters-approved --change-workflow workflows/starters-approved-approval.
  • Wait for Alice to review the app rollout and the reusable starter separately. Give her one command to run when she is ready: cub mini review-orders SHOP-BASE/ORDER starters-base/web-v2. Replace SHOP-BASE/ORDER with the exact shop order from upload and use the full owner launcher path it printed. This opens both orders in one terminal view. She can approve, refuse with a reason, or leave each for later. Give the review command once. If the installed package predates review-orders, give her the two exact cub mini approve SPACE/ORDER commands. Do not offer another app while those decisions are waiting.
  • Done when cub unit data --space shop-base app has the three values and the proposed starter has version: 2 with warn and "3".

Testing

This proves: the settings and the starter's versions were stored in the hub, each value with who set it and why, and production's copy changed only by an approved change order. What was really used: The local hub on this computer (no stand-in, no cluster, no real service), with Bob as a second key and Alice's approvals made by the scripted steps, not a person; nothing is delivered and no service runs. A correct agent result has Bob's three values on shop's base and a proposed version 2 of the starter with the two fixes for every app, and without shop's pool size. It leaves exactly one app order and a separate starter order, both pending; the production log level and pool size stay as they were. The next-app offer belongs after the owner has approved the starter and used it across both apps. The agent task here ends with proposals, so that later moment is outside its scope. The checks below can be run by hand, in bash, in the walkthrough's folder:

Harden shop for production. Debug logs carry request bodies, so LOG_LEVEL should be warn; it needs 3 replicas so one can fail during a deploy; its database takes 20 connections (DB_POOL_SIZE). Then make the fixes that suit every web service version 2 of the team's web starter, each with its reason.

cub unit data --space shop-base app | grep -qx 'DB_POOL_SIZE=20' && cub unit data --space shop-base app | grep -qx 'REPLICAS=3' && cub unit data --space starters-base web | grep -q '^version: 2' && cub unit data --space starters-base web | grep -q 'value: warn' && ! cub unit data --space starters-base web | grep -q DB_POOL_SIZE && cub unit data --space shop-live app | grep -qx 'LOG_LEVEL=error' && cub unit data --space shop-live app | grep -qx 'DB_POOL_SIZE=5' && cub mini waiting --all -o json | jq -e '[.waiting[] | select(.order | startswith("shop-base/"))] | length == 1' && cub mini waiting --all -o json | jq -e '[.waiting[] | select(.order == "starters-base/web-v2")] | length == 1'
g(){ grep -rlsE "^[ -]*\"?$1\"?[=:] *\"?$2" --exclude-dir='.*' --exclude-dir=Library * .env* 2>/dev/null; }; g DB_POOL_SIZE 20 | grep -q shop && grep -rlsE '^version: 2' --exclude-dir='.*' team-starters | grep -q . && ! grep -rqs DB_POOL_SIZE team-starters
Test results

Results, 14 November 2026, confighub mini 0.11.1-mini.2. Figures from this page's own test runs, shown here for whoever checks the page; they are not a promise.

  • Scripted run (on confighub mini 0.11.1-mini.2, 14 November 2026): passed, 63 seconds for the steps, within the page's budget of 300.
  • Scripted run (on confighub mini 0.11.1-mini.7, 14 November 2026): passed, 56 seconds for the steps, within the page's budget of 300; each of the three planted faults (a changed quoted line, a budget of zero seconds, a check that holds on a fresh hub) was caught.
  • Agent runs: a pilot, 3 runs per arm on each of claude-sonnet-5-5, claude-opus-5-5. Arms: a is ordinary tools only; b is the Claude plugin, the local hub and this page as reading.
ArmModelChecks passedMedian secondsMedian costCommands left for the person (median)
aclaude-opus-5-53/338.6$0.1770
bclaude-opus-5-53/336.0$0.2082
aclaude-sonnet-5-52/318.9$0.0770
bclaude-sonnet-5-53/324.6$0.092

No agent approved or refused a change to production.

Simulated persons, not people: 10 per run, each a claude-haiku-5-5 model playing one of ten fixed personas, reading only what a person would see. The next step they were offered: "Your next app can start with Bob's fixes already in place, each with its reason; want the starter kept on for it?"

The Claude plugin offers it once, after the answer at whose end it showed the moment the offer names ("did not change"). Offered is the share of persons it was shown to; want it now and later are over them.

ArmModelPersonsOfferedNoticedWant the next step nowLaterIn the way
aclaude-opus-5-5300%100%n/an/a47%
bclaude-opus-5-53033%100%40%50%43%
aclaude-sonnet-5-5300%100%n/an/a40%
bclaude-sonnet-5-530100%100%13%70%87%

Results, 14 November 2026, confighub mini 0.11.1-mini.7. Figures from this page's own test runs, shown here for whoever checks the page; they are not a promise.

  • Environment: checksum-verified published mini.7 for macOS arm64 and the Claude plugin it ships, with Claude Code on this computer. These are agent runs; the earlier scripted runs and planted faults are labelled separately.
  • Agent runs: a pilot, 3 runs per arm on each of claude-sonnet-5-5. Arms: a is ordinary tools only; b is the Claude plugin, the local hub and this page as reading.
ArmModelChecks passedMedian secondsMedian costCommands left for the person (median)
aclaude-sonnet-5-52/318.9$0.0660
bclaude-sonnet-5-53/330.7$0.0943

No agent approved or refused a change to production.

Simulated persons, not people: 5 per run, each a claude-haiku-5-5 model playing one of ten fixed personas, reading only what a person would see. The next step they were offered: "Your next app can start with Bob's fixes already in place, each with its reason; want the starter kept on for it?" It offers more of the tier the person has, not a step up.

The Claude plugin offers it once, after the answer at whose end it showed the moment the offer names ("did not change"). Offered is the share of persons it was shown to; want it now and later are over them.

ArmModelPersonsOfferedNoticedWant the next step nowLaterIn the way
aclaude-sonnet-5-5150%100%n/an/a33%
bclaude-sonnet-5-515100%100%27%73%100%

Results, 14 November 2026, confighub mini 0.11.1-mini.8. Figures from this page's own test runs, shown here for whoever checks the page; they are not a promise.

  • Environment: checksum-verified published mini.8 for macOS arm64, with the revised walkthrough and Claude Code. This pilot used only the guided arm. The production copy was checked while both requests were pending. A restricted test key authored the proposals. No live service or outside account was used.
  • Agent runs: a pilot, 3 runs per arm on each of claude-sonnet-5-5. Arms: b is the Claude plugin, the local hub and this page as reading.
ArmModelChecks passedMedian secondsMedian costCommands left for the person (median)
bclaude-sonnet-5-53/334.9$0.1142

No agent approved or refused a change to production.

Simulated persons, not people: 5 per run, each a claude-haiku-5-5 model playing one of ten fixed personas, reading only what a person would see. The next step they were offered: "Before your next web app goes live, you can check which approved defaults it inherited. Want to see those settings and their reasons?" It offers more of the tier the person has, not a step up.

The Claude plugin offers it once, after the answer at whose end it showed the moment the offer names ("Staging took it now: cart, shop"). Offered is the share of persons it was shown to; want it now and later are over them.

ArmModelPersonsOfferedNoticedWant the next step nowLaterIn the way
bclaude-sonnet-5-5150%100%n/an/a87%

This follow-up left a median of 2 owner commands, compared with 3 in the earlier mini.7 guided arm. The new checks required one order for the app, one for the starter, and the old production settings while both waited. This compares two pilots on different packages. The next-app offer was not shown; its uptake was not measured.

Results, 15 November 2026, source candidate for the owner review. Three guided sessions per walkthrough on the same package, with five simulated readers per session. The earlier guide left two approval commands. The revised guide left one review command with separate choices. All six sessions passed the checks for both pending orders and unchanged live settings.

MeasureSeparate commandsCombined review
Owner commands per session21
Median agent time37.7 seconds38.9 seconds
Simulated readers who reported friction6/159/15

The readers judged the handoff and did not operate the terminal. The local owner fixture exercised approve, refuse and later on the separate orders.