Governed Agentic Engineering

Standards for building with AI agents, where the agents that write the specification are governed as strictly as the agents that write the code.

Depth
  1. Truth Chain, Contract and Registry. One fixed order of authority, one document format, and every governed value in one place.

  2. GAL, Boundary and Handoff. How an agent is built, started, verified and closed, what it may do, and how work passes between sessions.

  3. GIP, Backlog and Wave. The only way work reaches the agents that write code, where the work is kept, and what waits for what.

  4. GEM. The decision log, the retro log and what learns from them, written in forms a parser can count.

  5. Evidence proposes, governance decides. The author of a specification never approves it, and the owner holds final authority.

The question

Can you tell whether the agents did the right thing?

Agents write the specification as well as the code, so the real question is how anyone can tell that what they built is what should have been built.

Coding agents can produce working software quickly. The discussion has mostly been about speed, cost and the quality of the code. A different question decides whether such a factory can be trusted with a real system: how does anyone know that what the agents built is what should have been built?

The specification is written by agents too

Agents draft the requirements, the contracts and the parameter values the code is built from. A wrong rule in the specification survives every check on the code, because the code does exactly what it was told.

A check can pass without looking

An agent can write a test, read the code, adjust the test and report green, and nothing in its output shows which of those steps happened. A gate that reads no input finds nothing to object to.

Agents forget, and systems drift

Every session starts with an empty context. Without a record the next session finds, a system built by agents becomes a pile of locally reasonable choices that no longer fit together.

The error is not caught; it is built.

From
The load-bearing ideas

Ten ideas, one white paper each

The white papers explain and the standards are the rules, and each idea has a paper of its own.

The white papers explain and the standards are the rules. Each idea below is the subject of one paper, and each paper opens here as plain text, fetched from the latest release.

How work flows

From evidence to merged code, through one gate

Specification agents decide what is correct, implementation agents build it, and a gate stands between them.

Two kinds of agent, one path. Specification agents decide what is correct, and implementation agents build it. Between them stands a gate, and work passes from one agent session to the next in a handoff the operator carries.

Specification side

Domain researcherGathers and classifies the domain knowledge the contracts rest on, so a claim can be traced to its source.
Contract authorWrites the contract: the specification the implementation is built from.
Contract auditorValidates the contract against the Contract Standard before it becomes truth.
The ownerAttests. The author never approves its own contract.
The gateThe architect dispatches. A post enters the queue only with a verified record that its specification passed audit, and a scope that is measured rather than listed.

Implementation side

session agentTakes one postDispatches each step. It never implements and never writes checks.
step A · testerWrites the checksFrom the contract. Never reads the code.
step A.5 · verifierReviews the checksAgainst the contract, without the code.
step B · implementerMakes them passWithout changing them.
step C.5 · verifierTries to disprove itThe change, against the contract.
mergeEvery receipt approvedThe full suite green, and no hard stop.

A gap is a finding, never a guess. What the build cannot read unambiguously in the contract goes back to the specification side, and the contract is settled there.

The reviewer stands outside both

Adversarial review of changes to the agents and to shared infrastructure. No agent reviews itself, and a reviewer never changes what it reviews.

Hard stops go to the owner

A red baseline, a change too large, a review that does not pass within its rounds. The owner decides whether the post continues, is split or goes back to dispatch.

One post at a time

Each on its own branch, to its own pull request, with a receipt for every step. The queue is the proof that the path was followed.

Verification

The checks are written from the contract, never from the code

The role that writes the checks never reads the code, and the role that writes the code may not change the checks.

A check written from what the code does freezes the code's behaviour, errors included. So the role that writes the checks may not read the code, and the role that writes the code may not change the checks. That is how a build shows that the logic in the contract is the logic that was implemented.

Who may read what

RoleThe contractThe checksThe code
Testerstep Areadswritesnever
Verifierstep A.5, test reviewreadsreadsnever
Implementerstep Breadsreadswrites
Verifierstep C.5, code reviewreadsreadsreads

The implementer never writes the checks, and the verifier writes nothing that remains. Its mutation probes run in a copy of the repository that is discarded.

The loop must prove its sensor sees something

At least one check has to fail before the implementation starts. If every check passes at once, the verifier reviews the checks again.

