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.

Merge main into accepted item decision queue [B21,N26]

Corey Olson3eb7345b4350
diff --cc docs/api.md
index c01e512f,65ec82d6..5f152b77
--- a/docs/api.md
+++ b/docs/api.md
@@@ -674,6 -678,39 +678,42 @@@ A board-recorded item merge covers its
The JSON result includes `verification` entries with PR number, exact head, state, assurance, receipt identities, and any unverified commit IDs. GitHub statuses are shared by PRs with the same head: if an outside or unproven PR shares a commit with a proven proposal, the shared status stays red rather than lending the proposal's green status to it. Publishing observes and posts statuses; it never merges a PR or requires outside authors to use Pullboard.
+### Item decision queue
+
+The full and summary board state include `decisionQueue`, the coordinator's open decisions, separate from recent `shouts` and the person's `decisions`/Needs you. Structured item questions retain the ordinary shout fields and add `item` and `options`. The state delta carries this small queue whole, so an answer removes its pending entry. Use the normal authenticated `answer` move to append an answer; a decision passed to the person requires the existing person channel.
+ `pullboard why <file>[:<line>] --json` uses the `why file` catalog shape; this names the file form, not a literal `file` argument. It traces commits on the repository's actual primary branch, then resolves their item trailers, served row IDs and answered decisions in one board query. The legacy `why <id>` shape is unchanged. Answered decisions carry their recorded origin, statement, rationale, decider and relayer; absent historical provenance remains `unknown`. Row and item origins are also `unknown` unless recorded, rather than inferred from a related decision. An agent may label a relayed or inherited answer but cannot use that label to mint a person-origin record. Unproven original decider identities remain unknown, with the answering relay seat recorded separately.
+
+
+ ### Cross-board decision handoffs
+
+ `decisionHandoffs(db, { boardId, authorize })` in `src/decision-handoff.js` is
+ an I-D persistence port, not an aggregation CLI or a board-name resolver.
+ Each participant supplies its own SQLite connection, opaque immutable board ID,
+ and existing authority adapter. Call mutations inside the caller’s ordered
+ write boundary. No transaction or database connection spans boards.
+
+ `deliver(handoff, options)` checks the exact version-1 wire shape and original
+ option-set digest, then asks `authorize("disclose", handoff)` and, for answers,
+ `authorize("answer", handoff)`. The adapter must authenticate the requester,
+ source decision, destination, question, option digest and answer; a supplied
+ opaque authority value alone grants nothing. Accepted deliveries persist before
+ returning. Transport retries the returned wire independently at the other board.
+ Changed correlation or a conflicting answer refuses; late questions preserve
+ answers. `optionsDigest(options)` hashes a unique option set independent of order.
+
+ `query(source, participants, authority)` requires source-board read authority
+ for the exact namespaced reference and participant set. It returns
+ `{ complete, agreed, answers }`; callers must not act on an incomplete or
+ disagreeing result. Each destination contributes at most one answer, and a
+ query cannot omit a destination already recorded for that source decision.
+ This contract stores and returns answers to the source/requester’s authorized
+ query; it does not execute the decision or grant cross-board authority.
+
+
+ ## Cross-board offer and private receipt contracts
+
+ `src/item-offer.js` exposes `acceptItemOffer`, `declineItemOffer`, `itemOfferAnnouncement`, `recordItemOfferResult` and `readItemOffer`. An `ItemOffer` has exactly `{ version: 1, offerId, sourceBoardId, parentItem, destinationBoardId, proposedContent, disposition, childRef, reason }`. Pending offers have null child/reason; accepted results name `{boardId,item}` on the destination; declines carry a reason. Disclosed proposal fields are `lane`, `title`, and optional `criterion`, `specIds`, `brief`, `route`, `check`; a foreign parent never becomes a destination-local parent. State announcements omit `proposedContent` entirely. The destination stores only a request digest and state result, and retries return the same child after reopening SQLite. Different content or dispositions under the same source/offer id conflict.
+
+ Consumers supply the existing canonical resolver as `resolveBoardRef(id) -> {boardId}` without alias normalization here, their local `boardId`, and a synchronous authenticated `authorize({action,boardId,document})` port. Actions are `accepted`, `declined`, and `receive-result`. The port must verify the appropriate source/destination authority for the exact document; there is no permissive default. The destination's synchronous `createChild(content)` port must perform its native child move on this same board and return its item id. Invoke these contracts inside the consumer's ordered move: child creation and the destination retry record share one SQLite transaction. Source result delivery is a separately authorized, idempotent transaction. These contracts add no offer orchestration, two-board transaction or landing sequencer.
+
+ `minimalItemReceipt(fields,{sign})` accepts only `{version:1,sourceBoardId,item,commit,verifier,verdict}` and appends `integrity:{digest,signature}` over canonical permitted bytes. `verifyItemReceipt(receipt,{resolveBoardRef,verify},expected)` requires all expected references to match, checks the digest, and calls `verify(bytes,signature,sourceBoardId)` against the consumer's established source trust. Signatures are supplied through the existing authority adapter; a digest alone proves no authority. Titles, criteria, notes and unknown fields are refused even on verification. Private landing consumers still establish the real landing and verdict before issuing this reduced envelope.
diff --cc src/api-moves.js
index bf80aacc,9dae8d14..cb317a08
--- a/src/api-moves.js
+++ b/src/api-moves.js
@@@ -23,8 -23,8 +23,8 @@@ const MOVES =
reopen: { item: true, flags: ['note', 'cause'], lists: ['conflict'], booleans: ['withdraw-verdict'] },
escalate: { item: true, flags: ['note'] },
hold: { positions: ['lane'], flags: ['reason'], booleans: ['off'] },
- shout: { positions: ['to', 'text'], optional: ['to'], booleans: ['decision', 'news'], flags: ['evidence', 'outcome', 'item', 'commit'] },
+ shout: { positions: ['to', 'text'], optional: ['to'], booleans: ['decision', 'news'], flags: ['evidence', 'outcome', 'item', 'commit', 'options'] },
- answer: { item: true, positions: ['text'], flags: ['as', 'implies', 'supersedes'] },
+ answer: { item: true, positions: ['text'], flags: ['as', 'implies', 'supersedes', 'origin', 'rationale'] },
pass: { item: true, positions: ['note'] },
next: { flags: ['as'], booleans: ['verify', 'build'] },
};
diff --cc src/board.js
index 6253ee3f,38819a37..723d28a2
--- a/src/board.js
+++ b/src/board.js
@@@ -1,4 -1,4 +1,5 @@@
+import * as itemDecisions from './item-decision-queue.js';
+ import { requireFactKind } from './item-notes.js';
import { activityNewsFlag } from './activity-news.js';
import { migrateEventLogVersion } from './board-event-log-migrate.js';
import {
diff --cc src/commands/shout.js
index eedd22b6,1fa988fa..cefc12fa
--- a/src/commands/shout.js
+++ b/src/commands/shout.js
@@@ -1,6 -1,6 +1,7 @@@
+import { Refused } from '../refused.js';
/** The pullboard shout command, in its own module so an item adding another command never edits these lines. */
import * as store from '../board.js';
+ import { requireReadableShout } from '../shout-readable.js';
import {
COORDINATOR,
} from '../config.js';
@@@ -31,7 -26,8 +32,8 @@@ export async function run(io, { first,
const hasRecipient = first && recipients.includes(first) && (values.item === undefined || second !== undefined);
const to = values.item !== undefined ? `item:${values.item}` : hasRecipient ? first : values.decision ? (me.id === COORDINATOR ? 'person' : COORDINATOR) : first ?? '';
const text = [hasRecipient ? second : first, ...(hasRecipient ? rest : [second, ...rest])].filter(Boolean).join(' ');
+ requireReadableShout(text);
- const id = await ordered(ctx, board, 'shout', [{ from: personShout(io, me) ? store.PERSON : me.id, to, text, ...(values.item !== undefined ? { item: Number(values.item) } : {}), lanes: laneNames(ctx.config), decision: Boolean(values.decision), ...(values.news ? { news: true } : {}), evidence }]);
+ const id = await ordered(ctx, board, 'shout', [{ from: personShout(io, me) ? store.PERSON : me.id, to, text, ...(values.item !== undefined ? { item: Number(values.item) } : {}), lanes: laneNames(ctx.config), decision: Boolean(values.decision), ...(options !== undefined ? { options } : {}), ...(values.news ? { news: true } : {}), evidence }]);
io.result?.({ id, decision: Boolean(values.decision) });
const agents = store.listAgents(board);
const recipient = agents.some((agent) => agent.agent_id === to) ? agentDisplayName(agents, ctx.config, to) : to;
diff --cc src/help.js
index fbb6a2be,95a987c9..6cb646ca
--- a/src/help.js
+++ b/src/help.js
@@@ -154,9 -158,9 +158,10 @@@ Wor
pullboard shout all <text> --news coordinator/person release or focus news, digested at session start
Inbox combines direct coordination with item/dependency, file and cited-row activity; other lane activity is summarized.
pullboard shout [<to>] <text> --decision ask for a decision; defaults to your coordinator or the person
+ pullboard shout coordinator <question> --item <id> --decision --options '["first","second"]'
pullboard shout <to> <text> --evidence attempt|receipt --outcome <word> --item <id> --commit <rev>
pullboard answer <shout-id> <text> [--as person] [--implies <ids>] [--supersedes <answer-id>]
+ [--origin person-relayed|agent|inherited] [--rationale <why>]
answer your decision; person mode is main-checkout only
--supersedes tells the items an earlier answer implied; only the person
supersedes the person's answer