Workflows
This guide is for workflow authors. It shows how to validate, preview, and compose a workflow before execution. A workflow turns an objective into bounded, verifiable tasks; the selected profile and policy still decide which capabilities those tasks may use.
Source access required: The commands below run from an authorized Sandbox Loom repository checkout. The public documentation site does not include the source repository or a downloadable CLI.
Validate a workflow
From the repository root:
Install the repository's pinned Ruby dependencies with bundle install
before running repository commands. Use bin/ci for project quality gates.
For a valid fixture, the command reports:
Expand and preview a workflow
Use expand to resolve reusable modules. Use plan to inspect task order.
Both commands validate the workflow and do not execute tasks.
bin/sandbox-loom workflow expand examples/workflow.yml
bin/sandbox-loom workflow plan examples/workflow.yml
plan validates the workflow and emits a deterministic dependency order. It does not execute tasks or mutate a sandbox.
expand resolves reusable module imports and parameters, then prints the
canonical workflow document without executing it. Composition happens before
policy validation; imported modules cannot set the active profile or other
authority-bearing fields.
Treat the commands as separate review stages:
checkvalidates the workflow shape and policy/profile compatibility;planmakes ordering and dependencies visible without side effects;- execution performs only the capabilities authorized by the selected policy;
- verification and checkpoint tasks produce the evidence used for acceptance or escalation.
Authoring and review
Workflow files use the versioned schema at specifications/workflows/v0.1/workflow.schema.json. Add this header to a YAML file for editors that support the YAML language server:
The repository includes a complete example at examples/workflow.yml:
version: "0.1"
workflow: quickstart-workflow
profile: autonomous-development
tasks:
- id: inspect
action: gateway.git.status
- id: verify
after: [inspect]
action: verify
checks: [test, build, lint]
- id: checkpoint
after: [verify]
action: checkpoint
Validation rules
The validator rejects:
- missing required workflow fields;
- unsupported actions;
- duplicate task IDs;
- missing task dependencies;
- dependency cycles;
- unavailable capability/profile combinations;
- invalid workflow limits.
Safe composition
YAML is the canonical workflow format because it is reviewable, versioned, and supported by schema-based editor validation.
A Ruby composition DSL is available for application code and produces the same
canonical plan as equivalent YAML. Pass a .rb source to the same CLI
commands; the source must return a Workflow::DSL.define(...) document.
Neither format bypasses policy or creates unrestricted shell access.
Reusable modules use the module schema at
specifications/workflows/v0.1/module.schema.json and can be imported by a
workflow:
Project onboarding is explicit and reviewable:
bin/sandbox-loom project init /path/to/project \
--name my-project \
--repository . \
--profile safe-development \
--agent ruby
bin/sandbox-loom project check /path/to/project
project init refuses to overwrite existing files unless --force is
provided. project check validates the declared manifest, composed workflow,
quality gates, retention settings, and coding-agent executable. It does not
search for repositories or discover credentials.
Quality-gate registries may inherit a versioned profile and enable a declared subset of its gates. Project overrides may narrow scope or thresholds, but cannot replace the profile's command mappings:
The model is broader than autonomous development: future workflow types can reuse the same objective, authority, verification, and evidence boundaries. The coding_agent.cli.request action is available for an explicitly configured local coding CLI; it is policy-checked and bounded rather than an arbitrary shell escape hatch.
Generated harnesses may use configure-coding-agent while the intake brief is
still being prepared. This is a deferred placeholder, not an executable. Before
approval, set .sandbox-loom/project.yml cli.executable to an installed,
approved agent such as codex, opencode, or hermes, then run harness
review and harness approve again. Approval and execution reject the deferred
placeholder so a run cannot fail later with an unavailable executable.
To add approved phases or slices to a generated implementation plan, see the CLI reference. That reference lists the plan commands, their file effects, and validation behavior.
Verify all examples
Run the offline examples matrix from the repository root:
The command executes temporary-workspace Ruby examples, plans YAML examples, and confirms that the intentionally invalid workflow is rejected. Live provider examples require explicit opt-in and credentials. The complete matrix is maintained in the examples guide.