Fix the cause, not the symptomOprav příčinu, ne příznak
A null check that stops a crash is a silenced alarm. Trace the causal chain up the stack to where the wrong state was created and fix it there. A guard is allowed only when null is a legitimate state, and then it is documented as one.Null check, který zastaví pád, je umlčený alarm. Stopuj kauzální řetězec nahoru po stacku až tam, kde špatný stav vznikl, a oprav ho tam. Guard je dovolený, jen když je null legitimní stav, a pak je tak i zdokumentovaný.
Enforced byVynucujeReview checklist; agents' standing instructionsReview checklist; stálé instrukce agentů
Data crosses a boundary as a typePřes hranici jdou data jako typ
An array with a fixed set of keys that leaves a method becomes a readonly DTO. If you need @param array{…} to describe it, you are writing the type system by hand. Arrays live at the edges: JSON, HTTP, queues.Pole s pevnou sadou klíčů, které opustí metodu, se stává readonly DTO. Když ho musíš popsat přes @param array{…}, píšeš typový systém ručně. Pole patří na hranice: JSON, HTTP, fronty.
Enforced byVynucujeStatic analysis at max level; reviewStatická analýza na max úrovni; review
An exception never disappearsVýjimka nikdy nezmizí
An empty catch hides the bug from you and from monitoring, and the bug stays. Expected failures are logged with the context needed to act. Unexpected ones propagate.Prázdný catch schová bug před tebou i před monitoringem a bug zůstane. Očekávaná selhání se logují s kontextem, ze kterého jde jednat. Neočekávaná propadají dál.
Enforced byVynucujeSentry on every service; review rejects empty catchSentry na každé službě; review prázdný catch zamítne
Production is read-only for automationProdukce je pro automatizaci jen ke čtení
Migrations are prepared, tested on a copy and handed over with impact and rollback described. A human runs them. No exception for "just one row".Migrace se připraví, otestují na kopii a předají s popsaným dopadem a rollbackem. Spouští je člověk. Žádná výjimka pro „jen jeden řádek".
Enforced byVynucujePre-tool hook, independent of permission modeHook před nástrojem, nezávislý na režimu oprávnění5
Read the code, do not guess from grepČti kód, nehádej z grepu
Search says where. Only the function, its callers and the data flow say why. A change based purely on a pattern match is how the symptom gets patched by accident.Vyhledávání říká kde. Jen funkce, její volající a datový tok říkají proč. Změna založená čistě na shodě vzoru je způsob, jak omylem záplatovat příznak.
Enforced byVynucujeAgents' standing instructions; project notes on where logic livesStálé instrukce agentů; projektové poznámky, kde co je
The API has a contract; the dashboard is tested against itAPI má kontrakt a dashboard se proti němu testuje
Five dashboard pages once failed on a field the ORM had renamed, and with zero customers nobody noticed. Never return a database row from an endpoint; the contract is snake_case and ISO dates, and anything an agent can do through the API a human can do in the UI.Pět stránek dashboardu kdysi padalo na poli, které ORM přejmenoval, a s nulou zákazníků si toho nikdo nevšiml. Z endpointu se nikdy nevrací řádek z databáze; kontrakt je snake_case a ISO data a co umí agent přes API, umí člověk v UI.
Enforced byVynucujeContract tests; parity rule written into the routesKontraktní testy; pravidlo parity zapsané v routách11
Say no with a numberŘíkej ne s číslem
A dedicated SMS sender per customer was declined at thirty dollars a month against twenty cents for an e-mail domain. A self-hosted edition was dropped when it doubled every release for zero demand. Good decisions close; they do not linger as options.Vlastní SMS číslo pro každého zákazníka bylo zamítnuté při třiceti dolarech měsíčně proti dvaceti centům za e-mailovou doménu. Self-host verze byla zrušena, když zdvojnásobila každý release při nulové poptávce. Dobrá rozhodnutí se uzavírají; nezůstávají viset jako možnosti.
Enforced byVynucujeWritten decision notes with the reason, so they are not reopenedPísemné poznámky k rozhodnutí s důvodem, aby se neotvírala znovu7