Skip to content
ConfigHub for coding agents
Reference / examples/walkthroughs/story-18-dev-intent.md Source on GitHub

A new app that fits the team's pattern, with rules an agent cannot break by accident

Ana asks her agent for a small notes API and does not want to think about environments or limits. What comes back fits what her team allows: the app's settings in a hub, a staging and a production copy, and rules that hold. When an agent breaks a rule, the value never reaches the service, and her first app becomes the starting point for her next.

Quick start

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

By handAsk your agent
Put the app on the patterncub mini adopt notes, which ends by asking you to approve production's first settings"Build me a small notes API, with its settings in an env file, that fits the team's pattern, pattern-web, with a staging and a live copy." You approve production yourself.
A rule holds a bad valuecub mini pull notes --variant staging --dir ~/walkthrough/serviceYour agent can run the same command.
Start the next appcub mini adopt blog --pattern notesYour agent can run the same command.

A value that breaks a rule stays in the hub and never reaches the service, and the second app starts from the first.

Without ConfigHub: your agent writes the app's limits directly into its .env file, 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, what an agent leaves to you, and how this was tested.

Show the full walkthrough

Human

For a person following along in a terminal.

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. MINI is the unpacked package; CUB_CONFIG is a new folder for this walkthrough's cub settings, so nothing of yours is touched. Then start a hub:
    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 ana --use >/dev/null

    The walkthrough starts this hub explicitly. It does not change your setting for starting hubs automatically.

  2. Ana's agent wrote the notes API, with its settings in .env:
    mkdir -p ~/walkthrough/notes && cd ~/walkthrough
    printf 'PORT=3000\nLOG_LEVEL=info\n' > notes/.env
  3. One command puts it on the team's pattern, pattern-web: default settings for a small web service, and rules each change must pass. A rule here is a validating Trigger, which ConfigHub runs on every change:
    cub mini adopt notes | sed -n 1,4p
    cub mini approve notes-base/adopt --note "Ana's starting values" --yes >/dev/null
    Made a starter pattern, pattern-web: default settings for a small web service (pattern-web/web-service), and rules that each change must pass (replicas-limit, not-public, log-level, no-secret-values). You can change it or ignore it.
    ConfigHub now keeps notes's settings, from .env. Your files are unchanged.
      It keeps three copies of them: notes-base, the shared settings that staging and production start from; notes-staging; and notes-live, for production.
      Your settings that differ from the defaults in pattern-web/web-service: PORT=3000. A new version of those defaults will not overwrite them.
  4. The rules are ordinary ConfigHub, kept with the pattern:
    cub trigger list --space pattern-web -o jq='.[].Trigger.Slug'
    not-public
    no-secret-values
    log-level
    replicas-limit
  5. An agent, on a key of its own, sets 50 replicas for staging. The value is kept in the hub, the agent is told it breaks a rule, and it is not released:
    cub mini require-approval notes --variant live --agent bot >/dev/null
    cub --context bot mini set notes REPLICAS=50 --variant staging --change-desc "Handle the launch" | grep rules
    This breaks the rules set for app (pattern-web/replicas-limit/vet-cel). The value is in the hub, and it will not be released or reach the service until it is fixed.
  6. The machine that runs staging keeps what it has: cub mini pull, which writes a copy's settings into the service's folder, refuses:
    cub mini pull notes --variant staging --dir ~/walkthrough/service || true
    cub mini: notes-staging/app breaks the rules set for it (pattern-web/replicas-limit/vet-cel), so nothing was written and the service keeps what it has; fix the value in the hub
  7. The agent asks Ana, who settles on 3. The next pull writes it:
    cub --context bot mini set notes REPLICAS=3 --variant staging --change-desc "Three for the launch, within the team's limit" >/dev/null
    cub mini pull notes --variant staging --dir ~/walkthrough/service
    grep REPLICAS service/app.env
    app.env                  written: revision 4: Three for the launch, within the team's limit| Functions: set-string-path
    REPLICAS=3
  8. Ana's second app, a blog, starts like the first. It is made from the notes app, keeps its own values, and takes what notes changes next:
    mkdir blog && printf 'PORT=3001\nRELEASE=blog-1.0.0\n' > blog/.env
    cub mini adopt blog --pattern notes | sed -n 3,5p
      Your settings that differ from the defaults in notes-base/app: PORT=3001, RELEASE=blog-1.0.0. A new version of those defaults will not overwrite them.
      Defaults from notes-base/app, for settings blog does not set: LOG_LEVEL=info, PUBLIC=false, REPLICAS=2.
      When notes's settings change, blog can take the change and keep its own values: cub mini upgrade notes-base/app --change-desc WHY

