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
fix(roadmap): keep withdrawal inside its domain [N26]
Corey Olson99a3290b7fd3
diff --git a/src/cli.js b/src/cli.jsindex f3c1360e..dd9a06cc 100644--- a/src/cli.js+++ b/src/cli.js@@ -278,9 +278,8 @@ import {} from './projects.js';import {milestoneRoadmap,- localMilestoneAliases,+ withdrawWithMilestones,} from './roadmap.js';-import { milestoneReferencesToRemove } from './milestones.js';import {rigorLines,rigorReport,@@ -3729,18 +3728,8 @@ function workCommands(io, args) {io.say(`#${first} merged as ${commit.slice(0, 12)}`);return 0;}),- withdraw: () => act(async (ctx, board, me) => {- const id = idArg(first);- await ordered(ctx, board, 'withdraw', [id, { agentId: me.id, reason: [second, ...rest].filter(Boolean).join(' ') }]);- const removals = milestoneReferencesToRemove(board, [id, ...localMilestoneAliases(ctx.info.root, board, id)]);- const left = removals.map(({ name }) => name);- for (const { name, remove } of removals) {- await ordered(ctx, board, 'editMilestoneItems', [name, { agentId: me.id, remove }]);- }- io.result?.({ id: idArg(first), reason: [second, ...rest].filter(Boolean).join(' '), milestones: left });- io.say(`withdrew #${first}${left.length ? `; removed it from milestone ${left.join(', ')}` : ''}`);- return 0;- }),+ withdraw: () => act((ctx, board, me) => withdrawWithMilestones(ctx, board, me, idArg(first),+ [second, ...rest].filter(Boolean).join(' '), ordered)),refreeze: () => act(async (ctx, board, me) => {const result = await ordered(ctx, board, 'refreeze', [idArg(first), { agentId: me.id, freeze: freezer(ctx, { captureVerifyPolicy: true, board }) }]);io.result?.({ id: idArg(first), ...result });diff --git a/src/roadmap.js b/src/roadmap.jsindex 49e23073..a55af69b 100644--- a/src/roadmap.js+++ b/src/roadmap.js@@ -21,6 +21,7 @@ import {repoInfo,} from './git.js';import { listApiProjects } from './projects.js';+import { milestoneReferencesToRemove } from './milestones.js';/** Parse a registered-project reference and resolve only an unambiguous project name or basename. */export function resolveMilestoneProjectReference(reference, projects) {@@ -47,6 +48,19 @@ export function localMilestoneAliases(root, board, id) {return [...aliases];}+/** Withdraw through ordered moves, then remove every local milestone alias and report the result. */+export async function withdrawWithMilestones(ctx, board, me, id, reason, ordered) {+ await ordered(ctx, board, 'withdraw', [id, { agentId: me.id, reason }]);+ const removals = milestoneReferencesToRemove(board, [id, ...localMilestoneAliases(ctx.info.root, board, id)]);+ const left = removals.map(({ name }) => name);+ for (const { name, remove } of removals) {+ await ordered(ctx, board, 'editMilestoneItems', [name, { agentId: me.id, remove }]);+ }+ ctx.io.result?.({ id, reason, milestones: left });+ ctx.io.say(`withdrew #${id}${left.length ? `; removed it from milestone ${left.join(', ')}` : ''}`);+ return 0;+}+/** Resolve a repo-qualified milestone item against registered boards, optionally within an API scope.* @param {string} root* @param {any} board