---
title: "plan"
description: "Create action sequence to achieve goal"
canonical: "https://acs.synapti.ai/capabilities/plan/"
last_updated: "2026-11-16T01:14:10Z"
---

# plan

Create action sequence to achieve goal

Generated from [schemas/capability_ontology.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/capability_ontology.yaml), [skills/plan/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/plan/SKILL.md) at commit 18c38b74ac21. Ontology version 2.2.0.

Layer: [REASON](https://acs.synapti.ai/layers/reason/index.md)

## Safety

| Property | Value |
| --- | --- |
| Risk | Low |
| Changes state | No |
| Needs checkpoint | No |
| Needs approval | No |
| Overridable | No |
| Blocked from autonomy | No |

**Figure: Ordering rules for plan in a workflow.** In a workflow, where the workflow has execute and mutate, plan must come before them (V102).

| Where | Capability | Rule | Enforcement | Diagnostic |
| --- | --- | --- | --- | --- |
| After plan | [`execute`](https://acs.synapti.ai/capabilities/execute/index.md) | `precedes` | MUST | V102 |
| After plan | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `precedes` | MUST | V102 |

## Relationships

**Figure: Relationships of plan: 10 relationships with 8 capabilities.** plan has 10 relationships with 8 capabilities: 3 with edges into it and 5 with edges out of it.

| Capability | Row | Relationships |
| --- | --- | --- |
| [`compare`](https://acs.synapti.ai/capabilities/compare/index.md) | Edges into plan | `enables` (into) |
| [`discover`](https://acs.synapti.ai/capabilities/discover/index.md) | Edges into plan | `enables` (into) |
| [`critique`](https://acs.synapti.ai/capabilities/critique/index.md) | Edges out of plan | `enables` (out of) |
| [`attribute`](https://acs.synapti.ai/capabilities/attribute/index.md) | Edges into plan | `enables` (into) |
| [`generate`](https://acs.synapti.ai/capabilities/generate/index.md) | Edges out of plan | `enables` (out of) |
| [`execute`](https://acs.synapti.ai/capabilities/execute/index.md) | Edges out of plan | `enables` (out of), `precedes` (out of) |
| [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | Edges out of plan | `enables` (out of), `precedes` (out of) |
| [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md) | Edges out of plan | `enables` (out of) |

- `enables`: Unlocks [`execute`](https://acs.synapti.ai/capabilities/execute/index.md), [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md), [`critique`](https://acs.synapti.ai/capabilities/critique/index.md), [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md), [`generate`](https://acs.synapti.ai/capabilities/generate/index.md)
- `enables`: Unlocked by [`compare`](https://acs.synapti.ai/capabilities/compare/index.md), [`attribute`](https://acs.synapti.ai/capabilities/attribute/index.md), [`discover`](https://acs.synapti.ai/capabilities/discover/index.md)
- `precedes`: Comes before, when both are present [`execute`](https://acs.synapti.ai/capabilities/execute/index.md), [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md)

## Contract

**Figure: Contract of plan: 4 inputs (1 required), 7 outputs.** plan takes 4 inputs, 1 required (filled pin) and 3 optional (hollow pin), and returns 7 outputs. The tables below list every field.

### Inputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `goal` | string | Yes | Desired outcome |
| `constraints` | object | No | Planning constraints |
| `resources` | array | No | Available resources |
| `context` | any | No | Background the plan must take into account (e.g. forecasts, current state) |

### Outputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `steps` | array | Yes | Ordered action steps |
| `dependencies` | object | No | Step dependencies |
| `risks` | array | No | Identified risks |
| `evidence_anchors` | array of Anchor (or deprecated string or object) | Yes | What the output is based on, as evidence anchors (Standard v1.2 §6.5). An empty list grounds nothing, and the output is then marked inferred (§3.1). |
| `confidence` | number | Yes | The producer's probability that the output's claim is correct, self-reported unless the host documents a calibration (Standard v1.2 §4.1.1) From 0 to 1 |
| `inference_method` | string | No | How the output was reached when it is not grounded in evidence; with confidence it marks the output inferred (Standard v1.2 §3.1, §4.1.1). A producer should use model_knowledge, deduction, induction, abduction, analogy, statistical, simulation, assumption or an x- vendor value; a grounding policy (§5.20) requires one of them. |
| `uncertainty` | Uncertainty | No | The uncertainty of the output's principal value; its confidence equals the output's confidence (Standard v1.2 §4.1.1) |

The skill returns 12 fields: 5 are in plan's output contract (3 required) and 7 are the skill's own, outside the contract; it leaves out 2 contract fields (inference_method, uncertainty).

| Field of the skill's output | In the output contract |
| --- | --- |
| `plan_id` | No, the skill's own |
| `goal` | No, the skill's own |
| `steps` | Yes, required |
| `checkpoints` | No, the skill's own |
| `estimated_risk` | No, the skill's own |
| `dependencies` | Yes, optional |
| `risks` | Yes, optional |
| `validation` | No, the skill's own |
| `alternatives_considered` | No, the skill's own |
| `confidence` | Yes, required |
| `evidence_anchors` | Yes, required |
| `assumptions` | No, the skill's own |
| `inference_method` | Yes, but the skill leaves it out |
| `uncertainty` | Yes, but the skill leaves it out |

## Used in workflows

**Figure: plan in workflows.** 12 workflows use plan, in 12 steps in all; its steps are the squares in an ink ring, and the key under the strips names the other squares.

- [`monitor_and_replan`](https://acs.synapti.ai/workflows/monitor-and-replan/index.md): step 6
- [`debug_code_change`](https://acs.synapti.ai/workflows/debug-code-change/index.md): step 6
- [`digital_twin_sync_loop`](https://acs.synapti.ai/workflows/digital-twin-sync-loop/index.md): step 13
- [`multi_agent_orchestration`](https://acs.synapti.ai/workflows/multi-agent-orchestration/index.md): step 2
- [`anomaly_investigation`](https://acs.synapti.ai/workflows/anomaly-investigation/index.md): step 9
- [`model_monitoring`](https://acs.synapti.ai/workflows/model-monitoring/index.md): step 11
- [`clinical_alert_triage`](https://acs.synapti.ai/workflows/clinical-alert-triage/index.md): step 8
- [`production_line_monitoring`](https://acs.synapti.ai/workflows/production-line-monitoring/index.md): step 7
- [`predictive_maintenance`](https://acs.synapti.ai/workflows/predictive-maintenance/index.md): step 8
- [`supply_chain_sync`](https://acs.synapti.ai/workflows/supply-chain-sync/index.md): step 8
- [`schedule_management`](https://acs.synapti.ai/workflows/schedule-management/index.md): step 7
- [`task_delegation`](https://acs.synapti.ai/workflows/task-delegation/index.md): step 5

## Claude Code skill

**Figure: What the plan skill's tools can do, against the ontology.** The skill may use 2 tools: 2 only read; the ontology marks plan as read-only, and every tool only reads.

| What they can do | Tools |
| --- | --- |
| Only read | `Read`, `Grep` |
| Run commands, which can change state | none |
| Change files | none |

**Figure: The field names each step of the plan procedure uses.** 7 of the procedure's 8 steps use the name of an input or output field of the plan skill as a word; 7 output fields of 12 are used by no step (plan_id, estimated_risk, validation, alternatives_considered, confidence, evidence_anchors, assumptions).

| Step | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Understand the goal | `goal` | `goal` |
| 2. Analyze context | `constraints`, `context` |  |
| 3. Decompose into steps | `goal` | `goal`, `steps`, `dependencies` |
| 4. Define dependencies |  | `steps`, `dependencies` |
| 5. Add verification criteria |  |  |
| 6. Place checkpoints |  | `checkpoints` |
| 7. Define rollback strategies |  | `steps` |
| 8. Assess risk |  | `risks` |

Both examples of the skill write out every one of its 12 output fields.

**Figure: The field names each verification check of the plan skill uses.** 2 of the 7 checks use the name of an input or output field as a word; 10 output fields of 12 are named by no check (plan_id, checkpoints, estimated_risk, dependencies, risks, validation, alternatives_considered, confidence, evidence_anchors and assumptions).

| Check | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. All steps have unique IDs |  | `steps` |
| 2. Dependencies form a valid DAG (no cycles) |  |  |
| 3. Every mutating step has verification_criteria |  |  |
| 4. Every high-risk step has rollback_action |  |  |
| 5. Checkpoints placed before mutations |  |  |
| 6. Preconditions are testable |  |  |
| 7. Postconditions match goal | `goal` | `goal` |

**Figure: The neighbours the skill lists for plan, checked against the ontology and the catalogs.** The skill lists 9 capabilities as common neighbours of plan; 4 of them have an edge with it in the ontology, and 4 run next to it, in that order, in a catalog workflow (critique most often, 2 times). Under each tile, an edge reads from its source to its target, with plan's symbol in its place: "requires Pl" is a requires edge from the tile's capability to plan, so the tile's capability must run before plan; "Pl precedes" is a precedes edge from plan to the tile's capability.

| Listed as | Capability | Ontology edge | Next to it in a workflow |
| --- | --- | --- | --- |
| commonly follows | [`observe`](https://acs.synapti.ai/capabilities/observe/index.md) | none | never |
| commonly follows | [`decompose`](https://acs.synapti.ai/capabilities/decompose/index.md) | none | 1 times |
| commonly follows | [`critique`](https://acs.synapti.ai/capabilities/critique/index.md) | `enables` (into it) | 2 times |
| commonly follows | [`search`](https://acs.synapti.ai/capabilities/search/index.md) | none | never |
| commonly precedes | [`checkpoint`](https://acs.synapti.ai/capabilities/checkpoint/index.md) | none | 1 times |
| commonly precedes | [`execute`](https://acs.synapti.ai/capabilities/execute/index.md) | `enables` (into it), `precedes` (into it) | never |
| commonly precedes | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `enables` (into it), `precedes` (into it) | never |
| commonly precedes | [`verify`](https://acs.synapti.ai/capabilities/verify/index.md) | none | never |
| commonly precedes | [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md) | `enables` (into it) | 1 times |

### Intent

Create a structured, executable plan that decomposes a goal into ordered steps with clear dependencies, verification criteria for each step, checkpoint placement for safety, and rollback strategies for recovery.

**This capability is the GATEWAY to all actions.** No mutating operation should proceed without a validated plan.

**Success criteria:**
- Goal is decomposed into atomic, verifiable steps
- Dependencies form a valid DAG (no cycles)
- Each mutating step has rollback strategy defined
- Checkpoints placed before high-risk operations
- Estimated risk level accurately reflects plan complexity

**Compatible schemas:**
- `schemas/output_schema.yaml`

### Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `goal` | Yes | string | Clear statement of what the plan should achieve |
| `constraints` | No | object | Time limits, resource bounds, policy restrictions |
| `resources` | No | array | Available resources |
| `context` | No | any | Current state, available resources, constraints |

Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).

### Procedure

1) **Understand the goal**: Parse and clarify the objective
   - Identify success criteria explicitly
   - Detect ambiguity and resolve or flag it
   - Determine scope boundaries

2) **Analyze context**: Gather relevant information
   - Read minimal files needed to understand current state
   - Identify existing patterns and conventions
   - Note constraints from environment or policy

3) **Decompose into steps**: Break goal into atomic operations
   - Each step should be independently verifiable
   - Prefer small, reversible changes
   - Order by logical dependencies
   - Use `decompose` capability patterns

4) **Define dependencies**: Map step relationships
   - Create DAG of step dependencies
   - Identify parallel-safe steps
   - Flag blocking dependencies

5) **Add verification criteria**: Specify how to check each step
   - Define concrete, testable conditions
   - Include expected outputs or state changes
   - Reference files or commands for verification

6) **Place checkpoints**: Identify recovery points
   - Before every mutating step (MANDATORY)
   - Before irreversible operations
   - At logical phase boundaries
   - More frequent for high-risk plans

7) **Define rollback strategies**: Plan recovery for each step
   - Specific commands or operations to undo
   - Order of rollback (reverse execution order)
   - Identify steps that cannot be rolled back

8) **Assess risk**: Evaluate overall plan risk
   - List each identified risk in `risks` with a mitigation
   - Count mutating operations
   - Consider blast radius of failures
   - Factor in rollback complexity

### Output Contract

Return a structured object:

```yaml
plan_id: string  # Unique plan identifier
goal: string  # What this plan achieves
steps:
  - id: string  # Step identifier (e.g., "step-1")
    action: string  # Type of action (edit, bash, git, etc.)
    target: string  # Resource being modified
    description: string  # Human-readable explanation
    dependencies: array[string]  # Step IDs this depends on
    verification_criteria: string  # How to verify success
    rollback_action: string | null  # How to undo (null if not reversible)
    estimated_risk: low | medium | high
checkpoints:
  - after_step: string  # Step ID to checkpoint after
    type: git_stash | file_backup | state_snapshot
    reason: string  # Why checkpoint here
estimated_risk: low | medium | high  # Overall plan risk
dependencies:  # Step dependencies: step ID -> step IDs it depends on
  <step_id>: array[string]
risks:  # Identified risks
  - description: string
    step: string | null  # Step ID, or null for plan-wide
    severity: low | medium | high
    mitigation: string
validation:
  preconditions: array[string]  # Must be true before execution
  postconditions: array[string]  # Must be true after execution
  invariants: array[string]  # Must remain true throughout
alternatives_considered: array[string]  # Other approaches evaluated
confidence: number  # probability that the plan achieves its goal (§4.1.1)
evidence_anchors: [{ref: "file:line", kind: file}, {ref: "https://...", kind: url}]
assumptions: []  # Explicit assumptions made
```

#### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `plan_id` | string | Unique identifier for this plan |
| `goal` | string | Clear statement of objective |
| `steps` | array\<object\> | Ordered list of execution steps |
| `checkpoints` | array | Recovery points in execution |
| `estimated_risk` | enum | Overall risk assessment |
| `dependencies` | object | Step dependencies: each step ID mapped to the step IDs it depends on |
| `risks` | array | Identified risks, each with severity and mitigation |
| `validation` | object | Pre/post conditions and invariants |
| `alternatives_considered` | array | Other approaches evaluated |
| `confidence` | number | Probability, 0.0-1.0, that the plan achieves its goal (§4.1.1) |
| `evidence_anchors` | array of evidence anchors (§6.5) | References supporting the plan |
| `assumptions` | array | Explicit assumptions requiring validation |

### Examples

#### Example 1: Bug Fix Plan

**Input:**
```yaml
goal: "Fix null pointer exception in UserService.getEmail()"
context:
  file: "src/services/UserService.ts"
  error: "TypeError: Cannot read property 'email' of null"
  stack_trace: "UserService.ts:42"
constraints:
  must_pass_tests: true
  no_api_changes: true
```

**Output:**
```yaml
plan_id: "fix-npe-userservice-001"
goal: "Fix null pointer exception in UserService.getEmail()"
steps:
  - id: "step-1"
    action: "edit"
    target: "src/services/UserService.ts"
    description: "Add null check before accessing user.email at line 42"
    dependencies: []
    verification_criteria: "File contains null check pattern 'if (user != null)' or 'user?.email'"
    rollback_action: "git checkout src/services/UserService.ts"
    estimated_risk: low
  - id: "step-2"
    action: "bash"
    target: "npm test -- --grep UserService"
    description: "Run UserService unit tests"
    dependencies: ["step-1"]
    verification_criteria: "Exit code 0, all tests pass"
    rollback_action: null
    estimated_risk: low
  - id: "step-3"
    action: "bash"
    target: "npm run lint src/services/UserService.ts"
    description: "Verify code style compliance"
    dependencies: ["step-1"]
    verification_criteria: "Exit code 0, no lint errors"
    rollback_action: null
    estimated_risk: low
checkpoints:
  - after_step: "step-0"
    type: git_stash
    reason: "Preserve state before any file modifications"
estimated_risk: low
dependencies:
  step-1: []
  step-2: ["step-1"]
  step-3: ["step-1"]
risks:
  - description: "Null check could mask an upstream bug that produces null users"
    step: "step-1"
    severity: low
    mitigation: "Log a warning when user is null so the source can be traced"
validation:
  preconditions:
    - "src/services/UserService.ts exists"
    - "npm test command is available"
  postconditions:
    - "No null pointer exception on getEmail() with null user"
    - "All existing tests still pass"
  invariants:
    - "API signature of getEmail() unchanged"
alternatives_considered:
  - "Throw explicit error instead of returning null - rejected due to API change constraint"
  - "Add null check at caller sites - rejected as defensive coding in service is preferred"
confidence: 0.9
evidence_anchors:
  - {ref: "file:src/services/UserService.ts:42", kind: file}
  - {ref: "tool:grep:null-access-pattern", kind: tool}
assumptions:
  - "Error only occurs when user object is null, not when email property is missing"
  - "Test suite covers the getEmail() method adequately"
```

**Evidence pattern:** Stack trace analysis identified exact location, code inspection revealed missing null check.

---

#### Example 2: High-Risk Database Migration Plan

**Input:**
```yaml
goal: "Add new column to users table with default value"
context:
  database: "PostgreSQL 14"
  table: "users"
  column: "preferences JSONB DEFAULT '{}'"
  rows: "~1M"
constraints:
  max_downtime: "30s"
  must_be_reversible: true
```

**Output:**
```yaml
plan_id: "add-preferences-column-001"
goal: "Add preferences JSONB column to users table"
steps:
  - id: "step-1"
    action: "bash"
    target: "pg_dump users > backup_users.sql"
    description: "Create backup of users table"
    dependencies: []
    verification_criteria: "Backup file exists and is non-empty"
    rollback_action: null
    estimated_risk: low
  - id: "step-2"
    action: "bash"
    target: "psql -c 'ALTER TABLE users ADD COLUMN preferences JSONB DEFAULT '{}';'"
    description: "Add new column with default"
    dependencies: ["step-1"]
    verification_criteria: "Column exists in schema, no errors"
    rollback_action: "psql -c 'ALTER TABLE users DROP COLUMN preferences;'"
    estimated_risk: high
  - id: "step-3"
    action: "bash"
    target: "psql -c 'SELECT COUNT(*) FROM users WHERE preferences IS NOT NULL;'"
    description: "Verify default applied to all rows"
    dependencies: ["step-2"]
    verification_criteria: "Count matches total row count"
    rollback_action: null
    estimated_risk: low
checkpoints:
  - after_step: "step-1"
    type: state_snapshot
    reason: "Backup created - recovery point before schema change"
  - after_step: "step-2"
    type: state_snapshot
    reason: "Schema modified - capture for validation"
estimated_risk: high
dependencies:
  step-1: []
  step-2: ["step-1"]
  step-3: ["step-2"]
risks:
  - description: "ALTER TABLE takes an ACCESS EXCLUSIVE lock on a ~1M row table"
    step: "step-2"
    severity: high
    mitigation: "PostgreSQL 14 adds a column with a constant default without a table rewrite; run in a low-traffic window"
  - description: "Backup may be stale if writes continue after step-1"
    step: "step-1"
    severity: medium
    mitigation: "Pause writers or take the backup inside the migration window"
validation:
  preconditions:
    - "users table exists"
    - "preferences column does not exist"
    - "Sufficient disk space for backup"
  postconditions:
    - "preferences column exists with JSONB type"
    - "All existing rows have default value"
  invariants:
    - "No data loss in existing columns"
    - "Application queries continue to work"
alternatives_considered:
  - "Add column without default, backfill separately - rejected due to NULL handling complexity"
  - "Create new table and migrate - rejected due to downtime constraints"
confidence: 0.75
evidence_anchors:
  - {ref: "tool:psql:schema-inspection", kind: tool}
assumptions:
  - "Database has sufficient resources for ALTER TABLE on 1M rows"
  - "No concurrent writes during migration window"
  - "Application handles new column gracefully"
```

### Verification

- [ ] All steps have unique IDs
- [ ] Dependencies form a valid DAG (no cycles)
- [ ] Every mutating step has verification_criteria
- [ ] Every high-risk step has rollback_action
- [ ] Checkpoints placed before mutations
- [ ] Preconditions are testable
- [ ] Postconditions match goal

**Verification tools:** Read (for file analysis), Grep (for pattern verification)

### Safety Constraints

- `mutation`: false
- `requires_checkpoint`: false
- `requires_approval`: false
- `risk`: low

**Capability-specific rules:**
- Always include rollback strategies for mutating steps
- Place checkpoints before EVERY mutating operation
- Flag irreversible operations explicitly
- If estimated_risk is high, recommend human review before execution
- Never generate plans that bypass safety constraints
- Plans with confidence < 0.5 should request clarification

**CRITICAL: Plan is the gateway to execute and mutate**
- No `execute` or `mutate` step should occur without a validated plan
- Plans must be complete before execution begins
- Incomplete plans should be marked as draft

### Composition Patterns

**Commonly follows:**
- `observe` - Understand current state before planning
- `decompose` - Break complex goals into subgoals
- `critique` - Identify potential issues before finalizing
- `search` - Find relevant code/config to inform plan

**Commonly precedes:**
- `checkpoint` - Create safety checkpoint before execution
- `execute` / `mutate` - Carry out the plan (`plan` precedes both)
- `verify` - Validate plan structure before execution
- `constrain` - Apply policy limits to plan

**Anti-patterns:**
- Never call `execute` or `mutate` without a validated plan
- Never skip `critique` for high-risk plans
- Never execute plans with unresolved ambiguity

**Workflow references:**
- See `reference/composition_patterns.md#debug-code-change` for bug fix workflow
- See `reference/composition_patterns.md#capability-gap-analysis` for planning context
- See `reference/composition_patterns.md#observe-model-act` for Observe-Model-Act flow
