From 00f40789e59eeec9b4fbe1aef5f82efeab2cfb4f Mon Sep 17 00:00:00 2001 From: Param Harrison Date: Thu, 24 Sep 2026 17:30:54 +0300 Subject: [PATCH] DEMO: run demos in a per-person splitbill-demo copy, never reset main Co-Authored-By: Claude Sonnet 5 --- DEMO.md | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/DEMO.md b/DEMO.md index 8b6d8e0..47fd368 100644 --- a/DEMO.md +++ b/DEMO.md @@ -5,18 +5,29 @@ every reset, so the runbook names issues by title. ## Setup -Setup changes (config, charter, skills, CI) and demo output are handled differently by `reset`, which -force-pushes `main` back to the `baseline` tag and drops anything merged after it: +Never reset this repo. Its `main` is protected and holds the real fix. Demos run in your own copy, a +private `splitbill-demo` repo in your account, so a reset only touches that copy. Make it once: -1. Merge any setup PR into `main`. -2. `bin/factory rebaseline --repo-dir ../splitbill` moves the tag onto the new `main`, keeping the setup. -3. `bin/factory reset --repo-dir ../splitbill --dry-run`, then without `--dry-run`. The dry-run lists every - `drop-commit`; that list should be empty. +```bash +gh repo create /splitbill-demo --private +git clone git@github.com:learnwithparam/splitbill.git splitbill-demo && cd splitbill-demo +git checkout demo # main without the cent-split fix, so the bug is there to find +git remote set-url origin git@github.com:/splitbill-demo.git +git push origin demo:main && git tag baseline && git push origin baseline +git checkout -B main origin/main +``` + +The `demo` branch leaves `repo` out of `.factory/config.json`, so the factory reads it from your origin. Each +person's issues, PRs and labels live in their own copy, so two people never collide. Keep the copy +unprotected, because a reset force-pushes its `main` back to `baseline`. + +Reset it with `bin/factory reset --repo-dir ../splitbill-demo-demo --dry-run`, then without `--dry-run`. It closes +only issues labelled `factory:*` or seeded from `.factory/issues`; add `--all-issues` to close the rest. ```bash cd ../factory -bin/factory doctor --repo-dir ../splitbill --fix -make up REPO_DIR=../splitbill # runner + dashboard on http://localhost:4100 +bin/factory doctor --repo-dir ../splitbill-demo --fix +make up REPO_DIR=../splitbill-demo # runner + dashboard on http://localhost:4100 ``` The runner polls every 15 seconds. All human input is GitHub state: a label, an issue comment, a PR @@ -34,7 +45,7 @@ over to you. | 4 | "Upgrade hono 3.12.12 to 4.x" | high risk plan: comment `/factory cancel` | issue closed, worktree removed | | 5 | "Any group member can delete any other member's expense" | none: it needs a protected path | refused at triage, nothing built | | 6 | "Make settling up easier" | the agent asks a question: answer in the dashboard, or as a plain issue comment | resumes at the stage that asked | -| 7 | none | `bin/factory scan --repo-dir ../splitbill` | files the nanoid advisory as an issue | +| 7 | none | `bin/factory scan --repo-dir ../splitbill-demo` | files the nanoid advisory as an issue | ## Paths you cannot force live @@ -52,12 +63,9 @@ untested. `main` requires a code-owner approval and the runner posts as you, so you cannot approve a factory PR yourself. Merge one with an admin bypass (`gh pr merge --squash --admin`), then run -`bin/factory reset --repo-dir ../splitbill`: the dry-run lists that merge as a `drop-commit`, and the real +`bin/factory reset --repo-dir ../splitbill-demo`: the dry-run lists that merge as a `drop-commit`, and the real reset puts `main` back on the baseline. The factory never merges. -`main` is protected, so rewinding it needs "Allow force pushes" on for you (Settings, Branches). Turn it on -first; if it is off the reset fails on its first push and changes nothing. Turn it off again afterwards. - ## By release Each section names one thing to show for that factory release. Run them from `../factory`. @@ -65,12 +73,12 @@ Each section names one thing to show for that factory release. Run them from `.. ### v2.3: the boundary tells the truth Label "README has no run steps" `factory:ready`, then comment `/factory cancel` while it waits for plan approval. -The issue closes, the PR (if any) closes, and the worktree is gone. Then `bin/factory doctor --repo-dir ../splitbill --json` +The issue closes, the PR (if any) closes, and the worktree is gone. Then `bin/factory doctor --repo-dir ../splitbill-demo --json` shows every check and exits 4 if one fails. ### v2.4: the cockpit -`bin/factory inbox --repo-dir ../splitbill` lists what waits on you. Acting from the dashboard Inbox or with +`bin/factory inbox --repo-dir ../splitbill-demo` lists what waits on you. Acting from the dashboard Inbox or with `bin/factory inbox 12 approve` posts the same `/factory approve` comment you would type. `bin/factory logs 12 --follow` tails the run. @@ -87,5 +95,5 @@ links the skills into that agent's own directory. ### v2.6.1: presets that work on first use -`bin/factory verify-agent --repo-dir ../splitbill --issue ` runs one issue on that agent and records a fixture. +`bin/factory verify-agent --repo-dir ../splitbill-demo --issue ` runs one issue on that agent and records a fixture. Only Claude is verified by the maintainers; the rest say "Verified by participants: not yet" until someone does.