Class templates
Five runnable templates — one per class. Every new bot starts here, not from scratch.
Rule: if you find yourself writing scaffolding code, you started in the wrong place. Pick a template, copy it, fill in decide(), run the fixtures.
Guardrail
Block, downsize, quarantine, pause. Must have a REJECT path. Implements RiskVote out and OrderIntent in.
templates/guardrail-bot/
Alpha Strategy
Emits OrderIntent. Reads MarketSnapshot + signals; declares its model edge in bps.
templates/strategy-bot/
Execution Utility
Turns an approved OrderIntent into an ExecutionPlan. Never decides whether to trade — only how.
templates/execution-bot/
Signal Service
Read-only. Emits typed signals with freshness stamps. Never submits orders.
templates/signal-bot/
Governance Service
Reconciles, logs, audits. Never blocks. Always explains.
templates/governance-bot/
What each template includes
README.md— what to fill in, in what order.bot.ts— full Bot<I,O> implementation.decide()is the only function you write.config.schema.json— JSON Schema for the bot's config.default.config.json— defaults that pass the schema.input.fixture.json— one happy-path input.expected.output.json— the exact output the fixture must produce.tests.spec.ts— unit + integration + property + failure-injection harnesses.