Skip to content

Templates

A template is a team file with a few blanks in it, plus any agent files that go with it. fuseraft init fills in the blanks, checks that the result loads, and writes it into your project.

Terminal window
fuseraft init # pick one in a short wizard
fuseraft init --template swe --model claude-sonnet-4-6
fuseraft init --template ./review-team --var ticket=SHOP-12
fuseraft init --list-templates
Template Team
solo One agent with file and shell tools. The right start for simple tasks, scripts and one-shot jobs.
swe Preflight → Planner → PlannerCritic → Developer → Tester → Reviewer, with every handoff gated on evidence: a brief, files written, a verify command that passed, a test report. The default for --no-interactive.
brownfield For a large existing codebase. An Archaeologist maps it and records its conventions once, then Planner → Developer → Reviewer work inside them.
research Researcher gathers cited findings → Critic reviews them for gaps → Writer turns them into the final document.
debate A Proposer argues a position, a Challenger attacks it for up to 3 rounds, and a Moderator writes the verdict. For decisions, not code.
magentic A manager model plans the work and picks which of 5 specialists acts each round. You approve the plan before it runs.

Their sources are in templates/, and they’re the best examples of how to write one.

Any team file works as a template too, including the examples: fuseraft init --template config/examples/research-team.yaml. The markdown agent files it names come with it.

Retired templates. pipeline and greenfield became swe. data, devops and audit are gone: start from config/examples/etl-pipeline.yaml or devops-team.yaml, or from your own template. Asking for one says where to go instead.


A template is a folder:

review-team/
template.yaml # what it is, and the variables it asks for
team.yaml # the team file
agents/reviewer.md # any other file, written next to the team file
README.md # for people; never written into a project

Start from a team file that works: run it, tune it, then turn the parts that change from project to project into variables.

An ordinary team file with {{variables}} in it:

team: "{{project}} review team"
models:
default:
modelId: "{{model}}"
endpoint: "{{endpoint}}"
agents:
Writer:
model: default
tools: [FileSystem, Shell]
instructions: |
Implement {{ticket}}. Run `{{testCommand}}` before you hand off.
Reviewer: agents/reviewer.md
flow:
start: Writer
steps:
Writer:
- to: Reviewer
requires: [ { commandSucceeded: "{{testCommand}}" } ]
Reviewer:
- to: end
when: the work is approved
requires: [ reviewJudgement ]
- to: Writer
when: changes are needed

{{model}}, {{endpoint}} and {{project}} are always there. When no endpoint is set, the endpoint: line is left out, so the model uses the provider’s default URL. Every rule is on Variables & Special Strings.

Leave out what fuseraft already tells agents. Every agent’s instructions get a generated Team protocol section: its artifacts and their shapes, its routes, what each gate checks, and the exact format of any gate that reads what the agent writes, such as the reviewJudgement JSON block. Every agent with FileSystem is told how to read files efficiently, and every agent with SessionContext how to use it. Write about the work itself.

Optional for a template with no variables of its own. Every field is optional:

name: review-team # how it's picked: --template review-team (default: the folder's name)
title: Review Team # shown in the wizard and the list
description: A Writer drafts, a Reviewer checks against the project's own test command.
teamFile: team.yaml # default: team.yaml, team.yml or team.json
variables:
testCommand:
description: Command that runs the tests # the wizard's question
default: npm test
ticket:
description: Ticket the work is for # no default: required

Fields are checked strictly, like a team file’s: a misspelled field is an error. A name is lowercase letters, digits, - and _. A variable name is letters, digits and _, and can’t be model, endpoint or project.

The team file goes where fuseraft init is told to write it (by default .fuseraft/config/orchestration.yaml). Every other file keeps its path relative to the template folder and lands relative to the team file’s folder, so agents/reviewer.md above becomes .fuseraft/config/agents/reviewer.md, right where Reviewer: agents/reviewer.md looks for it.

These are never written into a project: template.yaml; README and LICENSE files at the top of the folder; and anything whose name starts with a dot, such as .git/ or .github/. Symbolic links aren’t followed. Every file is rendered, so a file that isn’t text doesn’t belong in a template.

Terminal window
fuseraft templates validate ./review-team

This renders the template with sample values, with and without an endpoint, and loads the result exactly as fuseraft run would. It never writes anything. It fails on what would stop init, and warns about what would trip a run:

  • an unknown {{variable}}, with its file and line;
  • a team file that doesn’t load, with the loader’s message;
  • instructions telling an agent to take a route it doesn’t have;
  • a declared variable that nothing uses;
  • no {{model}} anywhere, so --model would be ignored.

Run it in CI for a repository of templates. It exits 1 on any error.


A template is a folder, so share it however you share folders: a git repository, a directory in your monorepo, a zip.

With your team, through the repo. Commit it to .fuseraft/templates/<name>/. Anyone who runs fuseraft init in the project sees it in the wizard, and it beats a user or built-in template with the same name. A team can ship its own swe that way.

Terminal window
fuseraft templates add ./review-team --project # copies it into .fuseraft/templates/review-team/

With yourself, across projects. Install it into ~/.fuseraft/templates/:

Terminal window
git clone https://github.com/acme/fuseraft-templates
fuseraft templates add fuseraft-templates/review-team
fuseraft init --template review-team

templates add checks the template first and won’t install one that fails. Run it again with --force to update an installed copy; files the new version dropped are removed. fuseraft templates remove <name> deletes it (add --project for the project’s copy).

Without installing. fuseraft init --template ./path/to/folder uses a folder where it is. A value with a / or \, or one that starts with . or ~, or ends in .yaml, .yml or .json, is a path. Anything else is a name.

Precedence Location
1 .fuseraft/templates/<name>/ the project’s, shared through the repo
2 ~/.fuseraft/templates/<name>/ yours, from templates add
3 built in the six above

fuseraft templates list shows every template, where each one comes from, and which ones are hidden by another of the same name. A template that fails to load is reported there and skipped; the rest still work.

Terminal window
fuseraft init --template review-team --var ticket=SHOP-12 --no-interactive --force
fuseraft init --list-templates --json # name, title, source and variables of each
fuseraft init --template review-team --var ticket=SHOP-12 --json

--no-interactive never asks: a required variable you don’t pass is an error that names it. With --json, stdout carries one JSON object, described in Wire Protocol.