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

# graph plan draft

> Draft a plan from a goal using the planner model (costs inference)

Runs the built-in `compose_plan` plan over your tool catalog: it finds the tools the goal needs, writes the whole plan in one call, and fixes steps that fail validation. When it had to guess a value that decides what the plan returns, it asks you in the terminal first.

Problems it couldn't fix are listed under `problems`. When no tool in the catalog can do part of the goal, nothing is written and the result lists what is `missing`.

Drafting replaces every step. To correct a plan whose steps you want to keep, use `graph plan set` and the `graph plan step` commands.

## Arguments

**GOAL** `string` *required*

What the plan should do, as a self-contained instruction

## Options

**--from** `string`

Draft into this plan's identity (identifier, name, description, input schema). Every step is replaced — use the editing commands to correct a plan whose steps you want to keep

Format: `NAME|PATH`.

**--output** `string`

Write here instead of \<plans dir>/\<identifier>.yaml

Format: `PATH`.

**--stdout** `boolean`

Print the drafted YAML to stdout instead of writing a file

**--json** `boolean`

Print a JSON envelope instead of text

## Global options

**-v, --verbose** `integer`

Increase log verbosity (-v info, -vv debug, -vvv trace)

```bash Usage theme={null}
graph plan draft [OPTIONS] <GOAL>
```

```bash Example 1 theme={null}
graph plan draft "Summarize the commits merged since the last release"
```

```bash Example 2 theme={null}
graph plan draft "Summarize the commits merged since the last release" --from weekly_changes
```

```bash Example 3 theme={null}
graph plan draft "List open pull requests with failing checks" --stdout
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.