Files
pipelines/examples/README.md
T

82 lines
4.4 KiB
Markdown

# Simple workflow templates
Five small general-purpose starters work with any project. Each has two focused
stages, runs only when requested, and returns plain Markdown.
| Template key | Workflow | Tools |
| --- | --- | --- |
| `task` | Small code change → independent read-only review | Worker: read/glob/grep/edit/shell; reviewer: read/glob/grep |
| `research` | Research → fact-check and cited report | Research: websearch/webfetch; report: webfetch |
| `summarize` | Summarize supplied documents → check against originals | Read/glob/grep only |
| `compare` | Compare options → check decision brief | Read/glob/grep only |
| `plan` | Draft plan/checklist → check dependencies and risks | Read/glob/grep only |
The code starter leaves changes **uncommitted**. It does not install dependencies,
push, merge, release or deploy. The other four starters do not change files.
Missing essential input or evidence routes to `blocked`, with an explanation,
rather than guessing or waiting at an unnecessary human stage.
Three existing keys remain available for compatibility:
| Template key | Workflow | Behavior |
| --- | --- | --- |
| `review` | One-stage content review | Read-only; conditional websearch/webfetch |
| `three-stage` | Plan → implement → review → commit | Makes a local commit; never pushes |
| `debug` | Diagnose → fix → verify → commit | Makes a local commit; never pushes |
The extended coding starters inspect the actual diff and preserve unrelated work.
None assumes a language, framework, repository layout, device, service or model.
They use the project's own conventions and checks.
## Use a starter
These files are embedded in the server's template catalog, not merely examples to
copy manually. They appear in the web create/template picker, TUI `:templates`,
and `pipelines templates`. Choosing a template uses the existing creation flow;
there is no separate catalog registration, installation or publication step.
Nothing is seeded into the database or rewritten on upgrade. Creating a named
pipeline remains an explicit authoring action and cannot replace an existing
definition through the create-only template flow.
CLI draft equivalent:
```sh
pipelines new "My workflow" --template summarize --no-open
pipelines drafts
pipelines submit /path/printed/by/new.md
```
`provider=default` and `model=default` in the checked-in files are neutral template
markers, **not real provider/model IDs**. Web, TUI and CLI template creation bind
them to the server's configured default model and harness. Configure a working
default through the normal setup flow before execution. For direct file submission,
replace the markers with the configured provider/model IDs yourself. Browsing the
catalog does not probe providers or invoke agents.
## Inputs and evidence
- **Code:** request one focused change in the selected project, including desired
behavior and relevant checks. The reviewer checks the actual change but has no
shell tool; unverified behavior is reported, not claimed tested.
- **Research:** provide a precise question, time/version scope and source needs.
Requires working `websearch` and `webfetch` in the configured harness; tool
support is not guaranteed by the template. Both stages report inaccessible
sources and missing evidence honestly. The report stage reopens citations;
it does not treat a previous stage's summary as verification.
- **Summary:** identify readable local documents (or include their text), audience
and desired length. Unsupported formats or missing files are reported as blocked.
- **Comparison:** supply options, decision criteria, constraints and evidence in
the prompt or local documents. This is not a live market/pricing research tool.
- **Plan:** supply a goal, constraints and available context. The output is a plan
and checklist, not execution, assigned owners or invented deadlines.
Model stages consume the runtime's turn context and return Markdown. The only
required output section is `# outcome` with a declared edge word. Other headings
carry the result and evidence for later stages and the operator. Native session
exports and artifact delivery are runtime-owned, not prompt tasks. See
`docs/notes/stage-turns.md`.
Editing these files never changes installed custom definitions, immutable
published versions, run history, retained drafts or sessions. Renderer regression
fixtures live in `internal/pipeline/testdata`, not the catalog.