Both reviews, always

The test review and the code review run in every build, whatever its size. No lane skips a step.

No escape hatches

A skipped check, a suppressed type error or a disabled lint rule in the change fails the build.

What the receipts show

In the reference installation, 14 test reviews found gaps in the checks before any code was written, and 3 code reviews disproved the change.

Numberless code: the values are measured, not trusted

Every governed value lives once, in a registry. The contract cites its key, the code reads its key, and neither carries the number. That makes it something a tool can measure.

Example
the contractWeekly load never rises by more than `load.weekly_increase_max`.Cites the key. Never the number.
the registryload.weekly_increase_max = 0.10One value, one place, with its source and its confidence.
the code
hardcode sweepValues in a contract that should cite a key.
code sweepLiterals in the code that equal a registry value, or carry a key's name without reading it.
completeness gateWhether the implementation consumes and tests each normative statement and each registry key the contract cites.
sensitivity checkA check runs with a different registry value. The result has to follow it.
In the reference installation the sweeps report, and few of them block. The paper says so.

Syntactic

Mechanical gates. A tool checks the form before anything lands.

Semantic

An audit by another agent, against a fixed standard.

Empirical

Tests against a model of the domain.

Independent derivation

A different tool derives the answer, against one written down in advance.

Green tests are a condition for merging; they are not the definition of done.

From
Memory

A memory that is governed, not just kept

Each session writes what it learned where the next one finds it, in logs that are never edited, only corrected.

Every session starts with an empty context, so what one session learned has to be written where the next one finds it. Three records carry it: the retro log, the decision log and the backlog. A log entry is never edited or removed. A wrong entry is followed by one that corrects it.

The session loopwhat one session hands the next

  1. Start. The agent reads the learnings recorded for its item.
  2. Decide. At each decision point it consults them again, and cites the ones that apply.
  3. Close. It writes a retro entry and names the pattern it met.
  4. Hand off. The handoff carries what was done and what was not measured.

The pattern loopwhat the system learns across sessions

  1. Count. Triage counts the names of patterns, never the prose around them.
  2. Threshold. A pattern that recurs often enough gets a backlog item.
  3. Dispose. A countermeasure, or the pattern is accepted with a date for review.
  4. Regress. An occurrence after the fix has closed reopens the item.

Nothing is lost silently

A parser checks its count against a looser count. A zero where the logs hold entries is a failure, not an empty result.

What the logs hold

In the reference installation, 1,589 retro entries. 567 of them name a pattern, under 224 names. 48 patterns carry a disposition.

It shows what did not hold

The most frequent pattern regressed after its fix. The record says so, with 44 entries after the fix and 18 more since it was accepted.

The memory shows the fix did not hold; it does not by itself make the next fix hold.

From
The second brain

A memory built from several techniques, each doing what it is good at

Six ways back to what is known, from task and name to meaning and time, all under one rule: evidence proposes, governance decides.

GEM says what a memory must guarantee before an agent can trust it. It does not say how to build one. There are six ways back to what is known. GEM requires the first two. The other four are the installation’s choice, and each comes with a rule the store must keep, whatever technique carries it. All six stand under the same rule: evidence proposes, governance decides.

  1. By task

    What earlier sessions recorded for this item: the latest entry for each named pattern. If the list is cut, its last row says so.

    learnings(item)
    GEM §5
  2. By name

    Patterns are counted by name, never by the prose around them. At the threshold a pattern becomes work, and a later occurrence is a regression.

    pattern_counts
    GEM §6
  3. By relation

    A closed set of named relations between records, such as supports, contradicts, cites and answers. The store refuses any other, so a new relation is a change to the schema, not a new string.

    CHECK in Postgresgraph schemaRDF + SHACL
    Your choice
  4. By meaning

    Every record with text gets an embedding, and a new source finds its neighbours by what it says. A vector never describes text that has since changed, and a filtered search says when it returned fewer hits than asked.

    pgvectorvector databasesqlite-vec
    Your choice
  5. By words

    Full-text search with the dictionary of the text’s own language. An empty answer is not a no: the search says what it looked through.

    Postgres FTSSQLite FTS5search engine
    Your choice
  6. By time

    Every fact carries the time it held in the world and the time the system believed it. The graph can be read as it was known on any date.

    history tablesbitemporal store
    Your choice

