Skip to content

Design governor interaction model #298

Description

@williamthorsen

Context

The governor's office is the user's shared workspace with the orchestrator. The interaction model has four tiers (observe, inspect, investigate, command) documented in packages/factory/docs/visions/facility-architecture.md. The command tier needs detailed design.

Spun out from #295. See also packages/factory/docs/visions/control-panel-research.md for patterns from Dagster, Temporal, Buildkite, Gastown, and industrial HMI.

Goal

Design the command interface for the governor's office — how the developer controls the orchestration beyond passive observation.

Commands to explore

  • Cancel run — halt the orchestration. What does this mean at the MCP/orchestration level?
  • Schedule additional review — request another review round. How does this feed back into the pipeline?
  • Add comment / course-correct — send a message to an active agent. How would this work with the Task tool / subagent model?
  • Retry failed phase — re-run a phase that failed. What state changes are needed?

For each command, answer

  1. What does the user see in the governor's office? (button on control console, context menu, keyboard shortcut)
  2. What API call does the frontend make?
  3. What happens on the server/orchestration side?
  4. What are the constraints? (Can you cancel mid-phase? Can you inject a comment into a running subagent?)
  5. What changes to run-index.json / the event log are needed?

Constraints

The orchestration system is built on Claude Code's Task tool — subagents are dispatched and run autonomously. Injecting commands into running subagents may not be possible without architectural changes. Be honest about what's feasible vs. aspirational.

Key files

  • packages/agents/content/skills/orchestrate/SKILL.md
  • packages/agents/content/skills/orchestrate/modules/review-cycle.md
  • packages/factory/src/shared/types/canonical.ts
  • packages/factory/docs/visions/control-panel-research.md

Output

packages/factory/docs/governor-interaction.md

Design complete

The governor interaction model has been designed in packages/factory/docs/governor-interaction.md. It expands the original 4 commands into a 5-tier taxonomy with 26 commands:

  • Tier 1 — Run control: Cancel, Pause/resume, Retry, Schedule review, Course-correct
  • Tier 2 — Mid-run tuning: Adjust thresholds, Skip phase, Escalate model
  • Tier 3 — Information: Cost breakdown, Phase timing, Event log, Run comparison, Run health
  • Tier 4 — Workflow integration: Approve, Push, Create PR, Create ticket, Share link, Export summary
  • Tier 5 — Learning: Annotate, Tag/bookmark, Record insight, Ask about effectiveness

Key architectural decisions: message board pattern for write commands, three execution contexts (live/waiting/exited), command palette as primary UX, governor_ event prefix convention.

Supersedes packages/factory/docs/visions/governor-commands.md.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions