Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(init): retain verbose guidance and align output checks [I1,I2]

Corey Olsoneb274049c412
diff --git a/src/commands/init.js b/src/commands/init.js
index 998f3401..9fcfa469 100644
--- a/src/commands/init.js
+++ b/src/commands/init.js
@@ -109,6 +109,6 @@ export async function run(io, { values }) {
: `Kept ${setupCommit.skipped.length} earlier changes uncommitted.`);
if (setupCommit.state === 'pending' && values.verbose) io.say(SETUP_COMMIT_LATER);
if (setupCommit.state === 'committed') io.say(`Committed ${setupCommit.skipped.length ? 'only unchanged Pullboard files' : 'Pullboard setup'} at ${setupCommit.commit.slice(0, 12)}.`);
- io.say(initNextLine(Boolean(agentSessionDigest())));
+ io.say(initNextLine(Boolean(agentSessionDigest()), { verbose: values.verbose }));
return code;
}
diff --git a/src/init-finish.js b/src/init-finish.js
index 25143827..0cb66ba6 100644
--- a/src/init-finish.js
+++ b/src/init-finish.js
@@ -47,7 +47,10 @@ export const SETUP_COMMIT_QUESTION = 'Commit Pullboard setup now? [Y/n] ';
export const SETUP_COMMIT_LATER = "To commit Pullboard's files: pullboard init --yes";
/** End setup with one action; the agent reads the remaining questions through resume. */
-export function initNextLine(agentSession) {
+export function initNextLine(agentSession, { verbose = false } = {}) {
+ if (verbose) return agentSession
+ ? 'Next: run pullboard resume now to continue setup in this session; the new skills load next session, and setup does not need them.'
+ : 'Next: ask your agent to set up Pullboard here; in Claude Code, start a new session first so it loads the Pullboard skills.';
return agentSession ? 'Next: run pullboard resume to continue setup in this session.'
: 'Next: ask your agent to run pullboard resume to finish setup.';
}
diff --git a/test/e2e-cli.test.js b/test/e2e-cli.test.js
index 8aeb6d6b..d0611626 100644
--- a/test/e2e-cli.test.js
+++ b/test/e2e-cli.test.js
@@ -43,8 +43,8 @@ test('init adds a Claude Code session hook that runs resume, and keeps every oth
box.git(repo, 'init', '-q', '-b', 'main');
const mine = { permissions: { allow: ['Bash(npm test)'] }, hooks: { Stop: [{ hooks: [{ type: 'command', command: 'echo done' }] }] } };
writeFileSync(join(repo, '.claude', 'settings.json'), JSON.stringify(mine));
- assert.match(box.run(repo, 'init').out, /added a Claude Code session hook/);
- assert.match(box.run(repo, 'init').out, /kept the Claude Code session hook/);
+ assert.match(box.run(repo, 'init', '--verbose').out, /added a Claude Code session hook/);
+ assert.match(box.run(repo, 'init', '--verbose').out, /kept the Claude Code session hook/);
const settings = JSON.parse(readFileSync(join(repo, '.claude', 'settings.json'), 'utf8'));
// Init also grants the loop's allow rules and machine-home write (#670): the person's own rule stays first and
// nothing else in permissions changes. test/init-permissions.test.js owns the exact rule list.
diff --git a/test/init-ignore.test.js b/test/init-ignore.test.js
index 01d08ddd..d820e4e9 100644
--- a/test/init-ignore.test.js
+++ b/test/init-ignore.test.js
@@ -213,7 +213,7 @@ test('setup commits use repository identity despite inherited agent identity [I1
test('a fresh init tells the person and the agent how to start [I9,I1]', t => {
const box = fixture(t);
rmSync(join(box.root, 'pullboard.json'));
- const initialized = box.output('init');
+ const initialized = box.output('init', '--verbose');
assert.equal(initialized.code, 0, initialized.stderr);
assert.equal(JSON.parse(readFileSync(join(box.root, 'pullboard.json'), 'utf8')).worktrees, 'inside',
'fresh init opts into worktrees inside the repository');
@@ -228,20 +228,19 @@ test('a fresh init tells the person and the agent how to start [I9,I1]', t => {
assert.doesNotMatch(section, /\b(?:spec|lanes|gates)\b/iu, 'the first setup guidance uses plain words');
});
-test('init leads with the next step and folds the details [I10,B26]', t => {
+test('init summarizes setup before one final next step [I1,I2,B26]', t => {
const box = fixture(t);
rmSync(join(box.root, 'pullboard.json'));
const initialized = box.output('init');
assert.equal(initialized.code, 0, initialized.stderr);
const lines = initialized.stdout.trimEnd().split(/\r?\n/u);
- assert.match(lines[0] ?? '', /^Next:\s+\S/u,
- 'a newcomer sees the next step before setup details');
- assert.match(lines.slice(0, 2).join('\n'), /Next: ask your agent to set up Pullboard here/u,
- 'the first one or two lines say what to do next');
- const detailsHeading = lines.findIndex((line, index) => index >= 1 && /^(?:Setup details|Details):?$/iu.test(line));
- const verboseFlag = lines.slice(0, 2).some(line => /--verbose\b/u.test(line));
- assert.ok(verboseFlag || detailsHeading === 1 || detailsHeading === 2,
- 'setup details follow under a short heading or are explicitly behind --verbose');
+ assert.match(lines[0] ?? '', /^Set up Pullboard:/u, 'a newcomer sees what was installed');
+ assert.match(lines.at(-1) ?? '', /^Next: ask your agent to run pullboard resume to finish setup\.$/u,
+ 'the one next step ends the compact summary');
+ assert.equal(lines.filter(line => /^Next:/u.test(line)).length, 1);
+ assert.ok(lines.length <= 12, 'setup details stay out of the compact report');
+ assert.doesNotMatch(initialized.stdout, /sandbox_mode|--detach|To commit Pullboard's files:/u,
+ 'the detailed recipes remain behind --verbose');
});
/** Run init on a fresh repo and return the "Helping the person" section of the AGENTS.md it wrote. */
diff --git a/test/newcomer.test.js b/test/newcomer.test.js
index dffb7f44..4182f356 100644
--- a/test/newcomer.test.js
+++ b/test/newcomer.test.js
@@ -27,7 +27,7 @@ function project(t) {
return { root, env, git, run };
}
-test('init ends with one confirmation command for its own writes [I1,I2,D1,D2]', (t) => {
+test('verbose init exposes one confirmation command for its own writes [I1,I2,D1,D2]', (t) => {
const box = project(t);
box.git('config', 'user.name', 'Newcomer Fixture');
box.git('config', 'user.email', '[email protected]');
@@ -44,11 +44,12 @@ test('init ends with one confirmation command for its own writes [I1,I2,D1,D2]',
writeFileSync(join(box.root, '.claude', 'skills', 'pullboard-run', 'SKILL.md'), '# My existing guide\n');
writeFileSync(join(box.root, 'CLAUDE.md'), '@AGENTS.md\n');
writeFileSync(join(box.root, 'AGENTS.md'), '# My instructions\n');
- const result = box.run('init');
+ const result = box.run('init', '--verbose');
assert.equal(result.status, 0, result.stderr);
- const stagingLine = result.stdout.trimEnd().split('\n').at(-1);
const label = "To commit Pullboard's files: ";
- assert.ok(stagingLine.startsWith(label), `expected the final line to start with ${label}`);
+ const recipes = result.stdout.split('\n').filter(line => line.startsWith(label));
+ assert.equal(recipes.length, 1, 'verbose exposes exactly one setup-only confirmation');
+ const stagingLine = recipes[0];
const command = stagingLine.slice(label.length);
assert.equal(command, 'pullboard init --yes');
const staged = spawnSync('sh', ['-c', command], { cwd: box.root, env: box.env, encoding: 'utf8' });
@@ -75,7 +76,7 @@ test('an agent that runs init continues setup in the same session [I1,I2]', (t)
for (const marker of AGENT_SHELL_MARKERS) delete human.env[marker];
const humanResult = human.run('init');
assert.equal(humanResult.status, 0, humanResult.stderr);
- assert.ok(humanResult.stdout.includes('Next: ask your agent to set up Pullboard here; in Claude Code, start a new session first so it loads the Pullboard skills.'));
+ assert.ok(humanResult.stdout.includes('Next: ask your agent to run pullboard resume to finish setup.'));
assert.doesNotMatch(humanResult.stdout, /run pullboard resume now/u);
const agent = project(t);
@@ -83,8 +84,14 @@ test('an agent that runs init continues setup in the same session [I1,I2]', (t)
agent.env.CLAUDECODE = '1';
const agentResult = agent.run('init');
assert.equal(agentResult.status, 0, agentResult.stderr);
- assert.ok(agentResult.stdout.includes('Next: run pullboard resume now to continue setup in this session; the new skills load next session, and setup does not need them.'));
+ assert.ok(agentResult.stdout.includes('Next: run pullboard resume to continue setup in this session.'));
assert.doesNotMatch(agentResult.stdout, /Next: ask your agent/u);
+ const humanDetails = human.run('init', '--verbose');
+ assert.equal(humanDetails.status, 0, humanDetails.stderr);
+ assert.match(humanDetails.stdout, /in Claude Code, start a new session first so it loads the Pullboard skills/u);
+ const agentDetails = agent.run('init', '--verbose');
+ assert.equal(agentDetails.status, 0, agentDetails.stderr);
+ assert.match(agentDetails.stdout, /new skills load next session, and setup does not need them/u);
});
test('init detects language gates and gives an example in the same ecosystem [I1,I2]', (t) => {
@@ -118,7 +125,7 @@ test('init detects language gates and gives an example in the same ecosystem [I1
const config = JSON.parse(readFileSync(configPath, 'utf8'));
config.gate = '';
writeFileSync(configPath, `${JSON.stringify(config, null, 2)}\n`);
- const rerun = emptyConfigured.run('init');
+ const rerun = emptyConfigured.run('init', '--verbose');
assert.equal(rerun.status, 0, rerun.stderr);
assert.match(rerun.stdout, /no gate yet: record the command that proves the build with pullboard gate set 'npm test'/u);
assert.doesNotMatch(rerun.stdout, /if this board has no build/u);
@@ -126,7 +133,7 @@ test('init detects language gates and gives an example in the same ecosystem [I1
test('setup offers a gate to a board with no build [I1,I2]', (t) => {
const box = project(t);
- const initialized = box.run('init');
+ const initialized = box.run('init', '--verbose');
assert.equal(initialized.status, 0, initialized.stderr);
assert.match(initialized.stdout, /if this board has no build.*pullboard spec check.*second agent review checks the actual work/u);
diff --git a/test/next-verify.test.js b/test/next-verify.test.js
index 740848b8..04fcf538 100644
--- a/test/next-verify.test.js
+++ b/test/next-verify.test.js
@@ -108,7 +108,7 @@ test('a lone newcomer starts a reviewer with one command [V1,B26]', t => {
box.git(box.web, 'merge', '-q', '--ff-only', 'main');
const model = box.env.PULLBOARD_MODEL;
delete box.env.PULLBOARD_MODEL;
- const initialized = box.run(box.repo, 'init');
+ const initialized = box.run(box.repo, 'init', '--verbose');
if (model !== undefined) box.env.PULLBOARD_MODEL = model;
assert.equal(initialized.code, 0, initialized.err);
const added = box.run(box.repo, 'add', 'web', 'Ready for review', '--specs', 'G1',