rail-review
Skill5 starsChanged 4 months agoMITView on GitHub
Two-axis review of the diff since a fixed point — Standards and Spec. Use when reviewing a branch, PR, or WIP changes — not as part of rail-build.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- rail-alignSkill
- rail-buildSkill
- rail-debugSkill
- rail-grillSkill
- rail-passSkill
- rail-setupSkill
- railSkill
- rail-sliceSkill
- rail-specSkill
- rail-tddSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Ask the user where the spec is
- Distinctive: line 30
If none, Spec axis reports "no spec available"
- Very specific: line 32
Check each candidate path on disk with the shell (ls, or read it) before falling through to the next — search tools skip gitignored paths, …
- Distinctive: line 34
Never fetch GitHub/GitLab issues for spec source — local files only.
- Distinctive: line 63
If the spec is missing, skip the Spec sub-agent and note that in the final report.
- Very specific: line 75
Do not commit or push as part of review.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rail Review
Review git diff <fixed-point>...HEAD on two axes in parallel sub-agents:
- Standards — repo coding standards + Fowler smell baseline (repo docs win on conflict)
- Spec — faithfulness to the originating
docs/monorail/**/spec.mdand/or task file
Process
1. Pin the fixed point
Whatever the user said is the fixed point — commit SHA, branch, tag, main, HEAD~5, etc. If missing, ask.
Capture: git diff <fixed-point>...HEAD and git log <fixed-point>..HEAD --oneline.
Confirm git rev-parse <fixed-point> and a non-empty diff before continuing.
2. Identify the spec source
Order:
- Path the user passed as an argument
docs/monorail/<feature>/spec.mdplus the task file being built- Ask the user where the spec is
- If none, Spec axis reports "no spec available"
Check each candidate path on disk with the shell (ls, or read it) before falling through to the next — search tools skip gitignored paths, so an empty Glob/Grep result is not evidence the spec is absent.
Never fetch GitHub/GitLab issues for spec source — local files only.
3. Identify the standards sources
Anything documenting how code should be written (CODING_STANDARDS.md, CONTRIBUTING.md, etc.).
On top of repo docs, Standards always carries a smell baseline (Fowler, Refactoring ch.3). Rules:
- The repo overrides. Documented repo standard wins.
- Always a judgement call for baseline smells — labelled heuristics, not hard violations. Skip anything tooling already enforces.
Smell list (what → fix): Mysterious Name → rename; Duplicated Code → extract; Feature Envy → move method; Data Clumps → bundle type; Primitive Obsession → domain type; Repeated Switches → polymorphism/map; Shotgun Surgery → gather change; Divergent Change → split module; Speculative Generality → delete; Message Chains → hide walk; Middle Man → cut; Refused Bequest → composition.
4. Spawn both sub-agents in parallel
Send a single message with two Agent/Task tool calls. Use the general-purpose (or equivalent) subagent for both. If the harness cannot spawn parallel sub-agents, run Standards then Spec sequentially — do not skip an axis.
Standards sub-agent prompt — include:
- The full diff command and commit list
- The list of standards-source files from step 3, plus the smell baseline pasted in full (the sub-agent has no other access to it)
- Brief: report per file/hunk (a) documented-standard violations with cite; (b) baseline smells named + hunk quoted. Distinguish hard violations from judgement calls. Skip tooling-enforced items. Under 400 words.
Spec sub-agent prompt — include:
- The diff command and commit list
- Path or contents of the spec/task
- Brief: (a) missing/partial requirements; (b) scope creep; (c) wrong implementations. Quote spec lines. Under 400 words.
If the spec is missing, skip the Spec sub-agent and note that in the final report.
5. Aggregate
Present under ## Standards and ## Spec separately. Do not merge or rerank across axes. End with one-line counts per axis, and label any blocking findings clearly.
Blocking vs non-blocking:
- Blocking (Spec): missing/partial acceptance behaviour the task or
spec.mdrequired; clearly wrong implementation of a quoted requirement - Blocking (Standards): hard violation of a documented repo standard (cite file + rule)
- Non-blocking: Fowler smell-baseline heuristics; style nits tooling already covers; speculative scope the task did not ask for (still report under Spec as scope creep, but not blocking unless it contradicts the task)
Do not commit or push as part of review. Do not set task Status: done.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

