Start from the generated scaffold
Create a local workflow:.trellis/workflows/review-first.md from the complete bundled
native workflow. Starting from native is safer than writing an empty file
because every parser-sensitive section is already present.
The command then asks whether to make the workflow the project default and
whether to make it your personal default. Use --skip-defaults when you only
want the file.
The command never replaces or removes
.trellis/workflow.md. That file remains the global
zero-configuration fallback.Understand the file layout
- Active task:
task.jsonworkflow - Current developer:
.developerworkflow= - Project:
config.yamldefault_workflow - Global fallback:
.trellis/workflow.md
Keep the runtime contract
The generated scaffold is the authoritative example. A smaller workflow can work, but keep these structures:
Standard workflow-state ids are
no_task, planning, planning-inline,
in_progress, in_progress-inline, and completed. Custom ids may use
letters, digits, underscores, and hyphens, but they only become active when
some task lifecycle path writes the matching task.json.status.
Route instructions by platform
Platform blocks are optional. Use them when one step needs different instructions for different harnesses:Know what hooks read
Hooks are installed bytrellis init and trellis update. Do not declare
hook event names or script commands inside a workflow file.
The sub-agent hook is separate. It injects
implement.jsonl or check.jsonl,
then prd.md, design.md when present, and implement.md when present. It
does not parse workflow markdown. The selected workflow tells the parent
session when and how to dispatch; the sub-agent hook supplies the task-specific
material.
Validate after editing
Run the real phase parser:python instead of python3 on Windows.
trellis workflow --save warns when a marketplace template is missing the
standard phase, step, or workflow-state markers. The warning does not block
the save, so the parser commands above remain the final check for custom
content.
Safe editing boundary
You can freely change prose, add phases, change routing instructions, and add custom statuses. Preserve the parser syntax unless you also update every runtime consumer. Changes to workflow-state text appear on the next user turn. SessionStart overview changes appear in a new session. Step changes appear on the nextget_context.py --mode phase lookup.