Step 2 · Mental model · Mental model · O·W·V architecture ENPT
Factory Droid CLI Missions · Visual Course

Orchestrator · Worker · Validator

Three roles, one programmatic runner: plan upfront, implement feature-by-feature, validate at milestones.

Read the plain version, or open the technical layer on any section.
1

The big idea


Missions splits agent work into three layers that don't share one bloated chat thread.

Orchestrator — the project manager. One long-lived session with interactionMode: mission. It writes the validation contract before locking features, maintains shared artifacts, calls propose_mission for your approval, then start_mission_run. It does not accumulate implementation detail.

Worker — the implementer. The mission runner spawns a fresh session per feature from features.json. Each worker gets one spec + a skill file, implements with local TDD, and returns a structured handoff JSON. Workers don't declare "done" — validators do.

Validator — the inspector. When a milestone's features complete, the system auto-injects scrutiny-validator and user-testing-validator features. Sub-droids review code and test real user flows against assertion IDs in the validation contract. Failures become fix features; the loop repeats.

Think of it like… a film production. The director (orchestrator) holds the script and schedule but doesn't operate every camera. Each scene gets a dedicated crew (worker) with a clean call sheet. At the end of each act, quality control (validators) runs dailies and reshoot lists before the next act starts. The director never manually picks "take 47" for every shot — a programmatic runner advances the queue.

Session types (binary constants)

mission-orchestrator, mission-worker, mission-session tag. Child sessions indexed via decompMissionId in session-discovery-index.json.

Mission runner

Programmatic loop post-start_mission_run: "takes the feature list and spawns a worker for each feature in order." Resuming after pause picks up the pending feature — no arbitrary skip. Cost heuristic: total runs ≈ #features + 2 × #milestones (+ fix rounds).

Critical prohibition

Binary prompt: NEVER create features with skillName scrutiny-validator or user-testing-validator — system auto-injects them at milestone end.

Ad hoc Task delegation

Orchestrator may call Task with subagent_type: "worker" for exploration — distinct from the formal runner executing features.json.

2

In one picture


User /missions exec --mission Orchestrator interactionMode=mission mission-planning + define-mission-skills validation-contract BEFORE features ~/.factory/missions/<uuid>/ artifacts propose_mission → approve → start_mission_run Mission Runner Feature Worker 1 feature ≈ 1 fresh session handoffs/*.json worker-transcripts Milestone? yes scrutiny + user-testing auto-injected validators no → next feature Mission Control Ctrl+T · orchestrator only
Top-down flow matching the RE mermaid diagram: orchestrator plans and approves; programmatic runner executes workers sequentially; milestone gates trigger auto-injected validators; Mission Control supervises from the orchestrator session only.
USER → /missions or droid exec --mission
  → ORCHESTRATOR (interactionMode=mission)
    → mission-planning + define-mission-skills
    → ~/.factory/missions/<uuid>/
    → propose_mission → (approve) → start_mission_run
      → MISSION RUNNER (programmatic, sequential)
        → FEATURE WORKER (fresh session each)
        → handoffs/*.json
        → milestone? → scrutiny-validator + user-testing-validator
        → pass? → next milestone : fix features → re-validate
  → MISSION CONTROL (Ctrl+T, orchestrator only)
3

In the code


The orchestrator's two mission-specific tools and the progress events the runner emits.

Binary tool enum (NY) + progress_log vocabulary (dw)
# Orchestrator tools
propose_mission   # present proposal to operator
start_mission_run # kick programmatic runner

# Progress events (progress_log.jsonl)
mission_run_started
worker_started
worker_selected_feature
worker_completed
worker_failed
milestone_validation_triggered

# Validator skillNames (auto-injected — do NOT add manually)
scrutiny-validator
user-testing-validator
~/.factory/droids/ (custom sub-droids)
worker.md                      # generic feature worker
scrutiny-feature-reviewer.md   # per-feature code audit
user-testing-flow-validator.md # assertion IDs from contract

state.json enum

planningawaiting_inputinitializingrunningpaused / orchestrator_turncompleted | cancelled

4

Try it: three layers


Click each role. See what it owns — and what it deliberately does not do.

Owns: mission.md, validation-contract.md, features.json, propose_mission, start_mission_run, Mission Control.
Does not: implement features line-by-line or declare milestones "done."
Owns: one feature spec, skill procedure, TDD implementation, handoff JSON (salientSummary, commitId, skillFeedback).
Does not: judge correctness — returns evidence; validators decide.
Owns: scrutiny gates (test/lint/typecheck), user-flow tests against VAL-* assertion IDs, evidence/ screenshots.
Does not: get created manually in features.json — auto-injected at milestone end.
Next up: the files on disk — what each artifact contains and how handoffs link workers to validators.