The rules for the last four are a candidate for the next release of the standards. Today they are the installation’s own.

The knowledge graph, moving

A prototype with invented example data about training load and injury. Ask a question or play a morning. Every motion is an event in the graph. Nothing moves for show.

Prototype · example data

One way to build it

GAE does not prescribe a store. This is one way to keep the rules above with a single database: the text in rows, and the rules in constraints the database itself enforces. A graph database, a separate vector store or SQLite can keep the same rules. What matters is that a tool keeps them, not the agent’s instructions.

One possible build
insert / update›trigger›job queue›scheduled worker›embedding call›vector + text hash›ANN index
Storage
Postgres, with one schema that changes only through migrations. SQLite is enough for one person; a graph database fits where relations dominate.
Vectors
pgvector on every table whose rows carry text. A separate vector database works too, keyed on the record’s id and a hash of its text.
Vector index
HNSW with cosine distance. A filtered search either returns the full number of hits or says it returned fewer; in pgvector that is the iterative scan.
Embeddings
Any embedding model, with its name and version stored beside the vector. The API key stays in the worker and never reaches the database.
Pipeline
A trigger puts a job on a queue and a scheduled worker makes the vector. A hash of the text, checked on write, stops a vector being stored for text that changed in the meantime.
Full text
tsvector with the text’s own language dictionary and a GIN index. SQLite FTS5 or a search engine keep the same rule.
Graph
One edge table, with the relations in a CHECK constraint. In a graph database, its schema; over RDF, SHACL shapes. A new relation is a schema change.
Time
Valid time and system time. History tables with an exclusion constraint so two versions never overlap, read through an as_of function.
Access
Row-level security, closed to the outside. Functions with a fixed search_path and no dynamic SQL.
Text in the vector
Embeddings are made from text only, never from the rows of data tables. A row’s text never goes into a queue job, a log or an error row.

The logs cannot be rewritten

The retro log and the decision log only grow. The store refuses an update or a delete, and a wrong entry is followed by one that corrects it.

Reading can be recorded

If each read of an entry is stored, it can be measured whether a lesson reached anyone. Whether it changed the outcome is a second measurement, and a harder one.

Nothing in the memory decides

A new insight never changes a contract or a value. It becomes a proposal that a person approves or rejects, and the decision is logged. That is the Truth Chain’s rule.

The standards

Ten standards, each with its own version

An installation copies them unchanged from a tagged release and binds them in an appendix of its own.

A standard names no installation. An installation binds the standards in its own appendix and copies them unchanged from a tagged release. Open one to read it as it stands in the latest release on GitHub.

StandardWhat it governsIn the release

Checking GitHub for the latest release.

Measured and shown

What the reference installation recorded

In the reference installation: 11,340 commits in 247 days, 514 checks caught passing without testing what they claimed, and a reviewer that said no 40 times out of 118.

Every figure was read from the reference installation, Runapp, at one measuring point, 2 November 2026, and each has a rule that reproduces it. The figures are the installation's own. No independent party has reproduced them.

11,340

commits in 247 days, from the first commit to the measuring point.

153

typed documents in the specification corpus, in nine domains.

514

checks caught passing without testing what they claimed, across 97 contracts.

31

units of work through the dispatch gate: 25 done, 6 superseded, median 2.9 hours from entry to done.

1,703

decisions in the decision log, and 1,550 entries in the retro log.

218

of 863 live registry keys state plainly that no evidence bears them.

Adversarial review says no more often than it says partial

206 handoffs went from the reviewer back to the architect. 118 of them carry a closure verdict.

A suite of 53 green checks tested a stub

A compliance loop over the contract corpus found it in one contract, among the 514 checks that passed without testing what they claimed.

The most frequent pattern did not converge

Taking a count on trust instead of measuring it has 152 entries in the retro log. 44 came after its fix. The pattern was accepted with a date for review, and 18 more have followed.

A second installation, in another domain

A strategy and planning system whose deliverable is the agents' knowledge work. It shows the standards carry an installation with no code in its product. It does not show the method transfers to anyone but the originator.

Limitations

What is not shown

