The Two Guardrails
Agento uses a two-tier guardrail system designed to prevent broken code and eliminate hallucination drift during autonomous coding sessions.
Overview of the Guardrail Halves
Section titled “Overview of the Guardrail Halves”Proposed Edit (write_file / edit_file) │ ▼┌────────────────────────────────────────────────────────┐│ LINTOs (PRE-WRITE, blocking) ││ - Evaluates rules against proposed in-memory buffer ││ - Hard gate -> Rejects edit immediately ││ - Justify gate -> Requires explicit human consent │└──────────────────────────┬─────────────────────────────┘ │ Passed ▼ File Written to Disk │ ▼┌────────────────────────────────────────────────────────┐│ CHECKS (POST-WRITE, non-blocking feedback) ││ - Runs fast diagnostics (compiler, typecheck, lint) ││ - Extracts newly introduced errors ││ - Surfaces actionable feedback to agent prompt │└────────────────────────────────────────────────────────┘1. Pre-Write Guardrails: LINTOs
Section titled “1. Pre-Write Guardrails: LINTOs”LINTOs are deterministic rules that evaluate proposed code changes before they are written to disk.
- Execution Timing: In-memory, immediately prior to file mutation.
- Behavior: Blocking. If a rule is violated, the file write is stopped.
- Purpose: Enforcing non-negotiable repository standards (e.g. banning
anycasts, preventing hardcoded credentials, protecting configuration files, and ensuring architectural boundaries). - Gate Levels:
hard: The mutation is rejected immediately, returning rule feedback to the model to rewrite the code.justify: Pauses execution to require human approval or a justified override.
2. Post-Write Verification: Checks
Section titled “2. Post-Write Verification: Checks”Checks are non-blocking diagnostic commands (such as tsc, cargo check, eslint, or unit tests) that run after an edit is successfully written to disk.
- Execution Timing: Immediately after a file write or on milestone completion.
- Behavior: Non-blocking feedback. Checks never prevent a file from being written; instead, they capture compiler and linter output to provide the agent with instant, real-world feedback.
- Noise Filtering: Agento filters out pre-existing repository errors and reports only the new errors introduced by the agent’s recent edits.
- Tiers:
- Tier 1 (Fast Micro-Checks): Rapid checks running within strict time budgets (<2s) on every edit.
- Tier 2 (Milestone Verification): Authoritative test suite and full build checks run upon completing a milestone.