goldclaw for Erlang/Elixir Developers: You Already Know This
You've spent years mastering OTP patterns. You know why 'let it crash' is a feature, not a bug. You understand that gen_servers, supervisors, and ETS tables are the building blocks of reliable systems. goldclaw doesn't replace any of that -- it gives you a better interface to it.
Markdown Compiles to OTP
When goldclaw processes WORKFLOW.md, it doesn't interpret it at runtime. It compiles each state into a goldrush query module -- the same O(1) pattern matching trees that DeadZen designed. Each workflow becomes a gen_statem under a supervision tree.
# What WORKFLOW.md compiles to (simplified):
defmodule MyApp.Workflows.VoiceHandler do
use GenStatem
# Compiled from: ### Greeting
# **Trigger**: `Event.eq(:type, :call_started)`
def handle_event(:cast, %{type: :call_started}, :greeting, data) do
NanobotPlugin.Actions.say(data.ctx, %{text: greeting_template()})
{:next_state, :listening, data}
end
endPROCEDURES.md = Behaviour Definitions
Each procedure in PROCEDURES.md compiles to an Elixir behaviour implementation. Actions implement a side-effect callback, Queries implement a pure callback. Hot-swapping works because the workflow references the symbolic name, and the procedure registry resolves it at call time.
MODULES.md = Supervision Tree
The topology in MODULES.md directly maps to your supervision tree. `merge([VoiceHandler, ToolHandler])` creates a supervisor with both children and an AND-merge strategy. The MainBus is an event manager that routes to registered handlers.
You can always drop down to raw Elixir. goldclaw gives you escape hatches at every level. Write a custom procedure in Elixir, register it in PROCEDURES.md, and it works alongside markdown-defined ones. The markdown is sugar, not a cage.