Technology · Framework

Handlebars

Handlebars templates drive the function generator's fourteen-file output.

FAFO CoreFunction Forge templatesRust generator
A template with its slots · illustrative grey: structure the templates own · lit: values from one function specification
  • 7 of 14function crates in the estate carry the generator's fingerprints

A generator agents can call

FAFO Core and Function Forge had a gap I wanted closed: agents could call tools but could not add one, and every new capability meant a person wiring a crate into the gateway, the orchestrator and the result path by hand. I built Function Forge, a generator that lets an agent author a new function, and Handlebars is its template engine. The generator is a Rust crate exposed as an MCP (Model Context Protocol) tool. From one function specification (name, parameters, data source, flags) it renders a crate.

The rendered crate
8 framework files · the author may not change them

library root, configuration, logic, control, the MCP handler, the result-path module, the build manifest, the developer instructions

6 developer-zone files · sandboxed

module root, parameters, types, processor, completion, the MCP surface: where the human or AI author writes the behaviour

One flag reshapes the generated code for a function that submits GPU inference work and exits, with routing by model id enforced. The authoring guide is compiled into the tool and served to the agent that is about to use it.

Conventions the author cannot skip

The estate's conventions arrive in every generated function by construction.

Framework, from the templates
Developer zonehanded one capability-bounded context
no direct writesno own connections
queue names
control keys
the write path

Templates own everything structural and authors write only inside a bounded zone, which keeps agent-written code inside the platform's write-path architecture.

Wired fully, or not at all

The generator edits several services in one operation with rollback, so a failed generation leaves nothing half-wired; a symmetric delete reverses every edit. Generated crates register themselves at link time, so a function is either compiled fully wired or the build fails, and there is no runtime registry to fall out of step with the code. A new function takes effect only after a person rebuilds and restarts the gateway. The story is Tools that build tools, under governance.

gateway
control plane
completion service
createdelete

Regenerating over a function needs an explicit destructive flag; there is no update in place.

I build platforms that extend themselves under control: an agent can add a capability, and the structure decides what that capability is allowed to touch.