AI Engineering Framework

Agentic Rails

Agents can move fast, but they need rails.

This does two things: organize your context, then give your agents skills and rules for working with that structured context.

A hand-drawn train carrying a working crew along two rails through an Australian landscape, with a records office and workshop beside the line.
The framework is the track. Your IDE is the train, your project is the carriage, and you are the driver.

The Problem

Agents feel messy

Claude, Codex, Cursor and all the others will smash out a bunch of work after a prompt. We want them doing planning, avoiding tech debt and running for hours without bothering us humans with tedious questions.

They need some sort of Jira board for tasks to do, and evidence they did it. These should simple, and committed along with the code so that we don't depend on chant histories on one computer.

And coding agents need hard limits that will block them doing the wrong thing, since just asking in a prompt is a request.

Agents don't remember anything, so constantly telling them how to work is tedious. And the .claude\.agents files get full up fast, flooding the context window so they get dumb. Especially on big projects.

All this is multiplied by the many agentic IDE that are available. Being tethered to one solution becomes a problem if your environment must change.

A Context Solution

6 Tiers of Context

Agentic Rails helps get the design of your project out into lots of markdown files, arranged in a hierarchy. It uses different tiers of context files to zoom into what you need done, so the agent and the human both can understand the full picture when doing some work.

This borrows from Agile to take the overall design document of the project, and break it into milestones. Using this context structure, you break those into stories and write one or more plans to get a story done.

This forms your context using Progressive Disclosure. This focuses you and the agent in on the task without flooding the context window.

  1. 0Dictation
  2. 1Design
  3. 2Milestone
  4. 3Story
  5. 4Plan
  6. 5Phase

Breaking this work down, provides clear instruction as well as history right there in the repo in plain text where everyone can use it.

A Behavior Solution

Skills, Rules and Persona

Agentic rails has skills that compliment, and assume this context system. Such as rails-planning that drops a plan off in the context/implementation-plans/milestone directory. This keeps your project tidy with less effort from you.

The intention is that you fork the tooling repo, and use it for your source of truth to version control system wide agent persona, rules and skills.

These can be copied into the local settings for most IDE's to activate them.

An Enforcement Solution

Guard rails, validators and hooks.

Lastly, taking advantage of hooks in your Agentic IDE allows for validation and guard rails. That's where you can install the Agent Rails Marketplace to get plugins into your projects or whole system.

Gates block progress until pre-requisites are completed, like unit tests must pass. Guardrails kick in when an agent does something wrong, like reject a python tool call if the agent fails to use UV.

Hooks also allow you to spin up specific sub agents, such as a Critic or an Advisor guardrail to provide feedback to your agent while it works. This automates pointing out problems in planning or implementation.

Don't tell an agent what to do in a prompt, enforce it with a script that instead!

01 · Left rail

Context Starter Template

Project-local structure for design, milestones, stories, implementation plans, evidence, reviews and handover. It keeps intent beside execution.

02 · Right rail

Tooling

Reusable skills, rules, and agent personas that you can quickly copy to where they are needed. These shape how agents plan, execute, validate.

03 · Optional System

Agentic Rails Marketplace

Guardrails and verifiers have an installation step as plugins, but allow you to enforce rules upon your agents.

04 · Optional System

Memory Template

A git-revisioned, Markdown-only "records office" for cross-project learnings, built from your own executed work. A place to quickly drop learnings to reflect upon later.