Bluefly Work Record Emission Contract¶
Overview¶
This document defines how operations (Agents, Formulas, Orders) emit governed work records that conform to the bluefly.work-record.v1 schema, and how ContextControl consumes these records to render the factory state.
1. Emission Mechanism¶
Records MUST be emitted simultaneously to two durable stores:
1. Bead Notes: Embedded within the canonical Bead tracking the work, formatted as a JSON fenced code block.
2. Gas City Events: Broadcasted as an immutable gc event emit payload to enable real-time reactive supervision.
Format¶
The payload MUST be valid JSON conforming to the bluefly.work-record.v1 schema.
In Bead Notes, the payload must be encapsulated as:
{
"record_type": "...",
"state": { ... },
"evidence": { ... }
}
2. Emission Points in the Governed Lifecycle¶
The governed-work-lifecycle Formula dictates the primary emission points:
- Intake (
work-request-intake) - Trigger: New Bead claimed or initialized.
- Record Type:
request -
State:
state.work = open -
Decision & Routing (
blocked-work-route) - Trigger: Agent handoffs, capability gaps, or architectural blockers.
- Record Type:
decision -
State:
state.work = blockedoropen -
Reconciliation (
delivery-reconcile) - Trigger: CI pipelines run, or Merge Requests mutated.
- Record Type:
progress -
State:
state.work = in-progress, capturing MR states and pipeline status. -
Closure (
receipt-on-close) - Trigger: MR merged, verification passed.
- Record Type:
receipt - State:
state.work = completed - Evidence: MUST include
wasGeneratedBy,wasDerivedFrom, andwasAttributedTo.
3. Projection Contract (ContextControl)¶
ContextControl acts as the projection and rendering layer for the Bluefly factory.
Consumption¶
- It queries the active Bead graph.
- It parses the Markdown notes to extract all
jsonblocks matching thebluefly.work-record.v1signature. - It listens to
gc event streamfor real-time updates.
Rendering¶
- Work Timeline: Renders the sequence of
request->decision->progress->receipt. - Dependency Graph: Uses
wasDerivedFromlinks to draw the relationship between dependent Beads. - Verification Receipts: Highlights the final
receiptrecord as the unforgeable proof of work, displaying attribution and tooling evidence directly to the operator.