kestrel.markets
Version:
A typed, token-efficient language + runtime for agentic trading: agents author bounded plans, the runtime fires them at the tick. CLI + typed library + MCP server.
17 lines (14 loc) • 1.09 kB
Markdown
# Kestrel documents are modules (ESM-like import/export)
A Kestrel document is not just a script — it is a **module** whose named statements
(Plans, Views, Wakes, Books, Pods) other documents can import. A file can be a full
pod definition, a single book, or a library of plan templates (an Armory); pods are
composed from imported parts rather than authored as monoliths. We chose ESM-like
modularity over monolithic documents because the org model (ADR-0002) demands reuse —
the same vetted plan template armed across many books/pods — and because agents author
best in small, composable units.
Consequences: named top-level statements are the unit of import; the Armory (the vetted
plan-template library) becomes simply "a module of Plans" with
provenance metadata; import resolution is part of parsing a document, so a pod's full
closure is known at arm time (no runtime late-binding of strategy text). Template
*parameterization* (plans with holes) is deliberately deferred — v1 imports are named
statements, with scoped defaults (`USING`) as the only customization point.