# Governance and guardrails

> Governance applies while the agent acts, through rules written into the configuration. The golden path should also be the fastest one.

A skill is advisory: it makes rule violations rare without preventing them. A hook that runs before an action is deterministic: it can allow the action, ask for approval or block it. Every strict rule needs a hook or a PR check behind it.

Non-negotiable settings are managed centrally and cannot be changed on a developer’s machine. For example: secrets the agent cannot read, restricted outbound network access, MCP servers and plugins from an approved list, a minimum tool version. Every restriction removes a capability. The right balance depends on how sensitive the repository is. Security and compliance rules are written as code, versioned and tested in the pipeline. Every build produces an SBOM.

Two mistakes are common: blocking developers, or cleaning up damage after the fact. A golden path avoids both: scoped permissions, deployment through the pipeline, never by hand, shared context provided by default. It rests on an agent registry, a skill registry and an MCP hub. The hub grants, logs and revokes access in one place.

Permissions apply at the data level, by role. A full log of tool calls and an audit trail show what agents did and why.

**When**: As soon as agents can reach secrets, production or regulated data.

**Trade-offs**: Every guardrail narrows what the agent can do on its own. Too many rules make the tool unusable and push people to work around it, while too few leave production exposed.

## Where to start

- Write each important rule as a skill
- Back strict rules with a hook
- Centralize non-negotiable settings
- Route tool access through a single point
- Register every agent with its permissions
- Require approval for every message sent on a person’s behalf, without leaving the decision to the model

## Common mistakes

- Assuming a skill guarantees a rule is followed
- Locking things down until the tool is useless
- Letting people add MCP servers on their own machines
- Cleaning up afterward instead of enforcing rules while the agent acts

## Metrics

- Review findings that cite a rule already written as a skill
- Rule violations before and after hooks
- Time from a rule change to the skill update

## Sources

- [Anthropic, The AI-native SDLC playbook](https://claude.com/fr/resources/articles/the-ai-native-sdlc-playbook)
- [Port, AI SDLC: a practical guide to SDLC AI agents](https://www.port.io/blog/ai-sdlc)
- [Atlassian, The AI SDLC transformation playbook](https://www.atlassian.com/blog/ai-at-work/ai-sdlc-transformation-playbook)
- [Warp, The Factory Stack](https://www.warp.dev/blog/the-factory-stack)
- [DoiT, Running Hermes Agent in the Enterprise](https://www.doit.com/blog/running-hermes-agent-in-the-enterprise)
