> ## Documentation Index
> Fetch the complete documentation index at: https://gump.build/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Steps

> A step is a unit of work in a workflow. Each step declares a type.

# Steps

A step is a unit of work in a workflow. Each step declares a `type` that determines its output contract and default behavior.

## Step types

| Type       | Output   | Worktree default | Implicit guard   | Description                                |
| ---------- | -------- | ---------------- | ---------------- | ------------------------------------------ |
| `code`     | diff     | read-write       | —                | The agent writes code                      |
| `split`    | tasks\[] | read-only        | `no_write: true` | The agent decomposes a spec into tasks     |
| `validate` | bool     | read-only        | `no_write: true` | The agent evaluates and produces a verdict |

Day 1 types are `code`, `split`, and `validate`. Additional types (`search`, `scrape`, `surf`, `use`, `doc`) are planned for future releases.

## The GET → RUN → GATE model

Every step follows three phases:

```yaml theme={null}
- name: impl
  type: code

  get:                          # GET — what the agent receives
    prompt: |
      Implement: {task.description}
      Files: {task.files}
    context:
      - file: docs/architecture.md

  run:                          # RUN — who executes and within what limits
    agent: claude-sonnet
    guard:
      max_turns: 60
      max_budget: 3.00

  gate:                         # GATE — verify the result
    - compile
    - test
    - validate: validators/arch-review
        diff: "{diff}"
        spec: "{spec}"
        agent: claude-opus

  retry:                        # RETRY — what to do on gate failure
    - attempt: 2
      prompt: |
        Deviations remain: {gate.review.comments}
        Fix only these. Files: {task.files}
    - attempt: 4
      agent: claude-opus
      session: new
      worktree: reset
    - exit: 6
```

The `get:` and `run:` blocks structure the step into visible phases. Keywords can also be flat (without blocks) for simple steps — both forms are equivalent at parsing.

**Flat form** — for simple steps:

```yaml theme={null}
- name: execute
  type: code
  prompt: "{spec}"
  agent: claude-opus
  guard: { max_turns: 80 }
  gate: [compile]
```

**Structured form** — for complex steps (recommended when using retry or context):

```yaml theme={null}
- name: impl
  type: code
  get:
    prompt: |
      Implement: {task.description}
    context:
      - file: docs/architecture.md
  run:
    agent: claude-sonnet
    guard: { max_turns: 60 }
  gate: [compile, test]
  retry:
    - exit: 3
```

A keyword cannot appear both in a block and at the step level — that's a parsing error.

## Gate-only steps

A step with `gate` but no `agent` and no `type` is valid. It runs deterministic checks on the current worktree state. Useful for final quality checks.

```yaml theme={null}
- name: quality
  gate: [compile, lint, test]
```

## agent: pass

`agent: pass` is a special value that skips the RUN phase entirely. The GET is loaded (state is up to date), the GATE runs, and retry applies if it fails. Use case: pre-evaluate a condition before spending tokens on an expensive agent.

```yaml theme={null}
- name: pre-check
  type: code
  agent: pass
  gate:
    - bash: "test $(wc -l < blast-radius.txt) -lt 500"
  retry:
    - exit: 2
```
