Skip to content

Commit a426218

Browse files
docs(standards): add critical rule 8 — update documentation when changing behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7f9abac commit a426218

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ See DEVELOPMENT.md for the complete reference.
1212
5. **Write idempotent scripts.** Every script must be safe to re-run. Check before acting: `command -v tool || install_tool`, `mkdir -p`, guard file writes with existence checks.
1313
6. **Use the shared logging library.** No raw `echo` for status messages. Use `log_info`, `log_warn`, `log_error`, `log_debug`, and `die` from `lib/log.sh`.
1414
7. **Never suppress failing checks.** When a lint, format, security, or test check fails, fix the underlying issue. Never comment out code, add suppression annotations, disable rules, or mark CI jobs as allowed-to-fail to bypass a failing check.
15+
8. **Update documentation when changing behavior.** When a change affects public interfaces, configuration, CLI usage, or setup steps, update the relevant documentation (README, DEVELOPMENT.md, inline docs) in the same commit or PR. Do not leave documentation out of sync with code.
1516

1617
## Quick Reference
1718

DEVELOPMENT.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This document is the single canonical source of truth for all DevRail developmen
88

99
## Critical Rules
1010

11-
These six rules are non-negotiable. Every developer and every AI agent must follow them without exception.
11+
These eight rules are non-negotiable. Every developer and every AI agent must follow them without exception.
1212

1313
1. **Run `make check` before completing any story or task.** Never mark work done without passing checks. This is the single gate for all linting, formatting, security, and test validation.
1414

@@ -22,6 +22,10 @@ These six rules are non-negotiable. Every developer and every AI agent must foll
2222

2323
6. **Use the shared logging library.** No raw `echo` for status messages. Use `log_info`, `log_warn`, `log_error`, `log_debug`, and `die` from `lib/log.sh`.
2424

25+
7. **Never suppress failing checks.** When a lint, format, security, or test check fails, fix the underlying issue. Never comment out code, add suppression annotations (`# noqa`, `# nosec`, `#tfsec:ignore`, `// nolint`), disable rules, or mark CI jobs as allowed-to-fail to bypass a failing check. If a finding is a confirmed false positive, document the justification inline alongside the tool's designated suppression mechanism.
26+
27+
8. **Update documentation when changing behavior.** When a change affects public interfaces, configuration, CLI usage, or setup steps, update the relevant documentation (README, DEVELOPMENT.md, inline docs) in the same commit or PR. Do not leave documentation out of sync with code.
28+
2529
<!-- /devrail:critical-rules -->
2630

2731
<!-- devrail:makefile-contract -->

content/blog/2026-03-02-introducing-devrail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Universal tools -- trivy, gitleaks, and git-cliff -- run for every project regar
6464

6565
## Agent-Ready by Default
6666

67-
DevRail was built with AI coding agents in mind. The template repositories ship with instruction files for Claude Code (`CLAUDE.md`), Cursor (`.cursorrules`), OpenCode (`.opencode/agents.yaml`), and a generic `AGENTS.md`. Each file inlines six critical rules so agents follow the standard even if they don't read cross-file references.
67+
DevRail was built with AI coding agents in mind. The template repositories ship with instruction files for Claude Code (`CLAUDE.md`), Cursor (`.cursorrules`), OpenCode (`.opencode/agents.yaml`), and a generic `AGENTS.md`. Each file inlines eight critical rules so agents follow the standard even if they don't read cross-file references.
6868

6969
The shortest path to agent compliance:
7070

content/docs/getting-started/agents.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ CLAUDE.md / AGENTS.md / .cursorrules / .opencode/agents.yaml
2424
2525
├── Points to DEVELOPMENT.md (full standards reference)
2626
27-
└── Inlines 6 critical rules (minimum viable compliance)
27+
└── Inlines 8 critical rules (minimum viable compliance)
2828
```
2929

3030
**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.
3131

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.
32+
**Agents that ignore cross-file references** still get the eight critical rules inlined directly in their instruction file. This ensures minimum compliance regardless of agent capability.
3333

3434
## Setting Up a Project for Agent Use
3535

@@ -94,7 +94,7 @@ If you do not want to commit DevRail files yet, you can paste instructions direc
9494
When an agent reads the project's CLAUDE.md (or equivalent), it learns:
9595

9696
1. **DEVELOPMENT.md is the canonical reference.** It contains the full Makefile contract, per-language tooling, shell conventions, and logging standards.
97-
2. **Six critical rules must always be followed.** These are inlined so the agent cannot miss them.
97+
2. **Eight critical rules must always be followed.** These are inlined so the agent cannot miss them.
9898
3. **`make check` is the single gate.** No task is complete until it passes.
9999
4. **Everything runs in Docker.** The agent should never try to install tools on the host.
100100

0 commit comments

Comments
 (0)