Projects¶
A project is the set of YAML files that turns published reusable capability blocks into running workflows and agents. Blocks hold the reviewed code. The project holds the composition: which blocks run, in what order, under which policy, on which foundation, and how the result is deployed.
A project lives in a workspace, and its name is unique there. Every version of it is immutable: a change to any file is a new project version.
The files¶
xratu project init writes one folder:
| File | Declares |
|---|---|
project.xratu |
The project's name and version, and the files below |
flow.yaml |
The workflows and agents, and the blocks they import |
runtime.xratu |
The runtime foundation and the project-wide dependencies |
deploy.xratu |
Resources, scaling and rollout |
kind: Project
metadata:
name: refunds
version: "1.4.0"
spec:
flow: ./flow.yaml
runtime: ./runtime.xratu
deploy: ./deploy.xratu
Workflows and agents¶
A workflow is structured control flow over block calls. Each step either calls a block or is a platform primitive such as a branch, a retry or a wait for approval. Arbitrary code stays inside blocks.
flow: refunds.v3
expects: { customer_id: string, amount: money }
returns: { decision: enum[approved, denied, escalated] }
policy:
attach: [ pci-dss-v4, org.standard ]
steps:
- do: customer.lookup
bind: { id: $.customer_id }
save: $.customer
- do: payments.refund
bind: { amount: $.amount, customer: $.customer }
retry: { max_attempts: 3, backoff: exponential }
- return: { decision: approved }
An agent is declared the same way. The agent itself, its tools and its subagents are all published blocks, and the YAML sets the model binding, limits, policy and memory around them.
agents:
- id: support
capability: agent.support.triage
model_binding: llm.reasoner
tools:
- capability: customer.lookup
- capability: ticket.create
limits:
max_iters: 24
timeout_seconds: 600
Imports are pinned¶
A project imports each block by package and version. Resolution searches every workspace in the organization and prefers the current one. The build records the exact artifact hash of every import, so a block upgrade reaches a project only through a new project version. See Version pinning.
From files to runs¶
flowchart LR
F["Project files<br/>in a workspace"] --> A["xratu apply<br/>project version"]
A --> B["xratu build project<br/>signed recipe"]
B --> D["xratu project deploy<br/>data plane assembles<br/>the sealed run-plan"]
D --> K["Kernel runs it"]
| Stage | Who | Result |
|---|---|---|
| Apply | Control plane | An immutable project version, checked against the blocks it imports |
| Build | Control plane | A signed recipe: the compiled workflow, pinned block hashes, and the resolved policy |
| Deploy | Data plane | The sealed run-plan, assembled from the recipe and the organization's own artifact registry |
| Run | Kernel | Execution of the sealed run-plan, with every event carrying its fingerprint |
The control plane works with names, versions and digests only. Block bytes stay in the organization's registry and reach the data plane directly.
Policy is resolved at build. A run executes under the policy of the project version it started on, and a policy change is a new project version.
Related¶
- Workspaces covers the scope a project lives in.
- Reusable capability blocks covers what a project imports.
- Dependencies & Runtime Composition
covers what
runtime.xratudeclares and how each block gets its closure. - Projects and Workflows and agents in Develop cover authoring, building and deploying a project step by step.