Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP2universalStack: Node / build tooling
toolinggitbuildscoping
Scope dev/build tooling to committed state, not work-in-progress
A diff/trace dev tool that also reads unstaged and staged changes mixes WIP with committed work and can mislead; compare against committed history only.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | const commands = [ |
| 2 | 'git diff --name-only master...HEAD', |
| 3 | 'git diff --name-only', // unstaged |
| 4 | 'git diff --name-only --cached', // staged |
| 5 | ]; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | const commands = ['git diff --name-only origin/master...HEAD']; // committed work only |
Explanation (EN)
Objašnjenje (HR)