Two installations, both set up by the originator, no external evaluation, and logs the agents wrote about themselves.

Every paper carries its own list of what it did not measure. The overview's list is the one below. The standards are early work, and every file says status: draft.

Two installations, one originator

The same person set up both. Nothing shows how it behaves when someone else adopts it, with a team, or on another agent platform.

No external evaluation

The figures are the installation's own. No independent party has reproduced them.

The logs are self-reported

The retro log and much of the decision log are written by the agents about their own sessions.

Several rules are held by instruction

Not by a tool. Each paper says so where the rule is described.

Some loops do not converge yet

The most frequent recurring pattern regressed after its fix and has been accepted rather than fixed again.

The method grows

Every named failure has added a rule, a tool or a gate, so the method grows by construction.

Step 1

Secure quality

With rules, gates and mechanical measurement. The standards as released are step 1.

Step 2 · not run

Then scale it down

Remove them one at a time against a fixed answer key until the result changes, and keep what the result needs.

Missing

The answer key

A regression suite for the governance itself. It does not exist yet, so step 2 has not been run.

A harness that claims to hold everything invites the reader to stop looking.

From
Looking forward

To scale, verification has to grow, not attention

So far one person decided everything. To scale, verification has to grow with the work instead of that person's attention, and none of it is built yet.

Everything above was measured with one person deciding. Running more agents is the easy part: coordination, governance and verification have to grow with the work, or that person’s attention becomes the bottleneck. The overview names three open tracks and a direction for each. They are directions, not results. None of them is built yet.

Autonomy is earned, per class of work

Log every human confirmation with its outcome. A checkpoint that changes nothing over enough occasions can become a gate. Work that restores agreement with a contract is the agents’ to start; work that changes what a contract says waits for the owner.

Many sessions, one truth

Compute what a change affects before the work is routed, and lock per cluster of contracts, so that sessions that do not overlap can run at once. Several operators become several sources of events into one routing step and one truth chain. Not several truths.

The state lives in the record

Context control becomes a stated principle. What the system knows stays in the corpus and the database, not in a long-lived agent, so every choice can be audited and every agent replaced.

A slim routing step

One agent between everything that comes in and the agents that do the work. It classifies and dispatches, and does no work itself. It carries nothing from one decision to the next and reads the record every time.

Direction · not built
EventsOperators, sessions, reviews and failures, all arriving as events.
The routing stepProposes a class for each item and computes what it affects. Code decides what the class may do, so a wrong class cannot widen its own mandate.
WorkersOne isolated session per task, locked per cluster of contracts, merged through the gates.
The ownerWork that changes what a contract says waits for a person.

Taken from a design the DeepSeek Harness team published in 2026, with one difference: their router carries working memory across tasks; this one carries nothing, the stateless form Anthropic describes for its managed agents. From the overview’s § 6.2, Scale.

The owner decides

Evidence proposes. Governance decides.

Defining what is correct, building it and verifying it lie with different roles, and the owner has the final say.

The authority to define what is correct, the ability to implement it and the authority to verify it lie with different roles. No role holds two of the three for the same piece of work, and work passes between agents in a handoff the operator decides.

  1. The constitution

    What the system is for, and the constraints every contract serves.

  2. The contracts

    Together with the registry values they cite by key.

  3. The implementation

    The code that executes the contracts. In a knowledge corpus, the deliverables the agents produce.

  4. Evidence and advisory

    Evidence is the ground the statements rest on, not a level of authority. Advisory never changes behaviour.

When two levels conflict, the higher one holds. The order is fixed, and no instruction, prompt or runtime context reorders it.

When the code and the contract disagree, the code is the defect. This holds even when the code is better.

From

The agents

  • draft the specification, and audit it in a different role
  • build only what a gate has let into the queue
  • file a gap as a finding, never fill it with a guess
  • verify work they did not write, in a role of its own
  • write what they learned where the next session finds it

The owner

  • sets the principles, requirements and direction
  • decides when work passes from one agent to the next
  • decides what the agents leave open
  • decides each removal of a rule, one at a time
  • holds final authority, and the emergency path
Two shapes

Two shapes, one methodology

It works for a product that agents build and for a knowledge corpus where the agents' work is the deliverable.

