Starter .roam-rules.yml packs tuned for the most common AI-generated-code
anti-patterns. Each pack is opinionated but conservative — every rule has a
description so the PR comment surfaces why it fired.
| Path | Language(s) | Rules | Severities |
|---|---|---|---|
python/.roam-rules.yml |
Python | 14 | 7 BLOCK, 7 WARN |
typescript/.roam-rules.yml |
TS / JS / JSX / Vue | 14 | 5 BLOCK, 9 WARN |
go/.roam-rules.yml |
Go | 12 | 3 BLOCK, 9 WARN |
java/.roam-rules.yml |
Java | 12 | 5 BLOCK, 7 WARN |
kotlin/.roam-rules.yml |
Kotlin (Android + Spring) | 12 | 4 BLOCK, 8 WARN |
rust/.roam-rules.yml |
Rust | 12 | 3 BLOCK, 9 WARN |
Drop a pack at .roam/rules.yml in your repo root:
cp templates/rules/python/.roam-rules.yml .roam/rules.yml
roam rules-validate .roam/rules.yml --explainThen roam pr-analyze auto-loads it on every PR. Pair with --gate in CI
to fail builds on BLOCK-severity violations.
The packs are intentionally generic — fork them and tune to your codebase:
- Tighten
source_globto your real layout (e.g.apps/api/**/*.pynotsrc/**/*.py) - Demote BLOCK → WARN for rules you want as advisory
- Add custom
forbidden_target_globpatterns for your internal banned APIs
After editing, validate before committing:
roam rules-validate .roam/rules.yml --strict --gateimport_from— Pythonfrom X import/import X, JS/TSimport ... from "X"function_call— any callname(orns.name((e.g.eval,pickle.loads)class_inherit— base classes inclass Foo(Base, ...)declarationsdecorator_use— decorator lines@nameor@ns.name
Run roam rules-validate --explain for examples + glob syntax.