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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
feat(board): rework your own rejected item beside your claim [B5]
Corey Olson357cb7ed0eb4
diff --git a/src/board.js b/src/board.jsindex 38d6a212..6d152c9a 100644--- a/src/board.js+++ b/src/board.js@@ -575,13 +575,17 @@ export function claim(board, id, { agentId, lane, leaseMs, freeze, head = null }if (paused && !(isMine && isHeld(board, item))) {throw new Refused('LANE_HELD', `${paused.hold_by} holds the ${item.item_lane} lane: ${paused.hold_reason}. Wait for it: pullboard next --wait 9 (minutes)`);}- if (item.item_parent_id === null) {+ // Reworking your own rejected item is a claim of its own, beside the one live claim (B5): the+ // builder fixing what a verifier found need not drop its other work to do it.+ const isRework = (entry) => entry.item_verdict === 'REJECT' && entry.item_built_by === agentId;+ if (item.item_parent_id === null && !isRework(item)) {const other = board.db.prepare(`SELECT item_id FROM item WHERE item_owner = ? AND item_status = 'claimed'- AND item_lease_until > ? AND item_id != ? AND item_parent_id IS NULL`,+ AND item_lease_until > ? AND item_id != ? AND item_parent_id IS NULL+ AND NOT (COALESCE(item_verdict, '') = 'REJECT' AND COALESCE(item_built_by, '') = ?)`,)- .get(agentId, now(board), id);+ .get(agentId, now(board), id, agentId);if (other) {throw new Refused('ONE_CLAIM',diff --git a/test/board.test.js b/test/board.test.jsindex d023d1e2..fdef8642 100644--- a/test/board.test.js+++ b/test/board.test.js@@ -432,3 +432,26 @@ test('with only work above its tier open in its lane, next names it and the rero`#${strong} (strong) is open in the web lane, above your light route: a strong agent takes it, or, if light can build it, the coordinator reroutes it: pullboard edit ${strong} --route light`,], 'a blocked item of your own tier does not hide the work above it');});++test('a builder reworks its own rejected item beside its one claim; nothing else doubles up [B5]', () => {+ const rejected = (title) => {+ const id = store.addItem(board, { by: 'coordinator', lane: 'web', title });+ claimAs(id, 'web-1', 'web');+ store.submit(board, id, { agentId: 'web-1', commit: SHA_A, tree: 't' });+ verdict(id, { agentId: 'web-2', decision: 'REJECT', reason: 'TEST_FAILURE', note: 'fails', digest: `digest:${title}` });+ return id;+ };+ const page = rejected('Page');+ const footer = rejected('Footer');+ const aside = rejected('Aside');+ const header = store.addItem(board, { by: 'coordinator', lane: 'web', title: 'Header' });+ const nav = store.addItem(board, { by: 'coordinator', lane: 'web', title: 'Nav' });+ claimAs(page, 'web-1', 'web');+ assert.equal(claimAs(header, 'web-1', 'web').renewed, false, 'holding only a rework, one new claim is still free');+ assert.equal(claimAs(footer, 'web-1', 'web').renewed, false, 'a second rework of its own, beside its claim');+ assert.throws(() => claimAs(nav, 'web-1', 'web'), new RegExp(`ONE_CLAIM.*you already hold #${header}`));+ store.submit(board, page, { agentId: 'web-1', commit: SHA_B, tree: 't2' });+ assert.equal(store.getItem(board, page).item_status, 'submitted');+ claimAs(nav, 'web-2', 'web');+ assert.throws(() => claimAs(aside, 'web-2', 'web'), /ONE_CLAIM/, "another agent's rejected item is no rework of web-2's");+});