Reusable Capability Blocks & the Catalog¶
How code becomes a reusable capability block, how the block is sealed into an immutable artifact, and how it is published to the catalog that every workflow and agent in the organization imports from.
You write a block as ordinary Python and declare what it needs. Generation reads the block and writes its interface and manifests. Bake seals the block into an Xratu package that carries its execution capsule. Publish records the release in the catalog, and projects import it by version.
flowchart TB
S["Block source<br/>Python, @xratu, @xratu_auth"]
S -->|"xratu capability generate"| G["Interface and manifests"]
G -->|"xratu bake"| P["Xratu package<br/>with the block's capsule"]
P -->|"xratu publish"| R["Release in the catalog"]
R -->|"imported by version"| W["Workflows and agents"]
In this section¶
- From source to published artifact covers the terms, and each command with what it produces.
The reusable capability block
- Reusable capability blocks covers what a block is, its identity, and its lifecycle.
- Dependency and environment declaration
covers
@xratu, in Dependencies & Runtime Composition. - Secret binding declaration
covers
@xratu_auth. - Declared auth bindings covers where a declared secret key is bound and how it arrives.
- Per-block dependency intent covers why each block's requirements stay its own.
- Execution contracts and side-effect classes covers what generation records about a block's effects and what apply checks.
- Reusable capability block manifest covers the manifest generation writes.
- Block generation output covers identity, metadata, declared auth keys and the interface seed.
- Generation boundaries covers what generation decides and what it leaves to later steps.
The interface, XCI
- Xratu capability interfaces covers what an interface is.
- Language neutrality covers why the interface is independent of Python.
- Authored XCI source covers the interface file in the block folder.
- Compiled interface covers what the capsule, the catalog and the kernel use.
- Canonical interface hashing covers the interface hash.
- Export ordinals covers stable method identity.
- Records, variants, resources, and streams covers structured data, held resources and results over time.
- Effect and retry declarations covers what a method declares about side effects and retries.
- Interface conformance covers how the block is checked against its interface.
- Interface evolution and compatibility covers the safety check between interface versions.
- Generated bindings covers the Rust and guest Python code generation writes.
- Capsule-local adapter dispatch covers how a call reaches your method.
- Where the XCI compiler runs covers where interfaces are compiled and what the kernel consumes.
What bake produces
- Bake pipeline covers the steps from source to sealed artifact.
- Xratu package covers the publication and distribution container.
xratufilecovers the build lock.- Execution capsules covers the block's executable artifact.
- Capsule contents, Capsule build input, Execution capsule manifest and Executable surface index cover the capsule's documents.
- Capsule digests covers why the digest covers interface identity as well as the file tree.
- Provider requirements covers the provider kind, ABI and minimum version a capsule names.
- Provenance covers the immutable file tree.
- Packages and capsules covers one block, one package, one capsule.
Library and framework neutrality
- Any Python library covers writing a block with the libraries you already use.
- Library opacity covers what the kernel knows about the libraries a block uses.
- Presence versus import authority covers why each block declares what it imports.
- Version coexistence covers incompatible library versions in one workflow.
- Sealed adapters and library-specific semantics covers the code in the capsule that translates a library into the interface.
- Block boundary covers what crosses between blocks, and in which form.
- Framework objects covers live objects and the handles that reach them.
- Component sharing covers sharing a large framework's bytes while each cell keeps its own state.
- Beyond Python covers the runtime provider boundary.
Publication and the catalog
- Publishing a release covers what
xratu publishsends and what it records. - Capsule release records covers the release's capsule entries.
- Publication attestation and signing covers the signed attestation over the release's digests.
- Immutable runtime artifacts covers what a published capsule becomes.
- Artifact registry and blob references covers where the package archive is stored and how it is reached.
- Published artifact catalog covers what the catalog holds.
- Browsing and reuse covers finding and importing a release.
- Version pinning covers how an import fixes a release.
- Deprecation and retirement covers a release's lifecycle states.
- Publish boundaries covers what publish carries unchanged.
Vocabulary that must stay distinct
- Three distinct things covers the package, the capsule and closure-local components, and dependencies selected after bake.
- Lifecycle separation covers blocks, projects and models on their own lifecycles.
- Review once, reuse everywhere covers why review effort follows blocks and stays flat as workflows grow.