Undo it

cub mini uninstall --name ana --delete-data removes the hub and everything in it; then delete ~/walkthrough and ~/.confighub-walkthrough.

What you have now

Two apps on the team's pattern, each with staging and a production copy that changes only with Ana's approval; rules that kept a value over the limit from ever reaching a service; and a second app made from the first.

The full story asks for all of this in one request to an agent, which can also run in a sandbox of its own, and lets a reviewer read why the agent chose each value (/confighub:why in Claude Code). A new app shows the one-request version with the Claude plugin.

Agent

For an AI agent doing this for a person.

  • The request: "Build me a small notes API, with its settings in an env file, that fits the team's pattern, pattern-web, with a staging and a live copy."
  • Write the app and its .env in notes/, then cub mini adopt notes. It makes the base, staging and live copies on pattern-web, with live behind the person's approval.
  • When cub mini set or cub mini upload says a value breaks a rule, tell the person which rule and ask whether to change the value or have the rule's owner change the limit. Do not work around the rule.
  • Never approve production's starting values yourself; end with the command for the person: cub mini approve notes-base/adopt.
  • Done when cub mini receipts notes --setup names the three copies and the approval for live.

Testing

This proves: the settings were stored in the hub on the team's pattern, and a value that breaks a rule was refused by cub mini pull while a valid one was written to a local folder. What was really used: The local hub on this computer; no service runs. This story has no offer moment in its agent task: the Claude plugin shows the person no line at the end of the turn, so the next step below is not offered and conversion is not measured; the simulated persons still say whether they noticed the result and whether anything was in the way.

A correct agent result has the notes app on pattern-web, with staging and a live copy behind approval. The checks below hold right after step 3. The checks below can be run by hand, in bash, in the walkthrough's folder:

Build me a small notes API, with its settings in an env file, that fits the team's pattern, pattern-web, with a staging and a live copy.

test "$(cub unit get app --space notes-base -o jq=.Unit.UpstreamUnitID)" = "$(cub unit get web-service --space pattern-web -o jq=.Unit.UnitID)" && cub space get notes-staging >/dev/null && cub changeworkflow get --space workflows notes-live-approval >/dev/null
find ~/walkthrough/notes -name .git -prune -o -print | grep -qi staging && find ~/walkthrough/notes -name .git -prune -o -print | grep -qiE 'live|prod'
Test results

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

  • Scripted run: passed, 35 seconds for the steps, within the page's budget of 240.
  • Environment, published confighub mini 0.11.1-mini.5 (tag mini-v0.11.1-mini.5, darwin-arm64, verified against SHA256SUMS) and the Claude plugin it carries: a local hub on this computer, with no stand-in, cluster or real service; every approval and refusal was made by the scripted steps or, in the agent runs, by the setup before the agent's task, never by a person. Each planted fault (stale-page, slow and broken-check) failed its scripted run.
  • 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; c is the Claude plugin and the local hub, without this page.
ArmModelChecks passedMedian secondsMedian costCommands left for the person (median)
aclaude-opus-5-51/322.3$0.1820
bclaude-opus-5-53/364.2$0.3481
cclaude-opus-5-50/351.8$0.3890
aclaude-sonnet-5-50/310.2$0.0390
bclaude-sonnet-5-53/327.7$0.1381
cclaude-sonnet-5-51/351.4$0.1940

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 from this one, with its rules, staging and production already in place; want the next one made from notes?" 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-opus-5-5300%100%n/an/a93%
bclaude-opus-5-5300%100%n/an/a73%
cclaude-opus-5-5300%100%n/an/a90%
aclaude-sonnet-5-5300%100%n/an/a87%
bclaude-sonnet-5-5300%100%n/an/a73%
cclaude-sonnet-5-5300%100%n/an/a80%

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-50/311.9$0.0420
bclaude-sonnet-5-53/325.9$0.1371

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 from this one, with its rules, staging and production already in place; want the next one made from notes?" 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/a93%
bclaude-sonnet-5-5150%100%n/an/a100%