Skip to content

API Reference parrot.flows.dev_flow.nodes.dev_intake

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

parrot.flows.dev_flow.nodes.dev_intake

View source

DevIntakeNode — first node of the dev-flow graph (FEAT-412).

Validates the user-selected :data:DevFlowBrief and returns it so the topology's CEL edge predicates can route on result.kind:

  • "enhancement" / "new_feature" → dev_flow.ideation (the request is natural language; the SDD document does not exist yet).
  • "feature" → dev_loop.planner (an SDD brainstorm/proposal/spec was supplied; ideation is skipped entirely).

There is deliberately no LLM intent classification here (spec §1 Non-Goals / §8): the user picks the intent in the UI, and this node only validates the typed brief — exactly the relationship IntentClassifierNode has to WorkBrief, whose pattern this node mirrors (ctx-or-JSON-prompt loading, lazy Redis, one flow.intake_validated event, return-the-brief-for-routing).

No allowlist/path-traversal guards apply: those are WorkBrief.acceptance_criteria-specific and neither :class:DevRequestBrief nor :class:FeatureBrief carries acceptance criteria. A FeatureBrief's own constructor validates document_path readability eagerly, so an invalid brief fails inside :meth:_load_brief — before this node returns and before any dispatch.

Class DevIntakeNode

Validates a :data:DevFlowBrief and routes by kind.

Parameter Type Default Description
redis_url str Redis URL used to publish flow.intake_validated. The connection is lazy: the node is safe to construct without a live Redis instance — the publish happens on first :meth:execute.
name str 'dev_intake' Node identifier, defaults to "dev_intake".

Method DevIntakeNode.execute

Validate the dev-flow brief and emit the intake event.

execute(ctx: FlowContext | dict[str, Any], deps: DependencyResults | None = None, **kwargs: Any) -> DevRequestBrief | FeatureBrief

Parameter Type Default Description
ctx FlowContext | dict[str, Any] Flow context (FlowContext or plain dict in tests). The shared state must contain "run_id" for the event stream key and may contain "dev_brief" or "feature_brief" (an instance or a dict); the context's initial_task is used as a JSON fallback when neither is present.
deps DependencyResults | None None Dependency results (unused — this is the entry node).
**kwargs Any {} Extra execution context (ignored).

Returns: DevRequestBrief | FeatureBrief — The validated :class:DevRequestBrief or :class:FeatureBrief. The topology's conditional edges read result.kind to route to ideation or straight to planner.

Raises:

  • ValueError — When no brief source is available, when kind is absent/unknown, or when the loaded brief fails validation (e.g. an unreadable FeatureBrief.document_path — pydantic.ValidationError subclasses ValueError) — always BEFORE this node returns.

Method DevIntakeNode.close

Release the Redis client connection pool.

close() -> None

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