Structure for every edit
Zones define where agents may work, which dependencies matter, and the risk profile of each part of the code. An agent reads a map instead of inferring the architecture from 50 files.
gndctrl
governance layer for agents
Air traffic control for agentic codebases
gndctrl is a governance layer you embed in the codebase itself — stability annotations and shared memory that any AI agent reads without an SDK, follows as clearance rules, and is enforced against at runtime. Claude, Gemini, Copilot, Codex, local models — one shared rulebook and one shared memory for every agent, so a mixed fleet hands off to itself instead of each agent starting blind.
Agents file a flight plan, get cleared into the zones they're allowed to touch, and leave a logbook entry behind so the next agent — even a different one, from a different provider — starts where the last one stopped.
Zones define where agents may work, which dependencies matter, and the risk profile of each part of the code. An agent reads a map instead of inferring the architecture from 50 files.
Locked and sensitive zones are enforced at the tool layer — a pre-tool hook denies the edit until the agent has read the map. Not a rule it can skip.
CRID-indexed logbook entries retain the non-obvious context — the workaround, the landmine — between sessions, so the next agent (or the next model) starts informed.
Two things changed once agents got good.
An agent produces a correct-looking diff in seconds. The expensive question is no longer "can it write the code," but "is it allowed to touch this code, and does it know why this code is the way it is."
The hard-won reason a function is "weird" — the fragile ordering, the thing that breaks billing if you change it — lives in someone's memory or a buried PR comment. The next agent starts blind and re-learns it by breaking it.
A rule in a prompt is advice the agent can skip, it has no idea which part of the codebase it's standing in, and it forgets everything when the session ends. gndctrl fixes the substrate instead of the prompt.
Three layers, all in the repo: a .gndctrl zone registry,
file-level @gndctrl:zone markers, and function-level
@gndctrl:node markers for the non-obvious caveats.
Enforceable context lives beside the code — not in a separate wiki or a prompt.
# @gndctrl:zone START | id=PAYMENT | stability=sensitive | deps=[AUTH_CORE]
# @gndctrl:node id=PAYMENT.charge_user | risk=high | crid=PMT-20260430-001
async def charge_user(...):
...
# @gndctrl:zone END | id=PAYMENT
A targeted pre-flight (~1–4k tokens) instead of loading the whole codebase (tens to hundreds of thousands), once per session. Less drift, less rework, lower spend →
Landmines are recorded once and read forever. Agents stop re-breaking the same fragile code.
The dangerous edits and operations are blocked, not just discouraged — at the tool, commit, and session layer.
Claude, Gemini, Copilot, Codex, a local model — they all read and write the same map, tiers, and logbook. Governance and context are shared across the whole fleet, so a handoff between different agents carries full context, not a cold start.
gndctrl is spec-first: the format works today, by hand, with any agent — write a .gndctrl, add markers, point your agent's system prompt at the contract. The CLI and Air Traffic Control hooks are the packaging on top — now public, one command to install:
curl -fsSL https://raw.githubusercontent.com/internetsguy/gndctrl/master/install.sh | bash
Needs Python 3.9+, git & curl (macOS/Linux/WSL). Runtime enforcement requires Claude Code — see requirements.