Skip to content

Commit f1b70dc

Browse files
author
Matthew
committed
Merge branch 'docs/critical-rule-8-update-docs' into 'main'
docs(standards): sync dev-toolchain README with upstream See merge request orgdocs/development-standards!20
2 parents 06f99df + 5887554 commit f1b70dc

30 files changed

Lines changed: 113 additions & 22 deletions

File tree

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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Sections are wrapped in HTML comment markers (`<!-- devrail:section-name -->` /
1010

1111
## Critical Rules
1212

13-
These seven rules are non-negotiable. Every developer and every AI agent must follow them without exception.
13+
These eight rules are non-negotiable. Every developer and every AI agent must follow them without exception.
1414

1515
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.
1616

@@ -26,6 +26,8 @@ These seven rules are non-negotiable. Every developer and every AI agent must fo
2626

2727
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.
2828

29+
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.
30+
2931
<!-- /devrail:critical-rules -->
3032

3133
<!-- devrail:makefile-contract -->
@@ -570,7 +572,7 @@ All AI agents (Claude, Cursor, OpenCode, Windsurf, and others) operating on DevR
570572

571573
1. **Read this document first.** Agent shim files (CLAUDE.md, AGENTS.md, .cursorrules, .opencode/) point here. This is the canonical source.
572574

573-
2. **Follow the Critical Rules.** The six rules in the [Critical Rules](#critical-rules) section are inlined in every agent shim file. There is no excuse for missing them.
575+
2. **Follow the Critical Rules.** The eight rules in the [Critical Rules](#critical-rules) section are inlined in every agent shim file. There is no excuse for missing them.
574576

575577
3. **Run `make check` and fix all issues before declaring work complete.** Do not rely on CI to catch problems.
576578

dev-toolchain/.cursorrules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ Critical Rules:
2323
check fails, fix the underlying issue. Never comment out code, add
2424
suppression annotations, disable rules, or mark CI jobs as
2525
allowed-to-fail to bypass a failing check.
26+
8. Update documentation when changing behavior. When a change affects
27+
public interfaces, configuration, CLI usage, or setup steps, update
28+
the relevant documentation (README, DEVELOPMENT.md, inline docs) in
29+
the same commit or PR. Do not leave documentation out of sync with
30+
code.
2631

2732
Quick Reference:
2833

dev-toolchain/.opencode/agents.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ agents:
2828
check fails, fix the underlying issue. Never comment out code, add
2929
suppression annotations, disable rules, or mark CI jobs as
3030
allowed-to-fail to bypass a failing check.
31+
8. Update documentation when changing behavior. When a change affects
32+
public interfaces, configuration, CLI usage, or setup steps, update
33+
the relevant documentation (README, DEVELOPMENT.md, inline docs) in
34+
the same commit or PR. Do not leave documentation out of sync with
35+
code.
3136
3237
Quick Reference:
3338

dev-toolchain/AGENTS.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

dev-toolchain/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

dev-toolchain/DEVELOPMENT.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This project follows [DevRail](https://devrail.dev) development standards. For t
1010

1111
## Critical Rules
1212

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

1515
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.
1616

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

2525
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`.
2626

27+
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.
28+
29+
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.
30+
2731
<!-- /devrail:critical-rules -->
2832

2933
## Quick Start

dev-toolchain/README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> DevRail `v1` is stable. See [STABILITY.md](STABILITY.md) for component status.
44
5-
DevRail developer toolchain container image — a single Docker image containing all linters, formatters, security scanners, and test runners for Python, Bash, Terraform, Ansible, Ruby, Go, and JavaScript/TypeScript projects.
5+
DevRail developer toolchain container image — a single Docker image containing all linters, formatters, security scanners, and test runners for Python, Bash, Terraform, Ansible, Ruby, Go, JavaScript/TypeScript, and Rust projects.
66

77
[![Build](https://github.com/devrail-dev/dev-toolchain/actions/workflows/build.yml/badge.svg)](https://github.com/devrail-dev/dev-toolchain/actions/workflows/build.yml)
88
[![CI](https://github.com/devrail-dev/dev-toolchain/actions/workflows/ci.yml/badge.svg)](https://github.com/devrail-dev/dev-toolchain/actions/workflows/ci.yml)
@@ -30,14 +30,18 @@ Run `make help` to see all available targets:
3030

3131
```
3232
build Build the container image locally
33-
check Run all checks (lint, format, security, scan, test)
34-
format Run formatters for declared languages
33+
changelog Generate CHANGELOG.md from conventional commits
34+
check Run all checks (lint, format, test, security, scan, docs)
35+
docs Generate documentation
36+
fix Auto-fix formatting issues in-place
37+
format Run all formatters
3538
help Show this help
3639
init Scaffold config files for declared languages
37-
lint Run linters for declared languages
38-
scan Run universal scanning (trivy, gitleaks)
40+
install-hooks Install pre-commit hooks
41+
lint Run all linters
42+
scan Run universal scanners (trivy, gitleaks)
3943
security Run language-specific security scanners
40-
test Run project test suite
44+
test Run validation tests
4145
```
4246

4347
## Included Tools
@@ -51,6 +55,7 @@ test Run project test suite
5155
| Ruby | rubocop, reek, brakeman, bundler-audit, rspec, sorbet |
5256
| Go | golangci-lint, gofumpt, govulncheck, go test |
5357
| JavaScript/TS | eslint, prettier, typescript, vitest, npm audit |
58+
| Rust | clippy, rustfmt, cargo-audit, cargo-deny, cargo test |
5459
| Security | trivy, gitleaks |
5560

5661
## Configuration
@@ -66,12 +71,14 @@ languages:
6671
- ruby
6772
- go
6873
- javascript
74+
- rust
6975
```
7076
7177
## Architecture
7278
7379
- **Base image:** Debian bookworm-slim (multi-arch: amd64 + arm64)
7480
- **Go builder stage:** Compiles Go-based tools (tflint, terraform-docs, etc.)
81+
- **Rust builder stage:** Provides Rust toolchain and cargo-audit/cargo-deny via cargo-binstall
7582
- **Modular install scripts:** One script per language ecosystem
7683
- **Shared libraries:** `lib/log.sh` (logging) and `lib/platform.sh` (platform detection)
7784

devrail.dev/.cursorrules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ Critical Rules:
2323
check fails, fix the underlying issue. Never comment out code, add
2424
suppression annotations, disable rules, or mark CI jobs as
2525
allowed-to-fail to bypass a failing check.
26+
8. Update documentation when changing behavior. When a change affects
27+
public interfaces, configuration, CLI usage, or setup steps, update
28+
the relevant documentation (README, DEVELOPMENT.md, inline docs) in
29+
the same commit or PR. Do not leave documentation out of sync with
30+
code.
2631

2732
Quick Reference:
2833

devrail.dev/.opencode/agents.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ agents:
2828
check fails, fix the underlying issue. Never comment out code, add
2929
suppression annotations, disable rules, or mark CI jobs as
3030
allowed-to-fail to bypass a failing check.
31+
8. Update documentation when changing behavior. When a change affects
32+
public interfaces, configuration, CLI usage, or setup steps, update
33+
the relevant documentation (README, DEVELOPMENT.md, inline docs) in
34+
the same commit or PR. Do not leave documentation out of sync with
35+
code.
3136
3237
Quick Reference:
3338

0 commit comments

Comments
 (0)