Skip to content

Commit e730a5d

Browse files
feat(agents): add agent quickstart guide and homepage prompt block
Add content/docs/getting-started/agents.md with copy-paste prompts, shim file explanation, and verification checklist. Put the agent prompt block above the fold on the homepage so it's the first thing visitors see after the hero. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0a1f8aa commit e730a5d

File tree

4 files changed

+153
-5
lines changed

4 files changed

+153
-5
lines changed

content/_index.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,39 @@ Opinionated development standards for teams that ship with AI agents.
1313

1414
{{% blocks/section color="white" %}}
1515

16+
## Give This to Your Agent
17+
18+
Paste this into your agent's context, system prompt, or project instructions. That's all it takes.
19+
20+
```text
21+
This project follows DevRail development standards (https://devrail.dev).
22+
23+
Key rules:
24+
1. Run `make check` before completing any task. This runs all linters,
25+
formatters, security scanners, and tests inside a Docker container.
26+
2. Use conventional commits: type(scope): description.
27+
3. Never install tools on the host. All tools run inside the
28+
ghcr.io/devrail-dev/dev-toolchain:v1 container via `make` targets.
29+
4. Respect `.editorconfig` formatting rules.
30+
31+
Available make targets: lint, format, test, security, scan, check (all).
32+
Languages are declared in `.devrail.yml`. See https://devrail.dev/docs/standards/
33+
for per-language tool details.
34+
```
35+
36+
Want it baked into your repo instead? [Add agent instruction files](/docs/getting-started/agents/) so every agent reads the rules automatically.
37+
38+
{{% /blocks/section %}}
39+
40+
{{% blocks/section color="light" %}}
41+
1642
## Why DevRail?
1743

1844
DevRail provides a universal development contract that works the same way for every developer, every CI pipeline, and every AI agent. No more environment drift. No more "works on my machine."
1945

2046
{{% /blocks/section %}}
2147

22-
{{% blocks/section color="light" type="row" %}}
48+
{{% blocks/section color="white" type="row" %}}
2349

2450
{{% blocks/feature icon="fa-terminal" title="One Command" %}}
2551
Run `make check` and get consistent results everywhere -- your laptop, CI, or an AI agent. The Makefile delegates to a Docker container that has every tool pre-installed.
@@ -28,7 +54,7 @@ Run `make check` and get consistent results everywhere -- your laptop, CI, or an
2854
{{% /blocks/feature %}}
2955

3056
{{% blocks/feature icon="fa-cube" title="One Container" %}}
31-
The `dev-toolchain` container includes linters, formatters, security scanners, and test runners for Python, Bash, Terraform, and Ansible. Pin a version and forget about tool management.
57+
The `dev-toolchain` container includes linters, formatters, security scanners, and test runners for Python, Bash, Terraform, Ansible, and Ruby. Pin a version and forget about tool management.
3258

3359
[Learn About the Container](/docs/container/)
3460
{{% /blocks/feature %}}
@@ -59,7 +85,8 @@ Per-language standards define which tools run, how they are configured, and what
5985

6086
## Ready to Start?
6187

62-
- [Quick Start Guide](/docs/getting-started/) -- Get up and running in minutes
88+
- [Agent Setup Guide](/docs/getting-started/agents/) -- Get your AI agent following DevRail in one paste
89+
- [Quick Start Guide](/docs/getting-started/) -- Set up a new or existing project
6390
- [Standards Reference](/docs/standards/) -- Per-language tooling conventions
6491
- [Container Documentation](/docs/container/) -- How the dev-toolchain works
6592
- [Contributing](/docs/contributing/) -- Help improve DevRail

content/docs/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Welcome to the DevRail documentation. These guides cover everything you need to
1212

1313
## Sections
1414

15-
- **[Getting Started](/docs/getting-started/)** -- Quick start guides for new projects and retrofitting existing repos
16-
- **[Standards](/docs/standards/)** -- Per-language reference pages for Python, Bash, Terraform, Ansible, and universal security tools
15+
- **[Getting Started](/docs/getting-started/)** -- Quick start guides for new projects, retrofitting existing repos, and AI agent setup
16+
- **[Standards](/docs/standards/)** -- Per-language reference pages for Python, Bash, Terraform, Ansible, Ruby, and universal security tools
1717
- **[Container](/docs/container/)** -- How to use the dev-toolchain container image
1818
- **[Templates](/docs/templates/)** -- How to use the GitHub and GitLab project templates
1919
- **[Contributing](/docs/contributing/)** -- How to contribute to the DevRail ecosystem

content/docs/getting-started/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ All other tools (linters, formatters, security scanners, test runners) are pre-i
2323

2424
- **[New Project](/docs/getting-started/new-project/)** -- Start a new repository from a DevRail template. All configuration files are pre-set.
2525
- **[Retrofit Existing Project](/docs/getting-started/retrofit/)** -- Add DevRail standards to a repository you already have.
26+
- **[Working with AI Agents](/docs/getting-started/agents/)** -- Get AI coding agents to follow DevRail standards in your projects.
2627

