nexus-agents - v2.80.0
    Preparing search index...

    Interface ExecutionPlan

    Execution plan output structure.

    The ExecutionPlan represents the Orchestrator's analysis and decomposition of a task. It can optionally be converted to a WorkflowDefinition for replayable, static execution via the WorkflowEngine.

    ExecutionPlan extends ExecutionPlanData (the pure data) with the asWorkflowDefinition conversion method.

    ARCHITECTURE.md for the separation of concerns between Orchestrator and WorkflowEngine

    interface ExecutionPlan {
        taskId: string;
        analysis: TaskAnalysis;
        subtasks: SubTask[];
        assignments: ExpertAssignment[];
        parallelGroups: string[][];
        estimatedDuration: number;
        asWorkflowDefinition(options?: PlanConversionOptions): WorkflowDefinition;
    }

    Hierarchy

    • ExecutionPlanData
      • ExecutionPlan
    Index

    Properties

    taskId: string

    The original task ID this plan was created for

    analysis: TaskAnalysis

    Analysis of the task complexity and requirements

    subtasks: SubTask[]

    Decomposed subtasks (empty if task didn't need decomposition)

    assignments: ExpertAssignment[]

    Expert role assignments for each subtask

    parallelGroups: string[][]

    Groups of subtask IDs that can execute in parallel

    estimatedDuration: number

    Estimated total duration in milliseconds

    Methods

    • Convert this execution plan to a reusable WorkflowDefinition.

      This "crystallizes" the dynamic plan into a static, replayable workflow that can be executed by WorkflowEngine.

      Parameters

      • Optionaloptions: PlanConversionOptions

        Optional conversion configuration

      Returns WorkflowDefinition

      A valid WorkflowDefinition

      const result = await techLead.execute(task);
      const plan = result.value.output as ExecutionPlan;
      const workflow = plan.asWorkflowDefinition({
      name: 'my-workflow',
      version: '1.0.0',
      });
      await workflowEngine.execute(workflow, inputs);