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
refactor(resume): isolate optional needs projections [N19,N26]
Corey Olson1e243b1430c4
diff --git a/src/commands/resume.js b/src/commands/resume.jsindex 8bd180a7..f21c14e2 100644--- a/src/commands/resume.js+++ b/src/commands/resume.js@@ -37,8 +37,8 @@ import {takeDecisionNotices,} from '../implies.js';import {- personNeedsSummary,-} from '../needs-state.js';+ resumeNeeds,+} from '../resume-needs.js';import {personNeeds,} from '../needs.js';@@ -170,7 +170,7 @@ export async function resumeHere(io, view, diagnostics = false) {const staleVerdicts = pendingMerges.filter(item => item.item_verdict_state);const decisionSections = isMain ? coordinatorDecisionSections(board, ctx) : null;const { shouts = [], ...decisions } = decisionSections ?? {};- const needsState = personNeedsSummary(root, { board, config: ctx.config, includeFit: true, includeRigorUndrafted: me.id === COORDINATOR });+ const needsState = resumeNeeds(root, { board, config: ctx.config, includeRigorUndrafted: me.id === COORDINATOR });return {me,health: recordedHealthFindings(board),diff --git a/src/needs-state.js b/src/needs-state.jsindex 18a3a0a0..da50a011 100644--- a/src/needs-state.js+++ b/src/needs-state.js@@ -46,20 +46,16 @@ export function personNeedsState(root, { board: providedBoard = null, includeRig}}-/** Keep complete obligations without dashboard history; resume also retains fit and undrafted Rigor. */-export function personNeedsSummary(root, { board, config, includeFit = false, includeRigorUndrafted = false }) {+/** Keep status's complete obligation list without dashboard history, Git ages, or release notes. */+export function personNeedsSummary(root, { board, config }) {const spec = loadSpec(root, config);const rows = projectRowDecisions(store.rowDecisions(board), { root, spec: spec.rows, practice: loadDoctrine(root, config).rows });- const state = { ...rows,+ const projected = projectSpecApprovals({ ...rows,decisions: store.openDecisions(board, store.PERSON), holds: store.laneHolds(board),agents: store.listAgents(board).map(agent => ({ ...agent, displayName: displayAgentName(agent, config.agents.names) })),rigorDrafts: rigorDraftNeeds(rows), sentinelDrafts: sentinelDraftNeeds(sentinels(board)), blocks: recentBlocks(repoInfo(root).commonDir, board),- };- // Resume consumes obligations, not dashboard items; fit still projects every current row and proposal.- const fitted = includeFit ? projectFit(pendingFit(repoInfo(root).commonDir), { ...state, items: [] }) : state;- const projected = projectSpecApprovals(fitted, specApprovalState(root, { board, config, spec }));- return { ...projected, ...(includeRigorUndrafted- ? { rigorUndrafted: undraftedRigor(store.events(board), rows, { person: store.PERSON }) } : {}) };+ }, specApprovalState(root, { board, config, spec }));+ return projected;}/** The person's blocks from the last day, by the board's clock, for Needs you [C6]. */diff --git a/src/resume-needs.js b/src/resume-needs.jsnew file mode 100644index 00000000..9afac84b--- /dev/null+++ b/src/resume-needs.js@@ -0,0 +1,17 @@+/** Resume's complete person obligations without adding optional projections to the status path [N19,N26]. */+import * as store from './board.js';+import { pendingFit } from './blueprint-fit.js';+import { projectFit } from './blueprint-fit.js';+import { repoInfo } from './git.js';+import { personNeedsSummary } from './needs-state.js';+import { personNeeds } from './needs.js';+import { undraftedRigor } from './rigor-notices.js';++/** Extend the indexed summary only for resume; retain exact row decisions, fit and coordinator Rigor. */+export function resumeNeeds(root, { board, config, includeRigorUndrafted = false }) {+ const summary = personNeedsSummary(root, { board, config });+ // Resume consumes obligations, not dashboard items. Fit still decorates every current spec row.+ const fitted = projectFit(pendingFit(repoInfo(root).commonDir), { ...summary, items: [] });+ return { ...fitted, needs: personNeeds(fitted), ...(includeRigorUndrafted+ ? { rigorUndrafted: undraftedRigor(store.events(board), summary, { person: store.PERSON }) } : {}) };+}