The first three notes described the pressure that coding agents put on engineering practice. Production became cheap, so the work moved toward selection and subtraction. Humans and agents proved effective in different working styles, which made an asymmetric workflow necessary. Then manual testing gave way to standing verification loops, a durable system the agent has to satisfy while it works.
The remaining engineering question is concrete: where does the judgment layer live? A rule in a prompt dies with the session. A rule in an unchecked document depends on the next agent remembering to read and apply it. A repo-native rule with a rationale, an executable check, and a receipt trail is present when the agent acts.
We built Duaility/governance-kit to put that memory in the repository. The open-source toolkit provides rules, checks, versioned packs, and audit receipts that remain consistent across agent sessions and tools.
The failure is local success and global drift
A coding agent can complete the task in front of it and still make the system worse. It can land a change through the wrong layer, revive a pattern the team already removed, widen a boundary that was supposed to hold, or satisfy the prompt while missing the operational constraint that mattered.
These failures often look reasonable in isolation. The diff passes the obvious test, the explanation sounds sensible, and the next session has no memory of the correction you gave the last one. The team reteaches the same lesson in chat, review, and side comments while the repository drifts from its own conventions.
Governance Kit turns repeated corrections into repo-native invariants.
The constitution is executable
Governance Kit calls the durable rule set a constitution. CONSTITUTION.md
is the readable policy, but the important part is that each directive carries its
rationale and check beside it. Hooks and CI can run those checks. When a directive
fails, the agent gets a concrete rule id, a reason, and a repair path instead of
another vague reminder to "follow the repo conventions."
The repo now carries the invariant, so the prompt does not have to grow with every correction. The agent reconciles the current change against the rule. A failed check provides the next instruction; a passing check leaves a record.
Packs make governance portable
A single rule is useful. A versioned bundle of rules is much more useful. Governance Kit organizes invariants into packs, so teams can share and pin the rules that define how a repo should behave. The bundled packs cover foundation, commits, and the agent audit chain; custom packs can carry the rules that make a project specific: architecture boundaries, migration constraints, compliance evidence, ownership rituals, or the corrections a team never wants to repeat.
The policy text is one part of a directive. It also includes the rationale, executable check, and evolution record. The repo pins the kit and pack versions, so Claude Code, Codex, Cursor, OpenCode, and other skills-compatible agents use the same constitution instead of carrying slightly different memories of the project.
Receipts make the work auditable
Once agents do real work, review needs more than a diff. It needs to know what issue the change served, what behavior changed, what was tested, what risk remains, how much the agent spent, and where a human had to steer. Governance Kit puts that trail in receipts, so the record is visible to reviewers and readable by future agents without requiring the old chat transcript.
Hooks can block a bad commit. A governance layer also records why an accepted commit was allowed to exist.
A concrete slice of the judgment layer
Governance Kit is not the whole governance problem. It is a concrete slice of the judgment layer for software repositories. It gives the repo a way to state its invariants, why they exist, how they are checked, how exceptions get recorded, and what the last agent run cost.
At Duaility, we want the decisions around agent work to be inspectable, versioned, and shared. Governance Kit applies that approach to software repositories.
The project is MIT licensed and available now: github.com/Duaility/governance-kit.
The broader pattern is an agent surrounded by a durable judgment layer. The next note explains why that combination is an AI twin, not just an agent.