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(merge): init adds hooks for Claude Code and Codex that nudge [I6]
Corey Olsonc31418caf408
diff --cc docs/api.mdindex 65ec82d6,e9fcf982..31b8ee73--- a/docs/api.md+++ b/docs/api.md@@@ -677,40 -673,10 +677,47 @@@ When `publish.pullRequest` is enabled,A board-recorded item merge covers its introduced commits only when its exact submitted commit has that receipt and is an ancestor of the recorded merge. `Pullboard-Companion: #N` is covered only on a board-recorded trunk containing item N's landing. Unreceipted commits, including release bumps and synthetic publication commits, remain unverified. An outside PR is allowed and initially reads `not verified`; the JSON result's `verification[].intake` names the existing `pullboard intake` command that files it for review. Outside intake can cover only its exact accepted head, never its earlier commits by inference.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.++`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.+ ## Agent lifecycle nudges++ `init` merges project-local Claude Code `.claude/settings.json` and Codex `.codex/hooks.json` handlers for `SessionStart` and `Stop`, preserving other handlers and settings. Each installed line resolves the local, main-checkout or PATH executable and calls `pullboard hook <event>`; a missing executable exits successfully without output. `init --no-hooks` skips these agent nudges. Existing Git gate hooks are independent. `hooks uninstall` removes only Pullboard's exact agent-handler lines.++ `SessionStart` returns the normal resume card as `hookSpecificOutput.additionalContext`. `Stop` returns a `systemMessage` when this seat has committed, unsubmitted work. A local error or two-second worker timeout returns a warning and exit zero, with no blocking decision. Unknown events are silent no-ops. These shapes follow the current [Codex hooks](https://learn.chatgpt.com/docs/hooks) and [Claude Code hooks](https://code.claude.com/docs/en/hooks) contracts.++ `doctor --json` adds `agentHooks`, with each vendor's `configured` flag, installed `events`, and `trust`. Codex trust is `unverified`: file installation never grants vendor trust, and the Stop reminder may be off until the person reviews the exact definitions with `/hooks`. Text doctor output reports configured hooks; with no agent-hook files it retains its existing one-line clean-board result.diff --cc src/cli-main.jsindex 5d960fad,240d9026..de099ab5--- a/src/cli-main.js+++ b/src/cli-main.js@@@ -50,8 -50,8 +50,9 @@@ const OPTIONS =project: { type: 'boolean' },export: { type: 'string' },'no-open': { type: 'boolean' },+ lan: { type: 'boolean' },'no-permissions': { type: 'boolean' },+ 'no-hooks': { type: 'boolean' },note: { type: 'string' },infra: { type: 'string' },'note-file': { type: 'string' },