AutonomyPolicy
Set the autonomy level per playbook, risk class and environment, under org floors that no rule, default or narrower scope can exceed.
The kind, schema and loader checks are public. Evaluating levels against floors at runtime is a proprietary engine feature.
Purpose and scopes
AutonomyPolicy sets how far an autonomous change may go. It can be written at any scope. Only an org-scoped kind (or a control pack) may set floors. The loader refuses floors anywhere else.
The levels are the ladder in the types proto:
| Level | Meaning |
|---|---|
AUTONOMY_LEVEL_OBSERVE | reads only |
AUTONOMY_LEVEL_SUGGEST | proposes and writes nothing |
AUTONOMY_LEVEL_IMPLEMENT | writes in a sandbox |
AUTONOMY_LEVEL_PR | opens pull requests |
AUTONOMY_LEVEL_MERGE | merges when policy allows |
AUTONOMY_LEVEL_STAGE | deploys to pre-production |
AUTONOMY_LEVEL_RELEASE | deploys to production |
AUTONOMY_LEVEL_OPERATE | runs operations against production |
See Autonomy levels for the concept and Choose autonomy for a decision procedure.
Field reference
Prop
Type
Matching dimensions
AutonomyMatch has exactly three optional keys.
Prop
Type
The two uses differ. In a rule, risk matches exactly, and a key the change has no value for does not match. In a floor, risk matches that class and every higher one, and a key the change has no value for counts as a match, so a floor errs toward capping.
Example: organization ladder
apiVersion: numinance.dev/v1
kind: AutonomyPolicy
metadata: {name: org-ladder, scope: SCOPE_ORG}
spec:
defaults: {level: AUTONOMY_LEVEL_PR}
rules:
- {match: {playbook: dependency-upgrade, risk: RISK_CLASS_LOW}, level: AUTONOMY_LEVEL_MERGE}
floors:
rules:
- {match: {risk: RISK_CLASS_HIGH}, max_level: AUTONOMY_LEVEL_SUGGEST}
- {match: {environment: production}, max_level: AUTONOMY_LEVEL_MERGE}Read it top to bottom. The default is PR. A low-risk dependency upgrade may reach MERGE. Any HIGH or PRIVILEGED change is capped at SUGGEST. Anything acting in an environment named production, or with no environment value, is capped at MERGE: the agent can never deploy there on its own authority.
$ numi validate --files schemas/examples/AutonomyPolicy
revision: "files"
ok file "org-ladder.yaml" AutonomyPolicy "org-ladder"Explore it
Autonomy policy explorer
Given defaults, rules and floors, what is the highest level this change may reach?
- OPERATEoperations against production
- RELEASEdeploys to production
- STAGEdeploys to pre-production
- MERGEmerges when policy allowsrequestedeffective
- PRopens pull requests
- IMPLEMENTwrites in a sandbox
- SUGGESTproposes, writes nothing
- OBSERVEreads only
The dependency-upgrade rule matches and requests MERGE. No floor matches, so nothing lowers it.
- 1 · Defaultdefaults.level = PR (overridden by the matching rule)
- 2 · Rule: dependency-upgrade, LOW → MERGEmatchedplaybook (resolver context): dependency-upgrade ✓ · risk (exact): LOW ✓
- 3a · Floor: risk HIGH or higher → max SUGGESTnot matchedrisk (resolver context): LOW; a floor matches that class and every higher one.
- 3b · Floor: environment production → max MERGEnot matchedenvironment (resolver context): a different environment.
- 4 · Resultmin(requested MERGE, lowest matching floor none) = MERGE
apiVersion: numinance.dev/v1kind: AutonomyPolicymetadata: {name: org-ladder, scope: SCOPE_ORG}spec:defaults: {level: AUTONOMY_LEVEL_PR}rules:- {match: {playbook: dependency-upgrade, risk: RISK_CLASS_LOW}, level: AUTONOMY_LEVEL_MERGE}(matched)floors:rules:- {match: {risk: RISK_CLASS_HIGH}, max_level: AUTONOMY_LEVEL_SUGGEST}- {match: {environment: production}, max_level: AUTONOMY_LEVEL_MERGE}
- Kernel floors are always on. They sit under every policy and no rule or default removes them.
- The highest configured level never bypasses a matching floor. Floors cap; they are not suggestions.
- Promotion is proposed, then accepted. Evaluation may propose a higher level; a human accepts it. An agent never grants itself a rung.
Text description
The ladder is the AutonomyLevel enum, lowest to highest: OBSERVE (reads only), SUGGEST (proposes, writes nothing), IMPLEMENT (writes in a sandbox), PR (opens pull requests), MERGE (merges when policy allows), STAGE (deploys to pre-production), RELEASE (deploys to production), OPERATE (operations against production).
Resolution follows AutonomyPolicySpec: the level is the lowest level among matching rules, else defaults.level; then no level above the lowest max_level among the matching floors. The example policy is org-ladder: default PR; one rule (playbook dependency-upgrade and risk LOW sets MERGE); two floors (risk HIGH or higher caps at SUGGEST; environment production caps at MERGE).
- In a rule, risk matches exactly and a key the change has no value for does not match.
- In a floor, risk matches that class and every higher one, and a key the change has no value for counts as a match, which is why the toggle
nonefor environment still matches the production floor. - The playbook, risk and environment values are the resolver context of the change. They are not extra fields on a rule. The what-if rule level only changes the simulation; the YAML shown is the real example text.
- Kernel floors are always on. Promotion to a higher level is proposed by evaluation and accepted by a human, and is never self-granted.
- An org with no floors gets the shipped floor (SUGGEST for HIGH and PRIVILEGED, PR for the rest); control-pack floors can only add caps.
Everything here is simulated in the browser from the example policy. Nothing is connected to a running engine.
Resolution semantics
- Take the lowest level among the matching rules, else the default.
- Cap it at the lowest
max_levelamong the matching floors (org floors and every control pack's floors).
"Highest level never bypasses a floor" is therefore structural: a rule that says AUTONOMY_LEVEL_OPERATE for a HIGH change resolves to SUGGEST under the example above. Floors from the org and from control packs combine by taking the lowest; pack floors only add caps and never displace the org's. Only org floors displace the shipped floor.
Across scopes: defaults merges field by field; a narrower scope's rules list replaces the wider list; floors are FORBID and cannot be set below the org. SDLCProfile.spec.autonomy is one more layer at the profile's scope, applied after that scope's AutonomyPolicy.
Security implications
- An agent cannot widen its own level. A narrower scope cannot lift a floor, and a rule cannot exceed one.
- A repository can always choose a lower level than the org allows.
- The generated repo tree writes no floors block:
numi initexplains that a floor set below the org scope is refused, and that without an org document the engine applies its shipped floor, which caps every change at PR (HIGH at SUGGEST). Runnumi init --org-dir DIRto write explicit org floors.
Common misconfigurations
$ numi validate --files bad-enum.yaml
revision: "files"
invalid file "bad-enum.yaml": kind: does not match the kind schema: schema: value does not match (violations: 1): \"/spec/defaults/level\": enumThe same shape appears for a misspelt key (default: for defaults: gives "/spec/default": additionalProperties) and for a short enum such as PR. A floor in a repo-scoped document gives floors is set only at the org scope, shown on Layout and scopes.
What validation checks, and what it does not
Checked: keys, enum names, that rules entries have match and level, that floors.rules is non-empty, org-only floors. Not checked by the open build: whether a rule is shadowed by a floor, whether the named playbook or environment exists, or the resulting level for a given change. numi validate --files runs no resolver.
Next steps
SDLCProfile
The kind that binds a component to its stages, playbooks, packs, toolchains, adapters, autonomy, residency and budgets, with field reference and merge rules.
Playbooks
Define the procedure for one change type as steps with capability sets, risk, evidence and verifiers, a bounded repair loop, and the qualification record that gates autonomy promotion.