2728
## Verify Your Setup
2829

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: "Working with AI Agents"
3+
linkTitle: "AI Agents"
4+
weight: 30
5+
description: "How to get AI coding agents to follow DevRail standards in your projects."
6+
---
7+
8+
DevRail is designed so that AI coding agents (Claude Code, Cursor, OpenCode, Copilot, etc.) follow the same standards as human developers and CI pipelines. This page explains how to set it up and what to expect.
9+
10+
## The Short Version
11+
12+
If your project already has DevRail files (Makefile, `.devrail.yml`, DEVELOPMENT.md), just tell your agent:
13+
14+
> This project follows DevRail development standards. Read DEVELOPMENT.md before making changes. Run `make check` before marking any task complete.
15+
16+
That's it. The agent instruction files (CLAUDE.md, AGENTS.md, etc.) already contain this directive, so agents that read them will follow DevRail automatically.
17+
18+
## How It Works
19+
20+
DevRail communicates standards to agents through a **hybrid shim** pattern:
21+
22+
```
23+
CLAUDE.md / AGENTS.md / .cursorrules / .opencode/agents.yaml
24+
25+
├── Points to DEVELOPMENT.md (full standards reference)
26+
27+
└── Inlines 6 critical rules (minimum viable compliance)
28+
```
29+
30+
**Agents that follow cross-file references** (like Claude Code) will read DEVELOPMENT.md and get the complete picture -- language-specific tooling, Makefile contract, shell conventions, everything.
31+
32+
**Agents that ignore cross-file references** still get the six critical rules inlined directly in their instruction file. This ensures minimum compliance regardless of agent capability.
33+
34+
## Setting Up a Project for Agent Use
35+
36+
### Option A: Start from a Template
37+
38+
If you create a project from a [DevRail template](/docs/getting-started/new-project/), all agent instruction files are already included. No additional setup needed.
39+
40+
### Option B: Retrofit an Existing Project
41+
42+
If you have an existing project, follow the [Retrofit Guide](/docs/getting-started/retrofit/) to add DevRail files. The agent instruction files are listed as optional, but **they are required if you want agents to follow DevRail standards**.
43+
44+
Copy all four shim files:
45+
46+
```bash
47+
curl -O https://raw.githubusercontent.com/devrail-dev/github-repo-template/main/CLAUDE.md
48+
curl -O https://raw.githubusercontent.com/devrail-dev/github-repo-template/main/AGENTS.md
49+
curl -O https://raw.githubusercontent.com/devrail-dev/github-repo-template/main/.cursorrules
50+
mkdir -p .opencode
51+
curl -o .opencode/agents.yaml https://raw.githubusercontent.com/devrail-dev/github-repo-template/main/.opencode/agents.yaml
52+
```
53+
54+
### Option C: Point an Agent at DevRail Without Files
55+
56+
If you do not want to commit DevRail files yet, you can paste instructions directly into your agent's context. Here is a prompt you can use:
57+
58+
> You are working on a project that follows DevRail development standards (https://devrail.dev).
59+
>
60+
> **Key rules:**
61+
> 1. Run `make check` before completing any task. This runs all linters, formatters, security scanners, and tests inside a Docker container.
62+
> 2. Use conventional commits: `type(scope): description`.
63+
> 3. Never install tools on the host. All tools run inside the `ghcr.io/devrail-dev/dev-toolchain:v1` container via `make` targets.
64+
> 4. Respect `.editorconfig` formatting rules.
65+
>
66+
> **Available `make` targets:**
67+
> - `make lint` -- run linters
68+
> - `make format` -- check formatting
69+
> - `make test` -- run tests
70+
> - `make security` -- run security scanners
71+
> - `make check` -- run everything
72+
>
73+
> Languages are declared in `.devrail.yml`. The Makefile reads this file to determine which tools to run. See https://devrail.dev/docs/standards/ for per-language tool details.
74+
75+
## Example Prompts
76+
77+
### Retrofitting an existing project
78+
79+
> I want to adopt DevRail standards in this project. Read https://devrail.dev/docs/getting-started/retrofit/ and follow the steps. This is a Ruby on Rails project, so set `languages: [ruby]` in `.devrail.yml`. After adding the DevRail files, run `make check` and fix any findings.
80+
81+
### Ongoing development
82+
83+
> Before you finish, run `make check` and fix any failures. Use conventional commit messages.
84+
85+
### Explaining what DevRail does
86+
87+
> Read https://devrail.dev/docs/standards/ and tell me which tools will run for my project based on the languages in `.devrail.yml`.
88+
89+
## What Agents See
90+
91+
When an agent reads the project's CLAUDE.md (or equivalent), it learns:
92+
93+
1. **DEVELOPMENT.md is the canonical reference.** It contains the full Makefile contract, per-language tooling, shell conventions, and logging standards.
94+
2. **Six critical rules must always be followed.** These are inlined so the agent cannot miss them.
95+
3. **`make check` is the single gate.** No task is complete until it passes.
96+
4. **Everything runs in Docker.** The agent should never try to install tools on the host.
97+
98+
## Verifying Agent Compliance
99+
100+
After an agent completes a task, check that it followed DevRail:
101+
102+
| Check | What to look for |
103+
|---|---|
104+
| Commit messages | Follow `type(scope): description` format |
105+
| `make check` | Agent ran it and it passes |
106+
| No host tool installs | Agent did not run `pip install`, `gem install`, `npm install -g`, etc. for linting/formatting tools |
107+
| `.editorconfig` respected | Indentation, line endings, and trailing whitespace match project rules |
108+
109+
If an agent consistently ignores standards, add the critical rules directly to its system prompt or context window rather than relying on file references.
110+
111+
## Which File Does My Agent Read?
112+
113+
| Agent | Instruction File |
114+
|---|---|
115+
| Claude Code | `CLAUDE.md` |
116+
| Cursor | `.cursorrules` |
117+
| OpenCode | `.opencode/agents.yaml` |
118+
| Other / generic | `AGENTS.md` |
119+
120+
All four files contain identical content in different formats. You only need the file(s) for the agent(s) you use, but shipping all four costs nothing and covers future tool changes.

0 commit comments

Comments
 (0)