Skip to content

API Reference parrot.flows.dev_flow.factories

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

parrot.flows.dev_flow.factories

View source

Node factories for the dev-flow topology (FEAT-412).

Binds live dependencies to the dev-flow node types. The eight reused dev_loop.* types come straight from :func:build_dev_loop_node_factories — dev-flow does not re-implement or wrap them — and this module only adds the two dev-flow-owned intake types:

  • dev_flow.dev_intake → :class:DevIntakeNode
  • dev_flow.ideation → :class:IdeationNode

Importing this module imports both node packages, which is what guarantees their @register_dev_loop_node decorators have run before the definition is materialized.

FEAT-486 adds the model_plan seam: a :class:DevFlowModelPlan selects the LLM for each dev-flow seat, and this module turns it into the wiring the (reused) dev_loop factories already accept — a DevAgentPoolConfig plus agent_builder.build_dispatcher for the development pool, and a ParallelPerspectiveReviewDispatcher pairing a write-enabled primary reviewer with the read-only Mantle counter-reviewer for QANode. Omitting model_plan leaves every factory kwarg byte-identical to pre-FEAT-486.

Function build_dev_flow_node_factories

Return the {node type: factory} map for the dev-flow graph.

build_dev_flow_node_factories(*, dispatcher: Any, redis_url: str, jira_toolkit: Any | None = None, git_toolkit: Any | None = None, wiki_toolkit: Any | None = None, codereview_dispatcher: Any | None = None, development_dispatcher_builder: Any | None = None, development_pool_max: int = 4, graph_memory: Any | None = None, wiki_search: Any | None = None, require_plan_approval: bool = False, skip_qa: bool = False, ideation_max_rounds: int | None = None, model_plan: DevFlowModelPlan | None = None, research_coordinator: ComplementaryResearchCoordinator | None = None, research_mcp_servers: dict[str, Any] | None = None, research_mcp_tools: list[str] | None = None) -> dict[str, NodeFactory]

Parameter Type Default Description
dispatcher Any Shared ClaudeCodeDispatcher for ideation, planner, synthesis, QA and the feedback router.
redis_url str Redis URL for the intake node's event stream.
jira_toolkit Any | None None Optional service-account JiraToolkit — dev-flow Jira is link-only; None means zero Jira calls anywhere.
git_toolkit Any | None None Optional GitToolkit (parity with the ops flows).
wiki_toolkit Any | None None Optional LLMWikiToolkit for FeatureHandoffNode's docs-page ingest.
codereview_dispatcher Any | None None Optional review dispatcher for QANode (typically a JudgePanelReviewDispatcher). FEAT-486: an explicit value always wins over model_plan.review — the plan only assembles a pair when this is None.
development_dispatcher_builder Any | None None Optional (DevAgentSpec) -> (dispatcher, profile) callable for the dev-agent pool.
development_pool_max int 4 Hard cap on pool workers, also passed to PlannerNode for its own pool sizing.
graph_memory Any | None None Optional DevLoopGraphMemory forwarded to the reused QA/close/failure nodes.
wiki_search Any | None None Optional DevLoopWikiSearch. Forwarded to BOTH the reused dev_loop factories and :class:IdeationNode, which uses it to inject ranked repo context into its dispatch.
require_plan_approval bool False Build-time default for DevelopmentNode's plan_approval gate. A per-run shared["require_plan_approval"] overrides it (FEAT-412).
skip_qa bool False Forwarded to the reused QA factory.
ideation_max_rounds int | None None Override for conf.DEV_FLOW_IDEATION_MAX_ROUNDS on :class:IdeationNode. None reads the conf key at execute time.
model_plan DevFlowModelPlan | None None FEAT-486 — per-seat LLM configuration. None (default) is byte-identical to pre-FEAT-486: no pool config is derived and no dispatcher builder is defaulted. Supplying a plan (even an all-defaults one) additionally opts the run into DEV_FLOW_* env resolution via :func:~parrot.flows.dev_flow.model_plan.resolve_model_plan; a non-empty dev_pool then reaches DevelopmentNode as a DevAgentPoolConfig with agent_builder.build_dispatcher as its worker builder, and plan.review assembles QANode's review pair (unless codereview_dispatcher was passed explicitly), and plan.research_primary selects :class:IdeationNode's model.
research_coordinator ComplementaryResearchCoordinator | None None Optional :class:ComplementaryResearchCoordinator (FEAT-482) injected into :class:IdeationNode. None (default) builds a fresh one — itself an inert no-op until DEV_FLOW_RESEARCH_PARTNER is configured, so omitting this kwarg preserves the pure-addition guarantee. FEAT-486: an explicit value here still wins over model_plan's research_partner group; see :func:_resolve_research_coordinator for the full precedence.
research_mcp_servers dict[str, Any] | None None Optional EXTRA MCP server configs for :class:IdeationNode's dispatch (e.g. the FEAT-485 parrot mcp-local <toolkit> servers), merged under the node's built-in wikitoolkit entry. None (default) keeps the ideation dispatch byte-identical. Mirrors dev_loop.factories' kwarg of the same name for ResearchNode.
research_mcp_tools list[str] | None None Optional explicit mcp__... allow rules for those extra servers; None derives server-level mcp__<name> rules.

Returns: dict[str, NodeFactory] — A factory map covering the two dev_flow.* types plus every dev_loop.* type (the reused chain).

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