Build governance
A bundle is everything Sefra knows about what agents may do: one manifest per intent, the connectors to the systems of record, the policies with their tests, the grants and the rate limits. It is a directory in your git repository, reviewed like code, tested in CI with sefra bundle test and activated with sefra bundle apply. This guide is for the platform engineers who write and review bundles.
| Page | What it covers |
|---|---|
| Manifests | Intents: schemas and sensitive fields, facts and their response schemas, execute, idempotency, compensation, probes, summaries; connectors, grants and limits |
| Policies | Rego packages, allow, deny and require_approval, the input document, the two evaluation phases, and the tests |
| Testing and activation | sefra bundle test, replay against the recorded decisions before activation, sefra bundle apply, going back |
| Review checklist | What a reviewer checks before a bundle change is merged, sensitive fields first |
The layout
Section titled “The layout”bundle/
intents/<domain>.<name>.yaml one manifest per intent type
connectors.yaml systems of record and how to reach them (no secrets)
policies/*.rego, *_test.rego rules and their tests
grants.yaml who may use which intents
limits.yaml rate limits
Policy file names are [a-z0-9_] and .rego. Nothing else may be in the directory: any other file is an error, because the bundle’s digest covers every file, and hidden entries (.git, .DS_Store) are skipped. Documentation goes next to the bundle, not in it; comments in the YAML and Rego files are fine and are part of what is reviewed.
The workflow
Section titled “The workflow”- Start from the starter procurement bundle, or from an existing bundle, in your own repository.
- Write or change manifests and policies; add a test for every rule you add or change.
sefra bundle test <dir>locally and in CI: it must exit 0. Read its warnings.- Replay the recorded decisions against the changed bundle (
sefra policy replay --bundle <dir>) and read every decision whose effect would change. - Have the change reviewed against the checklist.
sefra bundle apply <dir>with an administrator’s token. Executions already accepted finish under the bundle they started with.
Manifests are data, with path lookups only. Policies are written in Rego.