# Five Nines AI Guardrails

> Carrier-grade coding guardrails enforcing McCabe complexity limits, fail-closed security, and edit locks.

Five Nines AI Guardrails is a paid AI agent skill on Agensi by William Dudley, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $49.95 (one-time purchase)
- Creator: [William Dudley](https://www.agensi.io/creators/william-dudley)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Version: 1.0
- Last updated: 2026-12-02
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/five-nines-ai-guardrails
- Tags: code-review, typescript, security, backend, refactoring

## About this skill

AI coding agents often generate complex, fragile code that prioritizes speed over long term stability. This skill enforces deterministic, carrier-grade engineering standards to prevent technical debt and security vulnerabilities before they are committed.

### What it does
- **Complexity Enforcement:** Monitors McCabe cyclomatic complexity to ensure no function exceeds a `V(G)` of 13, forcing decomposition into maintainable helpers.
- **Fail-Closed Security:** Implements strict security defaults for auth, validation, and error handling to prevent data leaks or unauthorized access.
- **Immutable Locks:** Respects `@human-verified` annotations to protect critical code blocks from being overwritten by the agent.
- **Resilience Engineering:** Mandates bounded timeouts, retries with jitter, and resource ceilings for all network and database operations.
- **Observability Standards:** Integrates structured logging with correlation IDs and lazy `TRACE` serialization for high-performance debugging.

### How it works
1. **Context Loading:** The agent reads the master ruleset in `references/AGENTS.md` to establish the operational baseline.
2. **Pre-flight Check:** It scans existing files for `@human-verified` markers and complexity hot spots before starting a task.
3. **Drafting:** Use the provided `templates/SPEC_TEMPLATE.md` to define failure modes and complexity budgets before writing logic.
4. **Implementation:** The agent applies the specific frontend or backend guardrails while generating code to stay under the `V(G) < 14` ceiling.

### Why this beats prompting it yourself
Manual prompts for "clean code" are subjective and frequently ignored during long sessions. This skill uses a reference-heavy approach with specific mathematical ceilings and architectural mandates that ground the agent in rigid engineering constraints.

### Use cases
- Refactoring legacy methods with high branch density into testable units.
- Scaffolding new microservices with built-in resilience and fail-closed logic.
- Protecting sensitive core logic from accidental AI modification using edit locks.
- Generating project-level `.cursorrules` or `CLAUDE.md` config files.

### Known limitations
Requires manual calculation or agent-side estimation of McCabe complexity. Users must manually apply `@human-verified` tags to lock files.

## Requires

Nothing beyond your AI agent.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Five Nines AI Guardrails skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent AI agents from generating low-quality or complex code?

This skill enforces carrier-grade engineering standards by imposing a mathematical ceiling on code complexity, mandating fail-closed security defaults, and protecting critical code blocks from accidental AI overwrites. It solves the problem of AI agents generating fragile, high-debt code that is difficult to maintain or secure.

### What specific documentation and templates are included in this skill?

The skill provides a full commercial ruleset, specialized reference guides for complexity and frontend development, and project templates for drafting specifications. You also receive configuration files specifically designed for use in environments like Cursor or Claude Code.

### Do I need any additional tools to make the edit locks work?

You do not need any external software or accounts. However, for the edit locks to function, you must manually apply the @human-verified annotation to the specific code blocks or files you wish to protect from modification.

### Are there any manual steps I need to perform when using this skill?

This skill requires either manual calculation or agent-side estimation of McCabe cyclomatic complexity. Additionally, users are responsible for manually tagging files with the @human-verified marker if they want to ensure those files remain immutable.

### How do I tell my AI agent to start using these guardrails?

You should instruct your agent to read the master ruleset in the AGENTS.md file to establish the operational baseline. From there, you can ask it to use the provided spec template to define failure modes and complexity budgets before it begins writing any logic.

### What rules does this skill apply to network and database operations?

The skill mandates that all network calls, database queries, and loops include explicit timeouts and bounded retry counts. It also requires exponential backoff with jitter to ensure system stability during failures.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