GAE is not tied to a particular product, industry or type of output. What the agents build takes one of two shapes. The standards were developed while building a product, and have since been applied to both.

A product

build-time agents · deterministic runtime

Agents build the system. Once it is deployed, deterministic code takes over: every decision the product makes for its users follows explicit contracts, and every value it acts on names its source. The agents don’t need to be present for the product to work.

A knowledge corpus

the agents’ work is the deliverable

Analyses, plans, decisions and their sources. Here the output itself is what is delivered. There is no runtime to separate from the agents, so governance moves into the deliverable: its structure, its evidence, its sources and the contracts that define what a valid result is.

Same discipline, different domains

shared standards · contracts · governance · verification · lifecycle

Software that acts, or knowledge that informs action. Either way the contract comes first, a different agent verifies the work, and a person decides.

Installation

Paste a link, and answer the questions the agent asks

Paste the repository's link into a coding agent and ask it to install GAE: it asks the questions, and you attest each step.

Open a coding agent in your repository, paste the link and ask it what this is. If you want it, ask it to install GAE. It fetches a tagged release, checks it against SHA256SUMS, and walks you through the setup. You never copy anything yourself, and you write nothing up in advance.

https://github.com/jonasmaandiwallin/governed-agentic-engineering

What you need

  • A repository, empty or with code in it.
  • A coding agent with file, git and shell access to it. The templates are written and tested for Claude Code.
  • One person who is the owner, who decides intent and confirms what no agent may decide for itself.
  • An idea of what you are building. The agent asks about it, one question at a time, and you answer.

What the agent does

  1. Fetches a tagged release, never main.
  2. Checks every file against the release's SHA256SUMS, and tells you which known issues bear on your system.
  3. Copies the standards and the starter into your repository, unchanged.
  4. Asks you the intake questions, one at a time, and writes your answers up on one page for you to attest.
  5. Follows the adoption procedure from there, one checkpoint at a time.

What it asks you

Eight questions, and only the ones your first description left open. The answers decide which standards you take and how the roles are filled.

  1. What kind of installation is it: a product, a knowledge corpus, or both?
  2. Which values could change without a code change, and where does each come from?
  3. Does any rule rest on an external source that must stay traceable?
  4. How many products or repositories will be built, and do they share one specification?
  5. Who works with the agents, and who may confirm what?
  6. What will the agents run on, and in which languages?
  7. Is there code in the repository already?
  8. Whose data is it?
  1. CP0

    Intake

    Shape, domain, deliverables and platforms, on one page.

  2. CP1

    Architecture contract

    The first contract. Nothing is built before it.

  3. CP2

    Infrastructure built

    Only what the standards and that contract require.

  4. CP3

    Agents answer

    Every agent starts and shows a correct receipt.

  5. CP4

    System overview live

    The status is computed, not written by hand.

  6. CP5

    Domain contracts

    Each reviewed, attested and merged.

  7. CP6

    Domain built

    Against the merged contracts.

  8. CP7

    All systems go

    The first real deliverable, reviewed and attested.

The owner attests each checkpoint before the next one starts.

Every installation is its own

A standard names no installation. It speaks in placeholders, and each installation binds them to its own names, files and tools in one document, the instance appendix. The two installations so far bind them like this.

The standard saysA product: a running coachA knowledge corpus: strategy and planning
[constitution]The product’s purpose and its limits.The planning principles all the work follows.
[contract]Contracts for the training decisions the product takes.Contracts for each kind of deliverable.
[registry]Training parameters, each under one key.Priority weights and tier thresholds, each under one key.
[evidence registry]One entry per research source.One insight per claim, with its source and its tier.
[implementation]Deterministic code that runs without the agents.The deliverables the agents produce.
the recordFiles in git.Rows in a database.

Every tool starts as not built

Each one carries the failure that would make it worth building. The installation runs on files and instructions until such a failure actually happens.

The standards stay unchanged

You do not edit your copy. What does not fit is recorded as a deviation in your own appendix and reported upstream.

Read the known issues first

The release lists what is known to be missing or wrong. Both installations were set up by the originator, and no outside adopter has installed GAE yet.

Getting agents to do things turned out to be the easy part. The hard part was building a system in which you could tell whether they had done the right things.