agora.plan.loader
Plan loader — (agents, tasks, staged_tasks) from a v2.0 plan YAML.
This is the Flow loader layered with staging + predicate-registry plumbing.
It reuses every piece of agora.core.flow (YAML I/O, include resolution,
variable substitution, Pydantic validation) and adds:
Preserved string task ids — needed so a
staged_tasks: dict[str, StagedTask]keyed by the YAML’sidstill matches after instantiation.StagedTask construction — for every task with
stagesin the template, build aStagedTaskand key it by the task id.Test-task auto-staging (v2.4) — tasks that write a file under
tests/and expectpytest_passesget three framework stages injected (scaffold → llm → run_pytest) so the 7B tester stops guessing imports.
The return triple matches what
agora.fleet.orchestrator.Orchestrator.run_project() already consumes, so
no orchestrator changes are required.
Functions
|
Build the triple |
|
Load + validate + resolve includes for a plan YAML, returning a |
|
Serialize a |
Classes
Thin wrapper over |
- class agora.plan.loader.Plan[source]
Bases:
objectThin wrapper over
Flowexposing the richer plan shape.Currently just the Flow plus convenience accessors; kept as a separate type so future plan-level metadata (version tags, authorship, cost estimates, decision-point lists) can be added without touching the Flow dataclass.
- property agents: tuple[AgentConfig, ...]
- property task_graph
- __init__(flow)
- agora.plan.loader.instantiate_plan(plan, project_name, variables=None)[source]
Build the triple
Orchestrator.run_projectconsumes.String task ids are preserved (unlike
instantiate_flow()default) so thestaged_tasksdict keys match thetask.idvalues downstream. Variable substitution (${project_name}etc.) applies to task descriptions and agent instructions just like a v1.0 flow.v2.4: transparently wraps test-authoring tasks with a scaffold → llm → verify 3-stage pipeline so the 7B tester stops guessing imports.