Operator Frame

Global navigation, page frame, and live control-plane status.

The shell is intentionally persistent: left-side navigation, a shared header, and durable status surfaces remain stable while future workflow views swap in.

Lane

Done

Domain

bootstrap

State

done

Work Item

Typed detail boundary

Control-plane detail payloads expose explicit context, lane, approvals, execution state, and action metadata.

Snapshot 2026-03-27T08:11:34.111Z

Done Work Item

Exchange API routes — candidate, triage, and approve action handlers

Implement the first three exchange action handler API routes using the state machine from BF-223 and contracts from BF-221. Create: POST /api/control-plane/exchange/candidates (create new exchange candidate from source repo artifact), POST /api/control-plane/exchange/[id]/triage (move candidate to triage, attach operator notes), POST /api/control-plane/exchange/[id]/approve (move triaged record to approved, validate approver role). All routes: require operator session (BF-217 middleware), validate request body with Zod, call ExchangeStateMachine.transition(), write audit event, return typed ExchangeRecord response. Routes must be context-aware: Control Plane context only for global exchange operations.

bootstrapstate: done

Execution Context

ID
wi-BF-225
Branch
bf/BF-225-exchange-api-routes-candidate-triage-approve
Validation
./scripts/validate-local.ps1
PR
https://github.com/SingletonTheory/build-factory-bootstrap/pull/285

Lifecycle Metadata

Lane
Done
Work type
feature
Source
done
Status
done
State
done
Done criteria
13

Queue Truth

Freshness: Fresh (snapshot age 0s)

Drift: none.

Reconciliation Guidance

  • No reconciliation required; item truth signals are consistent.

Prompt Context

./work-items/prompts/wi-BF-225.prompt.md

Implement the first three exchange action handler API routes using the state machine from BF-223 and contracts from BF-221. Create: POST /api/control-plane/exchange/candidates (create new exchange candidate from source repo artifact), POST /api/control-plane/exchange/[id]/triage (move candidate to triage, attach operator notes), POST /api/control-plane/exchange/[id]/approve (move triaged record to approved, validate approver role). All routes: require operator session (BF-217 middleware), validate request body with Zod, call ExchangeStateMachine.transition(), write audit event, return typed ExchangeRecord response. Routes must be context-aware: Control Plane context only for global exchange operations.

Available Actions

  • Start executionBlocked

    Queue execution handoff for this work item.

    Recovery guidance

    Cause
    Done items stay closed; Start execution cannot move them backward.
    Policy context
    Lane transition policy blocks Start execution when the item is already Done.
    Next step
    Create a net-new work item if more delivery is needed instead of reopening this one.
    Safe retry
    Do not retry Start execution on a done item.

    identity: start-execution

    permission: factory.work-item.execute

    policy gate lane-transition: blocked (Done items stay closed; Start execution cannot move them backward.)

    POST /api/control-plane/items/wi-BF-225/actions/start-execution

  • Request reviewBlocked

    Mark this item ready for review lane handoff.

    Recovery guidance

    Cause
    Done items stay closed; Request review cannot move them backward.
    Policy context
    Lane transition policy blocks Request review when the item is already Done.
    Next step
    Create a net-new work item if more delivery is needed instead of reopening this one.
    Safe retry
    Do not retry Request review on a done item.

    identity: request-review

    permission: factory.work-item.request-review

    policy gate lane-transition: blocked (Done items stay closed; Request review cannot move them backward.)

    POST /api/control-plane/items/wi-BF-225/actions/request-review

  • Prepare releaseEnabled

    Run release-preparation checks for the work item.

    identity: prepare-release

    permission: factory.work-item.prepare-release

    policy gate lane-eligibility: pass

    policy gate pull-request: pass

    POST /api/control-plane/items/wi-BF-225/actions/prepare-release

  • Record historyEnabled

    Capture history snapshots for audit and validation views.

    identity: record-history

    permission: factory.work-item.record-history

    policy gate context-visibility: pass

    POST /api/control-plane/items/wi-BF-225/actions/record-history