Skip to content

Bluefly Factory Autonomy Architecture

Overview

The Mountain of Bluefly Factory Autonomy is the systemic capability that enables the factory to run without human orchestration (specifically, eliminating the need for Thomas to manage Claude windows manually). This document specifies the autonomous loop, identifies gaps, and defines the metrics for observing autonomous operation.

1. The Autonomous Loop

The factory operates on a continuous, event-driven cycle driven by Gas City and Beads:

  1. Orders fire: Scheduled or event-driven triggers activate predefined Orders.
  2. Formulas materialize: Orders execute Formulas, creating discrete, durable work items (Beads).
  3. Agents execute: Authorized agents discover ready Beads (via gc sling and routing rules) and perform the work.
  4. Receipts reconcile: Work completion emits verifiable receipts (via the bluefly.work-record.v1 emission contract).
  5. Beads close: Validated receipts automatically update and close the associated Beads.
  6. Dependents unblock: Closing a Bead automatically resolves dependencies, moving downstream Beads to a READY state.
  7. Next work dispatched: The coordinator (@blu) detects newly readied Beads and dispatches them to available idle agents, restarting the loop.

2. Remaining Gaps Requiring Human Intervention

Currently, Thomas is required for: 1. Credential Provisioning: 1Password secrets, API keys, and service identity tokens. 2. Product Decisions: Ambiguous feature requirements, UX design intent, and business logic. 3. Merge Authority: Approving Merge Requests to protected environments (main, production). 4. Provider Quota: Expanding rate limits and compute tier ceilings with LLM providers.

3. Convergence Path to Full Autonomy

To close the remaining gaps, the factory must implement:

  • Credential Provisioning: Convergence Path: Introduce secure, dynamic Secret Store CSI drivers and short-lived OIDC-based machine identities for Agents, replacing static PATs.
  • Product Decisions: Convergence Path: Establish a formalized "Product Owner" agent interface to generate RFCs for Thomas's asynchronous review, turning ambiguous requirements into structured acceptance criteria before Beads are created.
  • Merge Authority: Convergence Path: Elevate the @witness agent to possess automated merging authority. This requires full Dragonfly pipeline coverage and strict Cedar policy gating to guarantee fail-closed quality assurance.
  • Provider Quota: Convergence Path: Implement cross-model load balancing and automated billing threshold alerts that smoothly degrade rather than hard-failing when quotas are nearing exhaustion.

4. Autonomy Metrics

Factory autonomy is observed and measured through the following KPIs:

  • READY_BEADS_DISPATCHED_WITHOUT_HUMAN: Percentage of ready Beads picked up by agents natively without Thomas's CLI routing. (Target: 100%)
  • BEADS_CLOSED_WITHOUT_HUMAN: Percentage of Beads that transition to closed entirely through verified receipts. (Target: > 95%)
  • ORDERS_FIRED_AUTONOMOUSLY: Total number of successfully materialized Orders on schedule or event without manual gc order trigger.
  • MEAN_TIME_TO_DISPATCH: Average time elapsed between a Bead becoming READY and an agent actively claiming it. (Target: < 5m)