Skip to content

API Reference parrot.flows.dev_loop.nodes.feature_handoff

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

parrot.flows.dev_loop.nodes.feature_handoff

View source

FeatureHandoffNode — draft PR, docs artifact, wiki page, graph write-back.

Implements Module 6 of the FEAT-378 spec: the automated "sdd-done that documents" for feature-mode. After push + PR (mirroring :class:DeploymentHandoffNode's pattern — this is deliberately the SECOND and ONLY other PR-creating node in the dev-loop; the "never merge" invariant from revision_handoff.py applies here too), it:

  1. Generates and commits docs/features/feat-<id>-<slug>.md to the PR branch (directory configurable via DEV_LOOP_DOCS_ARTIFACT_DIR).
  2. Ingests that page into the LLM wiki via LLMWikiToolkit.create_page when DEV_LOOP_WIKI_PAGE_INGEST is on — degrades with a warning if unavailable. No code wikitoolkit upsert here (deferred to the post-merge hook — spec's resolved decision).
  3. Publishes the run outcome to the knowledge graph via DevLoopGraphMemory.publish_run_outcome() — a strict no-op when no facade was injected (the default).
  4. Transitions Jira + comments ONLY when a ticket key is present (feature-mode Jira is optional and link-only — this node never creates a ticket).

Never merges — no git merge / gh pr merge anywhere in this module, mirroring revision_handoff.py's explicit invariant.

Class FeatureHandoffNode

Sixth (feature-mode terminal) node — draft PR + docs + wiki + graph.

Parameter Type Default Description
jira_toolkit Optional[Any] None Optional JiraToolkit instance. Feature-mode Jira is link-only — when None (or when the run has no ticket key), zero Jira calls are made.
git_toolkit Any None Optional Git toolkit (parity with DeploymentHandoffNode — unused by the bare HTTP PR fallback, kept for interface symmetry / future use).
wiki_toolkit Optional[Any] None Optional pre-wired LLMWikiToolkit instance. Wiki ingest is skipped with a warning when None, even if DEV_LOOP_WIKI_PAGE_INGEST is on.
wiki_name str 'ai-parrot' Wiki name passed to LLMWikiToolkit.create_page.
gh_cli_path Optional[str] None Override path to the gh CLI binary.
target_repo Optional[str] None "<owner>/<repo>" for the GitHub REST fallback. Reads GITHUB_REPOSITORY env var when not provided.
base_branch str 'dev' Base branch for the draft PR (default "dev").
docs_artifact_dir Optional[str] None Directory (relative to the worktree root) for the generated docs artifact. Defaults to conf.DEV_LOOP_DOCS_ARTIFACT_DIR.
wiki_page_ingest Optional[bool] None Overrides conf.DEV_LOOP_WIKI_PAGE_INGEST when not None.
graph_memory Optional[DevLoopGraphMemory] None Optional :class:DevLoopGraphMemory used to record this run's outcome in the graph plane. None (the default) disables the seam entirely.
name str 'feature_handoff' Node id, default "feature_handoff".

Method FeatureHandoffNode.execute

Push, open a draft PR, generate docs, ingest wiki, write graph.

Reads planner_output (required), and optionally development_output / synthesis_report / qa_report / feedback_decision from shared state.

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

Parameter Type Default Description
ctx Union[FlowContext, Dict[str, Any]]
deps Optional[DependencyResults] None
**kwargs Any {}

Returns: Dict[str, Any] — {"status": "ready_to_deploy", "pr_url", "pr_number", "docs_path", "wiki_page_id"} on success, or {"status": "blocked", "error": "..."} after the PR creation retry budget is exhausted (mirrors DeploymentHandoffNode — never raises).

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