Skip to content

API Reference parrot.flows.dev_loop.nodes.development

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

parrot.flows.dev_loop.nodes.development

View source

DevelopmentNode — sdd-worker dispatch, single-agent or multi-agent pool.

Implements Module 6 of FEAT-323 (parallel development node), extending the original Module 6 of FEAT-129/FEAT-250 (single sdd-worker dispatch).

Config cascade (FEAT-323): the brief's dev_agents takes priority over a pool_config injected at construction time (resolved from env by the server/factories, TASK-1859, or from FEAT-486's model_plan); when neither is present the node runs the exact single-dispatch path from before this feature — same default profile, same node_id, same cwd.

The brief is read from every key a dev workflow publishes it under: work_brief/bug_brief (dev-loop bug mode) and feature_brief/dev_brief (dev-flow). Reading only the first pair silently disabled the per-run pool for every dev-flow run — the console's rows reached this node on the brief and were dropped one line before use, so the build-time plan always won and the UI told operators to restart the server to change a seat that was in fact meant to be per-run.

The dispatcher's R4 cwd-safety check verifies that any dispatch cwd (including sub-worktrees created for 'isolated' mode) lives under conf.WORKTREE_BASE_PATH. This node trusts that check and does not duplicate it, beyond building sub-worktree paths through :class:SubWorktreeManager, which enforces the same invariant.

Class DevelopmentNode

Third node — dispatches the implementation phase to sdd-worker(s).

Parameter Type Default Description
dispatcher DevLoopCodeDispatcher The single-agent dispatcher (unchanged behaviour when no pool config resolves).
dispatch_profile Optional[Any] None The single-agent dispatch profile override.
pool_config Optional[DevAgentPoolConfig] None An already-resolved pool config (e.g. parsed from DEV_LOOP_DEV_AGENTS by the server/factories, TASK-1859). A WorkBrief.dev_agents found in shared state at execute() time always takes priority over this.
dispatcher_builder Optional[DispatcherBuilder] None (DevAgentSpec) -> (dispatcher, profile) callable used to materialize pool workers and the conflict resolver's claude-code fallback. Required for the pool path; its absence degrades to single-agent with a warning.
pool_max int 4 Hard cap on total pool workers (DEV_LOOP_DEV_POOL_MAX).
require_plan_approval bool False FEAT-377 TASK-1916 (G5) opt-in — when True AND a SessionHost is present, opens a plan_approval gate on this node's FIRST entry (before any dispatch) and awaits its resolution. Mirrors DeploymentHandoffNode.require_deployment_approval's shape/fail-open-on-no-host semantics; placed here (the first node after ResearchNode) because the engine has no external "pause between two nodes" hook — every existing gate is opened and awaited FROM WITHIN the node that would otherwise act next, which is what actually blocks the scheduler's dispatch of that node's own work.
jira_toolkit Any None Optional Jira toolkit for transitioning the ticket to "In Progress" at the start of development.
name str 'development' Node id.

Method DevelopmentNode.execute

Dispatch sdd-worker inside the upstream worktree.

execute(ctx: Union[FlowContext, Dict[str, Any]], deps: Optional[DependencyResults] = None, **kwargs: Any) -> DevelopmentOutput

Parameter Type Default Description
ctx Union[FlowContext, Dict[str, Any]] Flow context whose shared state must contain "run_id" and "research_output" (a :class:ResearchOutput produced by ResearchNode).
deps Optional[DependencyResults] None Dependency results (unused — payloads travel in the shared state).
**kwargs Any {} Extra execution context (ignored).

Returns: DevelopmentOutput — The validated :class:DevelopmentOutput (single-agent output, or the pool-aggregated output — same shape either way).

Raises:

  • ValueError — Propagated from TaskScheduler on a depends_on cycle.
  • SubWorktreeMergeError — Propagated when 'isolated' mode hits an unresolvable merge conflict.
  • RuntimeError — When every dispatchable task in the pool path ends up incomplete (the flow must not proceed to QA).

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