CRD Reference

AgentPlan Reference

Orchestrate multi-step workflows with AI decomposition, dependency ordering, and shared or isolated context

Overview

An AgentPlan (apiVersion: nominos.io/v1) coordinates several AgentJobs against one repository. You either write the steps yourself (decompositionMode: manual) or give a high-level task and let a model break it down (decompositionMode: ai). The controller creates one AgentJob per step, respecting execution order, dependencies, and the failure strategy.

kubectl
kubectl get agentplans
NAME                     PHASE     MODE     PROGRESS   TOTAL   AGE
security-patch-rollout   Running   manual   1          3       4m

Spec Fields

FieldTypeDefaultDescription
repositoryRepositorySpecRepository for all jobs in this plan. Same shape as AgentJob’s spec.repository. Required.
decompositionModeenum: manual | aiHow tasks are defined: you write the steps (manual) or an AI breaks down a high-level task (ai). Required.
taskstringFor AI decomposition: the high-level task to break down. Required when decompositionMode is ai.
stepsPlanStep[]For manual decomposition: the list of sub-tasks. Required when decompositionMode is manual.
executionModeenum: sequential | parallel | mixedsequentialOne step at a time, all steps concurrently, or dependency-aware (mixed respects dependsOn and per-step parallel flags).
defaultContextModeenum: shared | isolatedsharedshared: each step starts on the same branch and sees previous commits. isolated: each step starts fresh from the base branch.
createDraftPRbooleanfalseCreate PRs as drafts.
agentAgentSpecDefault agent configuration for all steps (image, model, harness, maxTurns, …).
maxCostDollarsstringMaximum total spend in dollars for the entire plan.
mergeQueueMergeQueueRefMergeQueue to enqueue PRs into. Sub-fields: name, namespace (defaults to the plan’s namespace), disabled (opt out entirely).
defaultPRLabelsstring[]Default labels for PRs created by steps in this plan.
failureStrategyenum: FailFast | ContinueOnFailureContinueOnFailureStop the plan on the first failed step, or keep running independent steps.
mergeStrategyenum: squash | merge | rebasesquashHow PRs created by this plan’s jobs are merged.

Steps (PlanStep)

FieldTypeDefaultDescription
namestringStep identifier, unique within the plan. Required.
taskstringTask description for this step. Required.
focusFilesstring[]Files the agent should focus on.
contextstringAdditional context for this step.
contextModeenum: shared | isolatedplan defaultOverride the plan’s defaultContextMode for this step.
dependsOnstring[]Steps that must complete before this one runs.
parallelbooleanfalseWhether this step may run alongside other ready steps (mixed mode only).
modelstringagent.modelModel override for this step.
maxTurnsintegeragent.maxTurnsTurn-limit override for this step.
agentAgentSpecplan agentFull agent-config override for this step.
timeoutSecondsinteger3600Timeout for this specific step, in seconds.

Per-step model choice

Each step can override model, maxTurns, or the whole agent config — use a frontier model for the hard refactor step and a cheaper model for the mechanical cleanup steps in the same plan.

Status

Plan Phases

PhaseMeaning
PendingPlan is waiting to start.
DecomposingAI is breaking the task down into steps (ai mode only).
RunningSteps are being executed.
CompletedAll steps completed successfully.
FailedOne or more steps failed.

Status Fields

FieldDescription
phase / messagePlan phase (see above) and a human-readable status message.
startTime / completionTimeWhen the plan started and finished.
generatedStepsFor AI decomposition: the steps the model produced.
stepStatusesPer-step status: phase (Pending, Running, Completed, Failed, Skipped), job reference, branch, commits, PR URL, files changed, errors.
completedSteps / totalStepsOverall progress counters.
jobRefsAgentJobs created for the plan.
pending / running / failedAggregate step counts by state.
estimatedCostDollarsTotal estimated cost across all steps.
workBranchCurrent working branch (shared context mode).
eventsSignificant events during execution (bounded to the last 50): phase transitions, job creation, step start/finish, decomposition progress.
phaseHistoryEnter/exit timestamps for each phase the plan has been in.
decompositionJobRef / decompositionPrompt / decompositionLogs / decompositionParserAI-mode introspection: the decomposition job, the prompt sent, the first 10K chars of output, and which parser extracted the steps.
conditionsStandard Kubernetes conditions.

Examples

Manual plan with dependencies

agentplan-manual.yaml
apiVersion: nominos.io/v1
kind: AgentPlan
metadata:
  name: security-patch-rollout
spec:
  decompositionMode: manual
  executionMode: mixed
  failureStrategy: ContinueOnFailure
  repository:
    url: https://github.com/myorg/myapp
    baseBranch: main
    createPR: true
  steps:
    - name: patch-auth-service
      task: "Apply security fix to the auth module"
      focusFiles: ["services/auth/"]
    - name: patch-api-gateway
      task: "Update API gateway dependencies"
      dependsOn: [patch-auth-service]
    - name: update-docs
      task: "Document the new auth behavior"
      parallel: true
      model: claude-haiku-4-5   # cheaper model for the easy step

AI decomposition with a merge queue

agentplan-ai.yaml
apiVersion: nominos.io/v1
kind: AgentPlan
metadata:
  name: add-rate-limiting
spec:
  decompositionMode: ai
  task: "Add per-tenant rate limiting to all public API endpoints, with tests"
  executionMode: sequential
  defaultContextMode: shared
  repository:
    url: https://github.com/myorg/api
    baseBranch: main
  mergeQueue:
    name: main-queue
  maxCostDollars: "10.00"

In AI mode the plan first enters Decomposing, records the generated steps in status.generatedSteps, then runs them like a manual plan. PRs land in the referenced MergeQueue.