Skip to content

API Reference parrot_formdesigner.audio.planner

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

parrot_formdesigner.audio.planner

View source

Visible-plan computation for audio form sessions (FEAT-649, Module 5).

Alias AudioAnswer

Re-exported from parrot_formdesigner.audio.models.AudioAnswer.

Alias AudioFormManifest

Re-exported from parrot_formdesigner.audio.models.AudioFormManifest.

Alias FieldType

Re-exported from parrot_formdesigner.core.types.FieldType.

Alias FormSchema

Re-exported from parrot_formdesigner.core.schema.FormSchema.

Alias FormSubsection

Re-exported from parrot_formdesigner.core.schema.FormSubsection.

Class PlanDelta

What changed between two re-plans.

Fields:

Field Type Default Description
order list[str]
hidden list[str]
cleared list[str]
required_changed dict[str, bool]
hidden_by_cap list[str]
entered_section str | None None
computed dict[str, Any]

Class QuestionPlanner

Compute the visible, capped question plan from the manifest and RuleEvaluator.

Parameter Type Default Description
form FormSchema
manifest AudioFormManifest
cfg VoiceFormConfig

Method QuestionPlanner.section_of

Section uid (str) owning field_id.

section_of(field_id: str) -> str | None

Parameter Type Default Description
field_id str

Returns: str | None

Method QuestionPlanner.effective_required

Dynamic RuleResolution.required (S1a); falls back to the manifest flag before the first replan.

effective_required(field_id: str) -> bool

Parameter Type Default Description
field_id str

Returns: bool

Method QuestionPlanner.replan

Re-run RuleEvaluator.resolve() and return (plan, delta); required fields always survive the cap.

replan(answers: dict[str, AudioAnswer], *, locale: str, resolution: RuleResolution | None = None) -> tuple[list[str], PlanDelta]

Parameter Type Default Description
answers dict[str, AudioAnswer]
locale str
resolution RuleResolution | None None

Returns: tuple[list[str], PlanDelta]

Method QuestionPlanner.next_cursor

First field_id in plan without an accepted answer; None -> review.

next_cursor(plan: list[str], answers: dict[str, AudioAnswer]) -> str | None

Parameter Type Default Description
plan list[str]
answers dict[str, AudioAnswer]

Returns: str | None

Method QuestionPlanner.previous

Target of a go-back: explicit field if planned, else the latest history entry still in plan.

previous(plan: list[str], history: list[str], to_field_id: str | None) -> str | None

Parameter Type Default Description
plan list[str]
history list[str]
to_field_id str | None

Returns: str | None

Alias RuleEvaluator

Re-exported from parrot_formdesigner.services.rule_evaluator.RuleEvaluator.

Alias RuleResolution

Re-exported from parrot_formdesigner.services.rule_evaluator.RuleResolution.

Alias VoiceFormConfig

Re-exported from parrot_formdesigner.core.voice.VoiceFormConfig.

Alias unwrap_voice

Re-exported from parrot_formdesigner.core.voice_answer.unwrap_voice.

Alias walk_fields

Re-exported from parrot_formdesigner.core.schema.walk_fields.

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