Generalized Flight Topologies: Decoupling Execution Shapes from Hardcoded Agent Roles
Abstract
Hardcoding an illustrative three-role metaphor into schemas and TypeScript types locked flights to a rigid triad and forced trivial work to pay a three-pass tax. Flight topologies treat dialectic synthesis as one shape in a catalog — solo, pair, dialectic, arena, pipeline, council — expressed as a generic node/edge graph rather than named columns. This paper specifies the catalog, the declarative schema, and the D1 migration shape.
Abstract
In an early multi-agent flight package, an illustrative user prompt and metaphor was hardcoded into the system architecture as fixed models, columns, and interfaces. That is the prompt-reflection anti-pattern: a transient example becomes a permanent schema fixture.
The underlying formula (drafter → critic → synthesizer) is valuable. It is classical dialectic synthesis. It must be treated as one topology among a library of declarative flight shapes, not as the only execution engine Mupot can run.
1. The Prompt-Reflection Anti-Pattern
Specific deficiencies of a hardcoded triad:
- Schema rigidity. Fields such as
terraModel,lunaModel,solModelin D1 schemas and TypeScript types lock flights to a rigid 3-model setup. - Inflexible workflows. A lint fix or README update pays the latency and cost tax of a 3-pass synthesis, while complex governance cannot scale to N-agent juries or tournament-style benchmarking.
- Loss of generality. Mupot is reduced to a single-pattern executor rather than a universal multi-agent flight engine.
2. Catalog of Shapes
1. SOLO (Direct) 2. PAIR (Maker-Checker) 3. DIALECTIC (Triad Synthesis)
┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐
│ Worker │ ──► [Receipt] │ Builder │─► Checker │ │ Drafter │ │ Critic │
└───────────┘ └───────────┘ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
│ │ │
▼ └──────┬──────┘
[Receipt] ▼
┌─────────────┐
│ Synthesizer │ ──► [Receipt]
└─────────────┘
4. ARENA (Tournament) 5. PIPELINE (Sequential) 6. COUNCIL (Consensus/Jury)
┌───────────┐ ┌─────┐ ┌──────┐ ┌──────┐ ┌─────────────────────────┐
│ Candidate1│──┐ │Spec │─► Code │─► Test │ │ Agent 1 Agent 2 Agent 3│
├───────────┤ │ └─────┘ └──────┘ └───┬──┘ └────────────┬────────────┘
│ Candidate2├──┼► [Judge] │ │
├───────────┤ │ │ ▼ ▼
│ Candidate3│──┘ ▼ [Receipt] [Quorum / Vote] ──► [Verdict]
└───────────┘ [Winner]| Topology Key | Pattern | Role Cardinality | Best For | Cost Profile |
|---|---|---|---|---|
solo | Direct execution | 1 model | Lint, format, doc edits, trivial tool calls | Ultra-low |
pair | Maker-checker / gate | 2 models | Standard feature PRs, routine bug fixes | Balanced |
dialectic | Triad synthesis | 3 roles | Architecture, security-sensitive code, multi-file refactors | High quality |
arena | Tournament / best-of-N | N competitors → 1 judge | Algorithm optimization, creative drafting, prompt tuning | High compute |
pipeline | Sequential stages | N sequential | Spec → code → test → docs | Staged |
council | Consensus / jury | N voting peers → quorum | Multi-sig gates, high-risk deploys, governance | Highest trust |
3. Declarative Schema
Hardcoded role fields are replaced with a generic graph:
export type FlightTopologyKind =
| 'solo'
| 'pair'
| 'dialectic'
| 'arena'
| 'pipeline'
| 'council'
export interface FlightNodeDefinition {
nodeId: string
role: 'proposer' | 'reviewer' | 'synthesizer' | 'judge' | 'worker'
provider?: string
model?: string
temperature?: number
promptTemplateKey?: string
}
export interface FlightEdgeDefinition {
fromNode: string
toNode: string
payloadKey: 'draft' | 'critique' | 'candidate' | 'verdict'
}
export interface FlightTopology {
id: string
name: string
kind: FlightTopologyKind
nodes: FlightNodeDefinition[]
edges: FlightEdgeDefinition[]
synthesisStrategy?: 'direct' | 'unanimous' | 'highest_score' | 'llm_reconciled'
executionTarget: 'worker_v8' | 'cloudflare_sandbox' | 'host_seat'
}4. D1 Shape
CREATE TABLE flight_topologies (
id TEXT PRIMARY KEY,
tenant TEXT NOT NULL DEFAULT 'mumega',
kind TEXT NOT NULL,
name TEXT NOT NULL,
description TEXT,
nodes_json TEXT NOT NULL,
edges_json TEXT NOT NULL,
synthesis_strategy TEXT NOT NULL DEFAULT 'direct',
execution_target TEXT NOT NULL DEFAULT 'worker_v8',
created_at INTEGER NOT NULL,
updated_at INTEGER NOT NULL
);
ALTER TABLE flights ADD COLUMN topology_id TEXT REFERENCES flight_topologies(id);5. Engine Refactoring Plan
- Retain multi-pass mechanics. Prompt synthesis, tool calling, and sandbox execution remain active.
- Strip fixed names. The flight engine consumes
FlightTopologyrather than named triad columns. - Dynamic node evaluation. The pipeline iterates
topology.nodes, executing parallel branches and feeding outputs into dependent nodes fromtopology.edges. - Built-in presets.
dialectic-v1,pair-v1, andsolo-v1ship as defaults.
6. Strategic Impact
- The system stops treating transient prompt metaphors as permanent schema fixtures.
- External teams and internal agents can compose execution graphs in YAML/JSON without core codebase changes.
- Operators can configure flight topologies per squad, per project, or per task priority.