Scaffold and validate a playbook

Generated Markdown for references/process_scaffold_validate.md.

Open book page Back to the skill graph

# Scaffold and validate a playbook

## Purpose

Start a new playbook from the built-in skeleton and confirm it validates before running anything.

## Prerequisites

- The config-weave binary is on PATH.

## Flowchart

![diagram]../_wdoc/process_scaffold_validate-diagram-1.svg

## Steps

### Step 1: Scaffold a skeleton

```console
$ config-weave init ./my-playbook
created ./my-playbook (playbook.wcl, pkgs/core/…)
```

Run `config-weave init ./my-playbook`. It writes a skeleton playbook with an example package, resource and gatherer — a working starting point.

### Step 2: Validate the whole pipeline

```console
$ config-weave validate ./my-playbook
ok
```

> [!NOTE]
> **What validate covers**
> WCL syntax, schema, ref resolution, the step DAG, and **wscript compilation of every script** — host-API misuse is caught here, before any execution.

Run `config-weave validate ./my-playbook`. Nothing executes; fix any reported syntax, schema, ref, DAG or script-compilation error before moving on.

### Step 3: List the plays

```console
$ config-weave list ./my-playbook
baseline
```

Run `config-weave list ./my-playbook` to see the plays you can `check` or `apply`.

> [!TIP]
> **Verification**
> `config-weave validate` exits 0 and `list` prints the expected play names.

## Related

- [Playbook]../references/concept_playbook.md

- [Package]../references/concept_package.md

- [config-weave]../references/entity_config_weave.md

[← Back to SKILL.md]../SKILL.md