Skip to content

API Reference parrot.e2e.plan

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

parrot.e2e.plan

View source

Load and validate an E2E plan from its Markdown frontmatter (FEAT-581, M2).

load_plan() is the single entry point every caller (CLI, runner, dev-loop E2E stage) uses to turn one e2e-plan.md file into a fully validated :class:parrot.e2e.models.E2EPlan. Per spec §2 "Data Models":

``e2e-plan.md`` has YAML frontmatter containing the complete ``E2EPlan``;
its body is human-readable rationale. The spec remains authoritative for
policy and scenario IDs. Plan/spec disagreements are configuration
errors. Required policy demands at least one required codified scenario.
A node ID belongs to one scenario only; parameterized nodes must be
enumerated, not selected by wildcard or directory.

Every failure mode below raises :class:parrot.e2e.errors.E2EConfigError (exit code 2) before any subprocess, target adapter or client is constructed — this module has no target/provider imports and no process side effects of its own, only filesystem reads relative to worktree.

Scope boundaries (see TASK-3521): duplicate/undeclared node IDs, wildcard/bare-directory pytest selection, unsafe/escaping paths, and missing/malformed/mismatched policy are this module's responsibility. Per-adapter option-key allow-listing (TargetConfig.options) is explicitly deferred to the M4 target adapters (see parrot.e2e.models.TargetConfig docstring); this module only rejects target references that are not declared in the plan's own targets map (surfaced from :class:parrot.e2e.models.E2EPlan's own validators).

Function load_plan

Validate frontmatter, contained paths and spec/plan policy consistency.

load_plan(path: Path, *, worktree: Path) -> E2EPlan

Parameter Type Default Description
path Path Path to the e2e-plan.md document (absolute or relative to the current working directory); its resolved location must lie inside worktree.
worktree Path Canonical worktree root every plan/spec path must resolve inside of.

Returns: E2EPlan — The fully validated :class:E2EPlan.

Raises:

  • E2EConfigError — If the plan file is missing/unreadable, its frontmatter is absent/malformed, the resolved plan or referenced spec path escapes worktree, the referenced spec is missing, the parsed content fails :class:E2EPlan validation (duplicate or undeclared node/target/prerequisite IDs, wildcard or bare-directory node selection, an invalid/malformed policy value, ...), or — only when path is the canonical sdd/state/<feature_id>/e2e-plan.md — its policy/scenario IDs disagree with the ones declared by the authoritative spec's own frontmatter.

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