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

# Author a method

> Build a local draft and save a complete version.

Your coding agent uses the Method CLI to write the procedure. Read the complete installed guide with `method authoring all`, or one command with `method COMMAND --help`.

```sh theme={null}
method init task.method --name 'Find leads' --goal 'Find qualified people from the requested sources.'
method step add task.method --id search --instructions-file search.txt
method step update task.method search --value-file search.yaml
method check set task.method search --text-file check.txt
method validate task.method
method create --file task.method
```

The instruction file contains literal actions. The YAML patch supplies named inputs and outputs. The check file contains independent criteria. Use `method authoring example` for a complete example with all file contents.

You can also edit the YAML file directly. Each data definition needs a useful description and one of six types. Use `each` for repeated operations, named references for data, and `changes` for persistent or external updates. See [the format](/method/format).

To improve a saved method:

```sh theme={null}
method get WORKFLOW_ID --out edit.method
# Read the full document and apply the requested changes.
method validate edit.method
method save edit.method --reason 'Describe the change.'
```

Keep the adjacent `.method.json` file. It identifies the server and base version. A save creates a version of the same method. If the base is stale, read the latest version and apply the change there.

Compare every change with the original task. Fewer steps are useful only if required data and actions remain clear and complete. A valid saved document is not proof of a successful run.
