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(rigor): compose trunk and document derived events [D1,A5]
Corey Olson1068caa90b39
diff --cc docs/formats.mdindex a054b108,5d3d4970..cc7be377--- a/docs/formats.md+++ b/docs/formats.md@@@ -424,8 -424,8 +424,8 @@@ The `event` table is a SQLite schema ob| `submit` | builder | `commit`, `tree`, `policyCommit`, engine-9 `criterionDigest`, engine-38 `submissionProof` || `reserve` | reviewer | `until` || `accept` | reviewer | `reason`, `commit`, engine-20 `implies`, engine-33 `review`, engine-68 `note` |--| `reject` | reviewer | `reason`, `commit`, engine-20 `implies`, engine-33 `review` |--| `reopen` | coordinator | `commit`, `note`, `judgment`, engine-10 `supersedes`, `landingFailure`, engine-30 `cause`, engine-52 `conflict` |++| `reject` | reviewer | `reason`, `commit`, engine-20 `implies`, engine-30 `cause`, engine-33 `review`, automatic-Rigor `causeDerivation` |++| `reopen` | coordinator | `commit`, `note`, `judgment`, engine-10 `supersedes`, `landingFailure`, engine-30 `cause`, engine-52 `conflict`, automatic-Rigor `causes`, `causeDerivation` || `merged` | coordinator | `commit` || `landing_batch` | coordinator | `batch` || `landing-review-moved` | coordinator | `code`, `batch`, `verdict`, `checked`, `landed` |@@@ -439,8 -439,7 +439,8 @@@| `hold_item` | coordinator | `reason` || `unhold_item` | coordinator | `reason` || `guards` | board | `missing`, `changed`, `stale` |--| `rigor-notice` | rigor | `cause`, `items`, `occurrences`, `neverAgain`, `engine` |- | `rigor-draft` | rigor | `id`, `target`, `cause`, exact typed `source`, `unproved: true`, `items`, `occurrences`, `engine` |++| `rigor-notice` | rigor | `cause`, `items`, `occurrences`, `neverAgain`, `engine`, automatic-Rigor `drafts` |++| `rigor-draft` | rigor | `id`, `target`, `cause`, exact typed `source`, `unproved` (always true), `items`, `occurrences`, `engine` || `shout` | sender | `shout`, `to`, `decision`, `request`, `answers` || `flake-observation` | reporting agent | `engine`, `observation` || `flake-repair` | reporting agent | `engine`, `key`, `item` |@@@ -455,7 -454,7 +455,7 @@@| `pass` | coordinator | `shout`, `to`, `decision`, `request`, `answers` || `answer` | answerer | `shout`, `to`, `decision`, `request`, `answers`, `outcome`, `channel`, engine-20 `implies`, `supersedes` || `row_decision` | person | `record`, `channel` |--| `row_draft` | builder | engine-55 `row`, `written` |++| `row_draft` | builder, or rigor | engine-55 `row`, `written` || `flake-observation` | reporting agent | engine-59 `engine`, `observation` || `flake-repair` | reporting agent | engine-59 `engine`, `key`, `item` || `row_apply` | coordinator | `events` |@@@ -527,12 -526,6 +527,12 @@@ Engine 43 (`RIGOR_NOTICE_ENGINE`) postA proved Rigor draft carries `source: rigor:<percent-encoded JSON>` with `version: 1`, its `key`, `evidence` (`items`, `occurrences`, `neverAgain`) and `proof` (`check`, `red`, `green`). The proof contains actual full commits, executed exit statuses and problem counts. The existing spec and doctrine row grammar reads this field; prose mentioning Rigor is not a typed source. The person uses ordinary Approve or Decline, and the coordinator applies the approved row without a new build item.+`RIGOR_AUTO_ENGINE` adds implicit evidence-only proposals to reject, reopen, person never-again and attributable conflict-hold moves. An omitted cause derives from a current-head structured reviewer failure, structured landing tests, exact conflict files, or a coarse coded verdict/reopen category; notes never identify tests. File keys use `conflict:<URI-escaped path>` and stay architectural advice rather than code-rule failures. Explicit `--cause` wins. Older recorded engines retain their original causes, notices and event streams.+- The triggering transaction reserves ordinary `draftSpecRow` entries with `written: false`, `gate: review`, `tier: aim`, and a terminal `Source: rigor-auto:<percent-encoded JSON>` in their text. This distinct source has `version: 1`, `unproved: true`, `key` and exact repeat `evidence` (`items`, `occurrences`, `neverAgain`, event ids); it has no executed red/green proof. One receipt names the created drafts. It changes no repository file and approves no rule. Needs you exposes each pending proposal, including a visible collision if another row occupies its id with different fields. `spec apply` explicitly materializes these proposals after preflighting existing person decisions and all automatic row definitions across both files. The existing exact-file person approval/decline then applies. `rigor --draft-splits` prepares existing automatic split advice instead of creating a second proposal. An exact person replacement remains authoritative on later application; a stale or unrelated row cannot impersonate it.++The triggering transaction reserves ordinary board row-draft entries with `written: false`, `gate: review`, `tier: aim`, and a terminal `Source: rigor-auto:<percent-encoded JSON>` in their text. This distinct source has `version: 1`, `unproved: true`, `key` and exact repeat `evidence` (`items`, `occurrences`, `neverAgain`, event ids); it has no executed red/green proof. One receipt names the created drafts. It changes no repository file and approves no rule. Needs you exposes each pending proposal, including a visible collision if another row occupies its id with different fields. `spec apply` explicitly materializes these proposals after preflighting existing person decisions and all automatic row definitions across both files. The existing exact-file person approval/decline then applies. `rigor --draft-splits` prepares existing automatic split advice instead of creating a second proposal. An exact person replacement remains authoritative on later application; a stale or unrelated row cannot impersonate it.++Pending proposals are deduplicated per cause and target. A decline covers all items seen through the actual decision, and only a new item can re-propose that declined cause. The read-only digest restates each unanswered automatic draft once per briefing after `landing.cadence`, defaulting to one day when no cadence is configured. Creation is automatic on relevant new failure moves; this is not a historical backfill, a proof of causation, or an automatic remedy.+Engine 54 replaces the automatic strong-to-strong ceiling escalation with one coordinator notice per rejection pair, naming the builder and both rejection receipts. Ordinary rejection still reopens and clears the owner and lease. Light and mid routes keep engine-50 automatic escalation. Engines 50 through 53 retain their original ceiling escalation when replayed.## Approval provenancediff --cc docs/formats.test.jsindex 5e97bee8,26b17b85..724120c2--- a/docs/formats.test.js+++ b/docs/formats.test.js@@@ -378,7 -415,7 +415,7 @@@ function recordEventContract()result: { green: false, code: 1, timedOut: false, durationMs: 0, output: 'synthetic format receipt' } });const rows = events(board).map((row) => ({ ...row, detail: JSON.parse(row.event_detail) }));closeBoard(board);-- return { rows, actors: { [coordinator]: 'coordinator', [builder]: 'builder', [returnedBuilder]: 'builder', [reviewer]: 'reviewer', [PERSON]: 'person', board: 'board' } };++ return { rows, actors: { [coordinator]: 'coordinator', [builder]: 'builder', [returnedBuilder]: 'builder', [reviewer]: 'reviewer', [PERSON]: 'person', board: 'board', rigor: 'rigor' } };}/** Reopen a file after removing old-format objects and report the repaired guard event. */@@@ -645,6 -707,6 +707,7 @@@ test('[A5] schema, versions, event kindfact: 'author',guards: 'board','rigor-notice': 'rigor',++ 'rigor-draft': 'rigor',shout: 'sender',pass: 'coordinator',answer: 'answerer',diff --cc src/board.jsindex f3f28f37,b1272a9f..8bfc90dc--- a/src/board.js+++ b/src/board.js@@@ -1370,11 -1417,10 +1422,12 @@@ export function verify(board, id, { agebefore: (found) => recordVerdict(board, found, { agentId, decision, reason: code, note, digest, head }),set: (found) => ({ item_verdict: decision, item_verified_by: isAccept ? agentId : null, item_owner: isAccept ? found.item_owner : null }),});+ if (isAccept && sandbox && outsideSource(board, id)) saveOutsideSource(board, id, { ...outsideSource(board, id), sandbox });const returnedAt = !isAccept && engine >= REOPEN_FIRST_REFUSAL_ENGINE && reopenFirstRefusalMinutes > 0 && item.item_built_by ? board.clock.now() : undefined;const reservation = !isAccept && engine >= REOPEN_FIRST_REFUSAL_ENGINE ? firstRefusalDetail(board, item, reopenFirstRefusalMinutes, returnedAt) : {};- const detail = { ...reservation, reason: code, commit: item.item_commit, ...(!isAccept && cause !== undefined && cause !== null ? { cause } : {}) };+ const derivedCause = !isAccept && engine >= RIGOR_AUTO_ENGINE+ ? deriveRigorCause(board, item, { cause, reason: code, agentId }) : !isAccept && cause != null ? { cause } : {};+ const detail = { ...reservation, reason: code, commit: item.item_commit, ...derivedCause };if (isAccept && engine >= SPEC_APPROVAL_ENGINE) detail.note = note.trim();if (isAccept && check !== undefined) detail.check = check;if (environment !== undefined) detail.environment = environment;diff --cc src/engine.jsindex 9982ad43,c332cfcd..fd15a9c9--- a/src/engine.js+++ b/src/engine.js@@@ -97,9 -101,16 +102,17 @@@ const OPERATION_ENGINE = Object.freeze(/** Dependency edits, causes, sealed reviews, submission proofs, trunk conflicts, health observations and milestone targets retain distinct recorded engine meanings. */function minimumOperationEngine(operation, args, board, at) {+ const outside = ['intakeOutside', 'approveOutside'].includes(operation) || operation === 'verify' && args[1]?.sandbox !== undefined+ || board && ['claim', 'submit', 'verify', 'merged'].includes(operation) && Boolean(outsideSource(board, args[0]));+ return Math.max(outside ? OUTSIDE_INTAKE_ENGINE : 1, minimumExistingOperationEngine(operation, args, board, at));+ }++ /** Preserve each pre-existing move's required feature level when composing outside metadata. */+ function minimumExistingOperationEngine(operation, args, board, at) {+ if (typeof args[1]?.cause === 'string' && args[1].cause.startsWith('conflict:')) return RIGOR_AUTO_ENGINE;if (['setBarReady', 'signBar'].includes(operation) || board && ['claim', 'submit', 'editItem', 'addItem', 'refreeze'].includes(operation) && barReadySetting(board).enabled) return BAR_READY_ENGINE;if (operation === 'recordPublishFinding') return PR_BRIDGE_ENGINE;+ if (operation === 'setLineSetting' && args[0]?.key === 'order') return LINE_ORDER_ENGINE;if (operation === 'recordLandingTestDefect' || operation === 'verify' && args[1]?.environment !== undefined|| operation === 'recordGateRun' && Object.hasOwn(args[0]?.receipt ?? {}, 'environment')|| operation === 'recordLandingBatch' && carriesLandingEnvironment(args[0]?.batch)) return LANDING_ENVIRONMENT_ENGINE;