Skip to content

feat(bootstrap): --demo mode for try-it-out evaluation (M-4) - #29

Merged
hx2ryu merged 3 commits into
mainfrom
feat/v15-m4-demo-mode
May 15, 2026
Merged

hx2ryu merged 3 commits into
mainfrom
feat/v15-m4-demo-mode

Conversation

@hx2ryu

@hx2ryu hx2ryu commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • bash scripts/init-project.sh --demo synthesizes a throwaway Node.js source repo in a temp dir, wires a single backend role at it, and runs the rest of the wizard non-interactively. Zero prompts.
  • New templates/demo-source/ (3-file scratch: greet() module + test + package.json + README) is the source-of-truth for the throwaway repo.
  • Cleanup is on the user: the closing banner names the throwaway path with the exact rm -rf command.
  • --demo is mutually exclusive with --from=<file> (the demo synthesizes its own config).
  • tests/demo-mode-test.sh covers the happy path, throwaway-repo correctness, banner content, and the flag-conflict guard.

Why

Install/setup UX review M-4: a new user evaluating zachflow couldn't try it without already having a target codebase pointed at by a source: path in init.config.yaml. The barrier to first impression was too high. --demo removes that barrier — paste one command, get a fully-running zachflow project + a sample to point /sprint at.

Test plan

  • bash tests/demo-mode-test.sh — 3/3 PASS locally
  • bash tests/init-project-smoke.sh — still PASS
  • bash tests/preflight-test.sh — still PASS
  • bash -n scripts/init-project.sh — clean
  • Manual end-to-end: staged copy + --demo → sprint-config.yaml + filled teammate + KB + symlinks all present; throwaway source has 1 commit; cleanup banner names the right path
  • CI passes on PR

UX flow after this PR

npx create-zachflow my-project       # auto-runs wizard, but...
# (if you want to try without a real repo:)
bash scripts/init-project.sh --demo  # zero-prompt, throwaway-source setup
# (open in Claude Code)
/sprint demo-1

🤖 Generated with Claude Code

hx2ryu and others added 3 commits May 15, 2026 15:57
scripts/init-project.sh --demo synthesizes a throwaway Node.js source
repo (templates/demo-source: 3-file scratch with one git commit) in a
temp dir, then delegates to the existing --non-interactive path with
an auto-generated config wiring a single backend role at it. Zero
prompts, fully-configured sprint-config.yaml + filled be-engineer.md +
initialized KB + workflow symlinks. Ready for `/sprint demo-1` in
Claude Code.

Closes the "can't evaluate zachflow without first having a target
codebase" friction from the install/setup review.

--demo is mutually exclusive with --from=<file>. The closing banner
names the throwaway path so the user can rm -rf it when finished.

New tests/demo-mode-test.sh covers happy path, source-repo
materialization (.git + 1 commit + role.source wired correctly),
cleanup-banner content, and the flag-conflict guard. Wired into CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
git-bash's mktemp returns MSYS paths like /tmp/zachflow-demo-config-XXXX,
which Windows-native python3 cannot resolve (FileNotFoundError). Pass the
DEMO_SOURCE_PATH and DEMO_CONFIG through `cygpath -m` to produce
mixed-mode paths (e.g. C:/.../tmp/foo) that both git-bash and native
binaries accept. No-op on macOS / Linux.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
demo-mode-test.sh hands $STAGE/sprint-config.yaml to python3 to verify
role.source wiring. On Windows runners, git-bash mktemp produces an
MSYS path that python3 can't open. Mirror the to_native_path helper
from init-project.sh inside the test so $TMPDIR is mixed-mode from
the start.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hx2ryu
hx2ryu merged commit 29e9d02 into main May 15, 2026
3 checks passed
@hx2ryu hx2ryu mentioned this pull request May 15, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant