Rules Hub
Coding Rules Library
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Describe roles, not volatile filenames/ports, in architecture docs
Keep architecture docs at the level of responsibilities; omit incidental filenames, ports, and soon-to-be-removed helpers.
Bad example
| 1 | A small Express server (`server.js`, port 3000) serves the built pages in production. Custom Vite plugins back dev serving and the `build:diff` ancestor-trace command. |
Explanation (EN)
The filename, port, and the `build:diff`/ancestor-trace helper are all incidental and some are slated for removal. Naming them makes the doc wrong as soon as the server is renamed or the helper is dropped.
Objašnjenje (HR)
Naziv datoteke, port i `build:diff`/ancestor-trace pomocni alat su svi sporedni, a neki su predvidjeni za uklanjanje. Njihovo imenovanje cini dokument netocnim cim se posluzitelj preimenuje ili pomocni alat ukloni.
Good example
| 1 | A small server serves the built pages in production. Custom Vite plugins build the SSR environment first, then the client, injecting each render output into its page. |
Explanation (EN)
Describing what the server and plugins do (not which file or port) survives renames and tooling churn. The reader still understands the architecture.
Objašnjenje (HR)
Opis onoga sto posluzitelj i pluginovi rade (a ne koja datoteka ili port) prezivljava preimenovanja i promjene alata. Citatelj i dalje razumije arhitekturu.
Exceptions / Tradeoffs (EN)
Include a concrete filename or port when the doc is a runbook/setup guide where that exact detail is the actionable information the reader needs.
Iznimke / Tradeoffi (HR)
Navedi konkretan naziv datoteke ili port kada je dokument runbook/vodic za postavljanje gdje je upravo taj detalj korisna informacija koju citatelj treba.