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): continue agent setup in session [I1,I2]

Corey Olson04a639d9cdc3
diff --git a/src/cli.js b/src/cli.js
index 73bb103f..a5250939 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -1491,7 +1491,9 @@ function setupCommands(io, { first, values }) {
const staging = notes.at(-1)?.startsWith('git add -f -- ') ? notes.at(-1) : null;
(staging ? notes.slice(0, -1) : notes).forEach((note) => io.say(note));
if (await registerProjectAndLink(info.root, new Date(), loadConfig(info.root), io)) io.say('registered this project on this machine, so pullboard view lists it');
- io.say('Next: ask your agent to set up Pullboard here; in Claude Code, start a new session first so it loads the Pullboard skills.');
+ io.say(agentSessionDigest()
+ ? '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.');
if (staging) io.say(staging);
return 0;
},
diff --git a/test/newcomer.test.js b/test/newcomer.test.js
index d0a44cc5..5d1a7373 100644
--- a/test/newcomer.test.js
+++ b/test/newcomer.test.js
@@ -5,6 +5,7 @@ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'nod
import { tmpdir } from 'node:os';
import { join, resolve } from 'node:path';
import { test } from 'node:test';
+import { AGENT_SHELL_MARKERS } from '../src/person.js';
const BIN = resolve(import.meta.dirname, '../bin/pullboard.js');
@@ -59,6 +60,23 @@ test('init ends with a working staging line for exactly its own writes [I1,I2,D1
assert.equal(box.git('diff', '--cached', '--name-only'), '');
});
+test('an agent that runs init continues setup in the same session [I1,I2]', (t) => {
+ const human = project(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.doesNotMatch(humanResult.stdout, /run pullboard resume now/u);
+
+ const agent = project(t);
+ for (const marker of AGENT_SHELL_MARKERS) delete agent.env[marker];
+ 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.doesNotMatch(agentResult.stdout, /Next: ask your agent/u);
+});
+
test('init detects language gates and gives an example in the same ecosystem [I1,I2]', (t) => {
const cases = [
['pyproject.toml', '[project]\nname = "example"\n', 'pytest'],