Skip to content

feat(init): shareable templates as plain files, with {{variables}} - #271

Merged
fuseraft merged 1 commit into
mainfrom
feature/shareable-templates
Dec 5, 2026
Merged

fuseraft merged 1 commit into
mainfrom
feature/shareable-templates

Conversation

@fuseraft

@fuseraft fuseraft commented Dec 5, 2026

Copy link
Copy Markdown
Owner

What

fuseraft init templates are now plain files that anyone can write, share and install. Every placeholder and special string fuseraft understands is documented on one page.

Templates as folders

  • A template is template.yaml (name, title, description, variables) plus team.yaml plus any other files, such as markdown agent files. A lone team file also works, including every file in config/examples/, and brings along the agent files it names.
  • {{name}} variables are filled in once, at init. Three are built in (model, endpoint, project) and a template can declare its own, set with --var name=value or asked for in the wizard. A line using an empty variable is left out, an unknown name is an error giving the file and line, and \{{ writes a literal {{. There are no conditionals.
  • Init renders and compiles the whole team in memory before writing anything.
  • Lookup order: project .fuseraft/templates/, then ~/.fuseraft/templates/, then built-in. A project can ship its own swe.
  • New fuseraft templates list | validate | add | remove.

11 built-ins → 6

solo, swe, brownfield, research, debate and magentic now live as YAML in templates/, embedded in the binary. They replace about 2,900 lines of C#. pipeline and greenfield point to swe. data, devops and audit point to the examples or a custom template.

Shared logic in one place

  • AgentGuidance: the file-reading rule used by the REPL is now given to every orchestrated agent with FileSystem, not only to templated ones.
  • CompiledCheck.Guidance: the exact formats that reviewJudgement and testReport parse now travel with the check. The Team protocol shows them under "What the checks need", so hand-written teams get them too.
  • DirectoryMirror: shared by skills add and templates add.
  • TeamLint.MissingRoutes: used by fuseraft validate, templates validate and the tests.

The REPL and orchestration prompt builders stay separate, because they serve different purposes. Only the shared rules moved.

Docs

Compatibility

  • Breaking: --template pipeline|greenfield|data|devops|audit now fails, with a message saying what to use instead.
  • The --json output only gains fields (source, location and variables on templates, variables on the init result). fuseraft-web can't pass --var yet.

Testing

  • ./build.sh: all tests pass, with no warnings. The new tests cover the renderer, loader, catalog, scaffolder, init, TeamLint and the Team protocol. Every built-in and every example compiles and passes the template check.
  • The real CLI was run in a scratch project with an isolated fuseraft home. Covered:
    • the wizard, driven through tmux;
    • --var and --json;
    • folder and lone-file templates;
    • project shadowing and retired names;
    • templates add/validate/remove;
    • fuseraft validate on the generated output.
  • The docs site builds and the new cross-links resolve.

Templates are now folders of plain files (template.yaml + team.yaml +
any agent files), found in the project, the user's home, or built in.
init fills {{name}} variables (model, endpoint, project, plus any the
template declares via --var), compiles the result, and only then writes.

- 11 built-ins become 6 YAML templates under templates/, embedded in the
  binary: solo, swe, brownfield, research, debate, magentic. Retired
  names say what to use instead.
- New `fuseraft templates list|validate|add|remove`.
- Shared rules move to one home: the file-reading rule (AgentGuidance)
  for the REPL and every orchestrated FileSystem agent; gate format
  guidance on the check itself (reviewJudgement, testReport), printed in
  the Team protocol; DirectoryMirror for skills and templates;
  TeamLint.MissingRoutes for validate, templates validate and tests.
- docs: new Templates and Variables & Special Strings pages.
@fuseraft
fuseraft merged commit 9b9308d into main Dec 5, 2026
9 checks passed
@fuseraft
fuseraft deleted the feature/shareable-templates branch December 5, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant