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(api): lane add has a JSON shape and a catalog exercise [A1,I1]

Corey Olson346cce31e5a9
diff --git a/docs/api.md b/docs/api.md
index dbafe4db..f5c3cb23 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -46,7 +46,7 @@ For example: `flow: review wait average 61 min (1 measured; > 60 min); bottlenec
| --- | --- |
| `help` | `version:number`, `help:string` |
| `version` | `version:number`, `release:string` |
-| `init` | `version:number`, `root:string`, `notes:array` |
+| `init` | `version:number`, `root:string`, `notes:array`, `proposedLanes:array` |
| `hooks` | `version:number`, `notes:array` |
| `join` | `version:number`, `agent:string`, `lane:string`, `route:string`, `path:string`, `model:string`, `displayName:string` |
| `takeover` | `version:number`, `agent:string`, `path:string` |
@@ -54,6 +54,7 @@ For example: `flow: review wait average 61 min (1 measured; > 60 min); bottlenec
| `resume` | `version:number`, `me:object`, `all:array`, `requests:array`, `holding:array`, `sentBack:array`, `awaiting:array`, `toVerify:array`, `toMerge:array`, `open:array`, `stale:array`, `holds:array`, `unread:number`, `newest:array`, `root:string`, `dirty:number`, `next:string` |
| `whoami` | `version:number`, `id:string`, `lane:string`, `path:string`, `model:string`, `displayName:string` |
| `lanes` | `version:number`, `lanes:object`, `shared:array`, `coordinator:string` |
+| `lane add` | `version:number`, `lane:string`, `owns:array` |
| `resources` | `version:number`, `resources:array` |
| `settings` | `version:number`, `settings:object` |
| `relay` | `version:number`, `linked:boolean`, `board:string`, `url:string`, `link:string`, `sequence:number`, `behind:number`, `recovery:object` |
@@ -122,7 +123,7 @@ For example: `flow: review wait average 61 min (1 measured; > 60 min); bottlenec
| `hook pre-push` | `version:number`, `messages:array` |
<!-- api-command-shapes:end -->
-`hook pre-merge-commit` runs the same staged checks as `hook pre-commit` before Git creates an automatic merge commit. `init` and `hooks` install it; `doctor` names it when absent at Git's effective hook path. Lane ownership comes from `HEAD:pullboard.json`, so an unstaged configuration edit cannot grant a lane new folders. Lane-sensitive checks refuse a repository with `info/grafts` in its Git common directory because grafts alter ancestry even when replacement objects are disabled.
+`hook pre-merge-commit` runs the same staged checks as `hook pre-commit` before Git creates an automatic merge commit. `init` and `hooks` install it; `doctor` names it when absent at Git's effective hook path. Lane ownership comes from `HEAD:pullboard.json`, so an unstaged configuration edit cannot grant a lane new folders. `lane add` writes the new lane to the working `pullboard.json` and returns `{ lane, owns }`; commit the file before the lane's ownership takes effect. `init` returns the lanes it proposes as `proposedLanes`, each `{ name, owns }`, and writes none of them. Lane-sensitive checks refuse a repository with `info/grafts` in its Git common directory because grafts alter ancestry even when replacement objects are disabled.
`join` and `worktree` require a free-text `--model` label or `PULLBOARD_MODEL` environment value; labels are not inferred from a provider or family. Rejoining the same worktree preserves its agent id; the model label is required on every join, and omitting the optional `--family` preserves its prior declaration. `pullboard.json` may set `agents.names` to `suffix` (the default, `web-1 (Claude)`) or `prefix` (`claude-web-1`). CLI `agent` fields remain stable ids; `displayName` shows the chosen style. `resume.me` and API state `agents[]` carry `model` and `displayName`; older agents with no model display `unknown`. Each event records the actor model in `event_detail.model` for a registered agent, with `unknown` for legacy agents without a declaration. `show` includes `item_builder_family` and each verdict's `verdict_verifier_family`. These family fields are `null` when the agent did not declare a family, and later declarations do not rewrite prior submissions or verdicts.
diff --git a/src/json.js b/src/json.js
index cb556f2c..cdc4bcf9 100644
--- a/src/json.js
+++ b/src/json.js
@@ -11,7 +11,7 @@ export const JSON_SHAPES = {
commands: {
help: shape({ help: 'string' }),
version: shape({ release: 'string' }),
- init: shape({ root: 'string', notes: 'array' }),
+ init: shape({ root: 'string', notes: 'array', proposedLanes: 'array' }),
hooks: shape({ notes: 'array' }),
join: shape({ agent: 'string', lane: 'string', route: 'string', path: 'string', model: 'string', displayName: 'string' }),
takeover: shape({ agent: 'string', path: 'string' }),
@@ -19,6 +19,7 @@ export const JSON_SHAPES = {
resume: shape({ me: 'object', all: 'array', requests: 'array', holding: 'array', sentBack: 'array', awaiting: 'array', toVerify: 'array', toMerge: 'array', open: 'array', stale: 'array', holds: 'array', unread: 'number', newest: 'array', root: 'string', dirty: 'number', next: 'string' }),
whoami: shape({ id: 'string', lane: 'string', path: 'string', model: 'string', displayName: 'string' }),
lanes: shape({ lanes: 'object', shared: 'array', coordinator: 'string' }),
+ 'lane add': shape({ lane: 'string', owns: 'array' }),
resources: shape({ resources: 'array' }),
settings: shape({ settings: 'object' }),
relay: shape({ linked: 'boolean', board: 'string', url: 'string', link: 'string', sequence: 'number', behind: 'number', recovery: 'object' }),
diff --git a/test/api.test.js b/test/api.test.js
index 965afe14..34c45124 100644
--- a/test/api.test.js
+++ b/test/api.test.js
@@ -981,6 +981,9 @@ test('[A1] every catalog command and subcommand has a real CLI exercise', () =>
/** Exercise the agent-only takeover with a private explicit session, leaving later terminal calls markerless. */
const sessionSource = { ...source, run: (cwd, ...args) => runFixtureChild(process.execPath, [BIN, ...args], { cwd, env: { ...source.env, CODEX_SESSION_ID: 'api-catalog-session' }, encoding: 'utf8' }) };
json(sessionSource, source.repo, 'takeover');
+ const lane = json(source, source.repo, 'lane', ['add', 'catalog', '--owns', 'catalog/'], 'add');
+ assert.deepEqual([lane.lane, lane.owns], ['catalog', ['catalog/']]);
+ assert.deepEqual(json(source, source.repo, 'lanes').lanes.catalog, { owns: ['catalog/'] });
const missing = Object.keys(JSON_SHAPES.commands).filter((key) => !covered.has(key));
assert.deepEqual(missing, [], `add real-repo invocations for undocumented coverage gaps: ${missing.join(', ')}`);
assert.deepEqual([...coveredRoots].sort(), resultCommands(), 'every actual root/factory command has an invocation');