# Maestro

**A continuation-oriented agent runtime for continuous research work.**

A product of ANH Digital Platform. First customers: Cargill researchers and dairy nutrition consultants. Codename for the substrate: **BarnOS / Barnyard**.

## What's in this drop

| File | What it is |
|---|---|
| [`maestro-architecture.md`](./maestro-architecture.md) | The deep architecture document. Continuation store data model, context field ranking algorithm, policy kernel decision function, dual-cloud (Azure Foundry + AWS EKS/Redshift/Bedrock) 90-day build, open risks. **Start here.** |
| [`maestro-build-plan.yaml`](./maestro-build-plan.yaml) | The 90-day work plan in YAML, designed to be consumed by Claude Code. Three phases, thirty tasks, dependency-aware, with acceptance criteria for each. |
| [`site/`](./site/) | Astro site that publishes the architecture as a continuous, evolving site. Editorial-scientific aesthetic. Six pages plus RSS plus sitemap. `cd site && npm install && npm run dev`. |

## The thesis in one line

The future of agentic work is **continuations over streams**, not graphs over RPCs.

## The three primitives

1. **Continuations** — resumable, migratable reasoning processes. Sleep for weeks, wake on a signal. Replace `model.invoke()` as the unit of work.
2. **Context Field** — continuously-projected, ranked surface over every memory source. Replace RAG-as-query with RAG-as-field.
3. **Policy Kernel** — small, deterministic, sub-10ms decision service. Routes model tiers, enforces budgets, gates tools. No LLMs on the critical control path.

MCP and graphs still exist — they move to the edges. The center of Maestro is these three.

## How the artifacts fit together

```
maestro-architecture.md  ─┬─►  human-readable design doc, ground truth
                          │
maestro-build-plan.yaml  ─┴─►  machine-readable execution plan (Claude Code feeds on this)

site/                    ────►  the public, continuously-published face of the work
                                 deploys to Azure Static Web Apps + CloudFront/S3
```

## Working with Claude Code

Point Claude Code at `maestro-build-plan.yaml`. Tell it to pick the lowest-numbered task whose dependencies are met, look at `deliverables` and `acceptance` for that task, implement against them, ship a PR titled with the task id. Three non-negotiables:

- No LLM calls on the policy kernel critical path.
- No cloud SDK imports in `core/`.
- Every state change is an event in the event log. No exceptions.

## What this is and isn't

This is an architecture sketch with enough detail to start building. It is not a spec. The data models will change once we write migrations. The ranking weights will be tuned. The 90-day plan will slip on at least one phase.

What should not change is the shape of the bet: continuations as the unit of work, context fields as the projection of memory, a deterministic policy kernel as the control plane, MCP at the edges. Everything else is implementation.

Let's build it.
