Skip to content

API Reference parrot.flows.dev_flow.runner

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.flows.dev_flow.runner

View source

DevFlowRunner — hosts the single dev-flow topology (FEAT-412).

DevLoopRunner switches topology per brief kind (the bug graph in :meth:run, feature-mode via _run_feature, the revision graph via run_revision). The dev-flow has exactly ONE topology, so this subclass pins it and overrides only :meth:run — brief typing, context seeding and graph selection. Everything else is inherited untouched:

  • the concurrency cap and its park-aware manual acquire/release,
  • the per-run SessionHost registry, envelope sink and actions stream,
  • gates, park/resume (resume_run), resolve_gate, cancel_run,
  • the gate-expiry / retention sweep,
  • _close_host's bundle + report persistence.

The base class's _feature_flow cache and _run_feature are left untouched and unused: a dev-flow FeatureBrief runs the dev-flow graph (whose dev_intake routes it straight to planner), not the FEAT-378 feature-mode graph.

Class DevFlowRunner

Hosts dev-flow runs behind the shared global concurrency cap.

Construct exactly like :class:DevLoopRunner, passing the flow built by :func:parrot.flows.dev_flow.flow.build_dev_flow::

runner = DevFlowRunner(
    build_dev_flow(dispatcher=..., redis_url=...),
    dispatcher=..., redis_url=...,
)

Method DevFlowRunner.run

Execute one dev-flow run for brief, respecting the run cap.

Accepts the DevFlowBrief union. Both kinds run the SAME graph — which brief was supplied only decides where dev_intake's conditional edges send it:

  • :class:DevRequestBrief (enhancement/new_feature) → ideation first (the SDD document does not exist yet).
  • :class:FeatureBrief (feature) → straight to planner. Ideation is skipped by routing, never by this runner.

run(brief: DevRequestBrief | FeatureBrief, *, run_id: str | None = None, initial_task: str = '', extra_shared: dict[str, Any] | None = None, model_plan: DevFlowModelPlan | None = None) -> FlowResult

Parameter Type Default Description
brief DevRequestBrief | FeatureBrief The validated :class:DevRequestBrief or :class:FeatureBrief to process.
run_id str | None None Optional externally-minted run identifier; one is generated (run-<hex8>) when omitted.
initial_task str '' Optional human-readable task line stored as the context's initial_task. Defaults to a per-kind summary.
extra_shared dict[str, Any] | None None Extra entries merged into shared_data — this is how the server passes per-run knobs such as require_plan_approval and skip_qa.
model_plan DevFlowModelPlan | None None FEAT-490 — optional per-run ideation model / review pair selection. Reaches build_dev_flow for THIS run only on the fresh (cache-miss) checkpoint path, via the TASK-2685 overrides seam — never stored on self, so concurrent runs never leak seats into each other. On a resumed run (mode == "resumed") this is not applied; the run keeps the seats it was created with (spec §8 Q1). None (the default) leaves every existing caller byte-identical.

Returns: FlowResult — The aggregated :class:FlowResult for the run.

Raises:

  • TypeError — brief is neither a DevRequestBrief nor a FeatureBrief (e.g. a bug-mode WorkBrief, which this topology cannot serve).

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally