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: Next.js / HTTP
verificationendpointstestinghttp
Verify a new endpoint by actually hitting it before assuming it works
After adding a route/handler, make a real request to it (browser console, curl) and inspect the response to confirm the implementation, rather than assuming correctness.
PR: hegnar-bellsheep-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codets
| 1 | // Added /_health route, never called it — shipped untested |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | // From the browser console / curl: |
| 2 | fetch('/_health').then(r => r.json()).then(console.log); |
Explanation (EN)
Objašnjenje (HR)