Skip to content

Factory visualization: two-level catwalk layout with artifact lifecycle #161

Description

@williamthorsen

Problem

The Factory visualization renders orchestrated development runs as a 2D Excalibur game scene, but currently lacks visual representation of several core aspects of the orchestration process:

  1. Code as a fabricated product — the visualization doesn't show code being made; artifacts appear as uniform colored squares with no lifecycle
  2. Orchestrator as hub/dispatcher — the orchestrator walks linearly through stations, but in reality it dispatches work to agents, collects results, consolidates reviews, and shuttles between stations
  3. Review-fix cycle — the iterative loop (coder receives consolidated findings → fixes code → re-delivers) is completely invisible
  4. Artifact provenance — no way to see who produced each artifact, how it was consumed, or its relationship to other artifacts
  5. Parallel work — reviewers working simultaneously is indistinguishable from sequential work

Relevant considerations

  • This is above all an educational tool about code orchestration. Visual clarity for understanding the process takes priority over game aesthetics.
  • The visualization should be flexible enough to represent any orchestrated workflow, not just the current 7-phase pipeline. The orchestrate skill is generic; if we handle its abstractions (phases, subagents, artifacts, iterations), we can visualize any run.
  • Placeholder fidelity is fine — labeled blocks for artifacts, existing sprites for agents. The goal is to get placement, movement, and state transitions right as a skeleton for future development (item sprites, tooltips, interactivity come later).
  • The existing Excalibur game engine (v0.32), sprite system, gate animations, and multi-level layout support provide a solid foundation to build on.

Proposed solution

Redesign the factory layout as a two-level factory with:

  • Catwalk (upper level) — The orchestrator walks here exclusively, acting as a foreman/dispatcher. It never descends to the ground floor.
  • Ground floor (lower level) — Workstations arranged left-to-right in phase order, with subagents at each station.
  • Vertical chutes — Connect catwalk to ground stations. Artifacts visibly descend (dispatch) and ascend (collection) through these chutes. Parallel dispatch (review phase) activates all chutes simultaneously.
  • Three-beat cycle — Every phase follows: Dispatch (artifact descends) → Work (agent animates, new artifact materializes) → Collect (artifact ascends to orchestrator).
  • Review-fix shuttle — The orchestrator physically walks back and forth between the coder and review stations on the catwalk, carrying code forward and consolidated fixes backward. Round counter shows iteration progress. Selective re-review activates only affected reviewers.
  • Three-layer artifact model:
    • Station records (always visible): copies of artifacts at producing stations, with stacking for superseded versions
    • Conveyor artifacts (visible during movement): items carried by the orchestrator, with opacity reflecting lifecycle state
    • Paper trail (on-click, post-run): thin glowing lines connecting artifacts to their sources, revealing the dependency chain

Acceptance criteria

  • Two-level layout renders: catwalk above, ground-floor stations below, with vertical chute lines connecting them
  • Orchestrator walks exclusively on the catwalk, never on the ground floor
  • Artifacts descend through chutes (dispatch) and ascend through chutes (collection) with visible animation
  • Parallel dispatch shows all reviewer chutes activating simultaneously
  • Review-fix shuttle cycle: orchestrator walks back and forth between coder and review stations, carrying artifacts
  • Round counter displays current review iteration (e.g., "Round 1/3")
  • Selective re-review: only affected reviewers reactivate; others remain "resting"
  • Station records persist at stations after phase completes, with stacking for superseded versions (e.g., code v1 under code v2)
  • Artifacts rendered as labeled, colored blocks (placeholder for future item sprites)
  • Skipped phases appear as dark/inactive stations
  • Station count is dynamic (driven by run's phase data, not hardcoded)
  • Existing tests pass with updated SceneConfig shape
  • Demo mode can step through all state transitions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions