Demo use cases
The second version of the demo scripts. The first,scripts/walkthrough.sh,
was one checklist under set -e: the first failing line ended it, and there
was no way to run step six without steps one to five. This version is
twelve units under scripts/demo/, one script per use case, each runnable
alone and each ending in a verdict.
scripts/test-harness
and drive the real crewship binary; nothing here reads a database or calls
the API by hand.
The use cases
Needs is what a use case cannot run without.
model is an ACTIVE
model-provider credential in the workspace; github is SEED_GITHUB_TOKEN
at seed time, or a bound GITHUB credential. A use case whose need is
missing does not pretend: it exits with a reason and the runner prints
SKIP for it. A green row means the use case ran and every assertion
held.
Reading a run
Each use case prints numbered steps, the commands it runs with their output, a ✓ or ✗ per assertion, and a 👀 line naming where to look in the web UI right now — the inbox, the agent, the Page. It ends with its own summary. The runner then prints one table:Before you start
A seeded install and a login:crewship seed prints the
account. The use cases with a model need the seed’s model credential to be
ACTIVE; eval-tiers needs crewship seed --with-evals. Point the scripts
at the same server the browser shows (CREWSHIP_PROFILE or
CREWSHIP_SERVER) and, when the UI lives on another host than the API,
set DEMO_WEB_URL so the 👀 lines are right.
The packs with a GitHub token (10, 11) need the token at seed time — see
Demo packs → Credentials. Without it they
SKIP, and so does seed verify.
Writing one
A use case is a bash scriptscripts/demo/uc-NN-<slug>.sh with a
four-line header the runner lists from, source "$HERE/lib.sh",
preflight, its steps, and finish. lib.sh gives it the harness
(cs, ask_agent, assert_*, poll_until, nonce) plus the demo layer:
demo_step, demo_say, demo_show, demo_ui, demo_need and
demo_skip_all, run_routine, demo_cleanup. There is no set -e on
purpose: a failed assertion is a red line, and the audience still sees the
steps after it. scripts/demo/README.md has the contract; the existing
twelve are the examples.
Known limits
crewship routine schedules nowruns the target routine directly and bypasses the wake gate, so use case 7 waits for a real tick instead (under 90 seconds).- Use cases 2 and 4 depend on an agent doing what it was asked. Each retries once, then SKIPs with the reason rather than reporting the model’s phrasing as a product failure.
- What
walkthrough.shstill shows and this does not: nothing. Its steps are use cases 1 to 9 here; step 8 (seeded cron schedules) no longer matches what the seed creates and became use case 7.