Goal
Add a --version flag to a small Node command-line tool. Running
node src/index.js --version must print the version from package.json.
Nothing else may change.
The result
At the end, node src/index.js --version prints 1.2.3, only one source
file changed, the tests pass, and the run folder holds a verify.md with a
pass result — a check you can read, not a claim. Here is the whole run.
The test project has three files. To follow along, create them:
mkdir -p fixture/src fixture/test && cd fixture && git init -q
echo '{"name":"fixture-cli","version":"1.2.3","bin":{"fx":"src/index.js"},"scripts":{"test":"node --test test/"}}' > package.json
printf '#!/usr/bin/env node\nconsole.log(%sfixture%s)\n' "'" "'" > src/index.js
printf '%s\n' "const test = require('node:test')" "const assert = require('node:assert')" "const { execFileSync } = require('node:child_process')" "test('runs', () => assert.match(execFileSync('node', ['src/index.js']).toString(), /fixture/))" > test/smoke.test.js
git add -A && git commit -qm fixture
Commands: one step at a time
In Claude Code, in the project folder:
/guild:init
/guild:ideate add a --version flag to src/index.js. `node src/index.js --version` prints exactly the package.json version and exits 0. Without the flag the output stays "fixture". Change only src/index.js (tests may be added under test/). Non-goals: no other flags. Constraints: node only, no dependencies.
/guild:plan
/guild:build
/guild:qa
Guild Stack stops at each step and asks you to approve. Read what it wrote, then approve.
What Guild Stack produced
node src/index.js --versionprints1.2.3. Without the flag it still printsfixture.src/index.jsis the only changed source file..guild/runs/<run-id>/verify.md, with a pass result.npm testpasses.
The same feature, split between two specialists
Bigger work is split into lanes. This example uses a slightly different test project:
mkdir -p fixture2/src fixture2/test && cd fixture2 && git init -q
echo '{"name":"fixture-cli","version":"1.2.3","bin":{"fx":"src/cli.js"},"scripts":{"test":"node --test"}}' > package.json
printf '%s\n' '#!/usr/bin/env node' "console.log('usage: fx [--help]')" > src/cli.js
printf '%s\n' "const { test } = require('node:test')" "const { execFileSync } = require('node:child_process')" "test('prints usage', () => { if (!execFileSync('node', ['src/cli.js']).toString().includes('usage')) throw new Error('no usage') })" > test/cli.test.js
git add -A && git commit -qm fixture
This brief asks for exactly two lanes, where the second waits for the first:
/guild:guild Add a --version flag to the fixture CLI, as exactly two lanes.
Lane A (developer): create src/version.js exporting getVersion(), which
reads the version from package.json, plus test/version.test.js. Lane A file
allowlist: src/version.js, test/version.test.js.
Lane B (developer, depends-on lane A): make `node src/cli.js --version` print
getVersion() and exit 0, plus a case in test/cli.test.js. Lane B file
allowlist: src/cli.js, test/cli.test.js. Lane B must not edit lane A's files.
What Guild Stack produced:
- A plan in
.guild/plan/where lane B lists lane A underdepends-on. - One receipt per lane in
.guild/runs/<run-id>/handoffs/, each with a## changed_filessection. - Lane B's receipt lists
src/cli.jsand none of lane A's files. review.mdandverify.mdin the run folder.node src/cli.js --versionprints1.2.3and the tests pass.
verify.md did not record a pass. The one-step-at-a-time scenario
passed in both recorded runs.
Time and cost
The test suite allows up to 45 minutes for the step-by-step run and 20 minutes for the two-lane run, on a tiny project. Token cost is not measured by these scenarios; it grows with the number of lanes and the size of the change.
New to Guild Stack? Install it first.