agora.plan
Plan package — declarative v2.0 plan format layered on top of agora.core.flow.
A plan is a Flow (existing YAML template with agents + task DAG) extended with:
Typed postcondition references resolved via
agora.plan.predicate_registry.Optional stage templates for per-task staged execution.
output_pathhints that travel with the task.
The loader returns the triple (agents, tasks, staged_tasks) that
agora.fleet.orchestrator.Orchestrator.run_project() already consumes —
no orchestrator changes required.
- class agora.plan.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.build_predicate(name, args=None)[source]
Construct a
Predicateby registered name + kwargs.
- agora.plan.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.
- agora.plan.list_registered_predicates()[source]
Sorted list of registered predicate names (useful for generating docs + planner KB).
- agora.plan.load_plan(path)[source]
Load + validate + resolve includes for a plan YAML, returning a
Plan.
- agora.plan.register_predicate(name)[source]
Decorator: register
factoryundername.Factories must accept only JSON-serializable kwargs (
str,int,float,bool,list,dict). Callers should not register from within tests at import time — seetests/plan/conftest.pyfor the cleanup pattern if a test needs to add a predicate temporarily.
Modules
Parse the plan-builder's shared API spec into structured module specs. |
|
Mutable in-memory plan state for tool-driven plan authoring. |
|
Agora handoff — mechanical PROJECT_STATE.md assembly (integration run 2.4). |
|
Reusable orchestrator harness for plan runners. |
|
Plan loader — |
|
AST-aware upsert helpers for Python source files. |
|
Named-predicate registry: the bridge between YAML plan references and runtime Predicates. |
|
Probe-specific postconditions for the tool-call fidelity probe (axis 1). |
|
|
|
Structural models of plan artifacts + comparators for cross-layer drift. |
|
Pure helpers for the |