Autonomy by configuration

1 founder · 19 repos · 18 agent roles

A change’s level is the strictest level of anything it touches.

That one rule is how Lunar Engineering runs: agents ship most of our work on their own, and the few changes that touch money, patient records or the cloud wait for a person. Risk is a file in every repo. Enforcement is generated from it. Autonomy is earned on the record.

# AUTONOMY.yaml · lunareng/api
default: L3
actions:
  send: L2   spend: L2
  delete_data: L1   touch_ehi: L1
paths:
  - glob: …/lunarmd/internal/charts/**
    level: L1  # Charts are EHI.
  - glob: packages/platform-stripe/**
    level: L2  # Payments.
  - glob: …/db/migration/**
    level: L2  # Hard to reverse.
# everything else: L3, merges on green

The problem

One person’s evenings cannot approve every change.

Failure one

Runaway building. Agents ship things nobody needed, because they were easy or interesting.

Failure two

Hand-holding. Agents ask the founder things the rules already answer, and the founder becomes the bottleneck.

The fix for both is the same: write the risk down once, so neither the agent nor the founder has to decide it again.

The one rule

Scored on every pull request

The gate walks the diff and keeps the worst answer.

A required check matches every changed file against the repo’s policy. Two files are ordinary L3 work. One migration is hard to reverse, so the whole pull request is L2, and an agent’s L2 pull request waits for the owner’s approving review on that exact commit.

apps/api/…/booking/Copy.javadefaultL3
apps/api/…/booking/BookingTest.javadefaultL3
apps/api/src/main/resources/db/migration/V91__slug.sqldb/migration/** · hard to reverseL2
The pull requeststrictest of the threeL2

Never split a change to keep a piece under the line. The reviewer fails it if you try.

Four levels

No L0

Each level answers four questions.

LevelWho sets directionWho approvesWho mergesWho reads about it
L4 Self-directedThe agent writes its own goals, bounded by a judgeAn outside judge it cannot write toThe agentMonthly summary
L3 AI leadsThe agent proposes goals; the owner approves themCI and an outside review verdictThe agentFriday digest
L2 AI collaboratesThe ownerThe owner, by the intent of the PRThe agent, after a yesPer PR
L1 Human leadsThe ownerThe owner, line by lineThe ownerPer change

How a path gets its level: three questions scored 1 to 3 (blast radius, reversibility, data sensitivity). All 1s is L4; any 2 is L3; one 3 is L2; two 3s, or any patient-record write, is L1. L4 also needs a judge: a number the agent cannot write to, like CI on main.

Risk as configuration

A repo may tighten its policy on its own. Loosening waits for a person.

Tightening

A path moves from L3 to L2. Once CI proves the edit only tightens, it merges on green with the rest of the change.

Loosening

A path moves from L2 to L3. Loosening is always L2: the owner approves it.

Below a floor

Patient records, secrets, deleting customer data: permanent floors no repo file can lower.

The asymmetry is the safety story. Agents can only ever make the system stricter on their own.

Policy is written once

Enforcement is generated from policy, so the two cannot drift.

One YAML file per repo and one per agent role. A generator turns them into everything GitHub enforces, and CI refuses a hand edit to any of it.

  • AUTONOMY.yamlmirrored into every repo, read by every agent at session start
  • CODEOWNERSevery L1 and L2 glob routed to the owner, with its reason
  • gate configrequired checks and the bot logins that mark a PR as an agent’s
  • App manifestsone GitHub App per role, scoped to the repos it may touch
  • workflows + schedulehow and when each role runs, and what the clock dispatches

Levels are earned

Four clean weeks earn a promotion proposal. One incident takes it back.

The ratchet

Every Monday a script reads the record: issues labelled catch and incident. A repo with no catch in four weeks gets one yes-or-no proposal to move up a level. An incident lowers it one level by a pull request that only tightens, so it merges on green.

The decisions log

Every yes or no the owner gives lands in the charter. Agents read it at the start of every session, so a question is answered once, and the log answers it after that.

Waitlist

We read every answer

We’re deciding what to open up first.

The charter template, the gate as a GitHub Action, the generator, or help setting it up across your repos. Tell us what you’d need, and we’ll write to you when the first piece is out.

We’ll email you about this waitlist and what we release from it. Every email has an unsubscribe link.