Repository rules | DevPrompt Lab
Practical repository instructions for security, testing, architecture, and coding tools.
Practical repository instructions for security, testing, architecture, and coding tools.
Published rules
API error contract rule
Keep error responses actionable, stable, and free of sensitive internals.
Authorization and owner-scope rule
Enforce access in server-side queries and tests for every private resource.
Database owner-scope pattern
Encode ownership checks and deletion behavior in queries and relational constraints.
Deterministic test fixture rule
Make test data explicit, isolated, and independent of production state.
Localized SEO route rule
Use explicit locale routes and translation relationships for canonical and hreflang output.
PHP controller boundary rule
Keep HTTP concerns thin and put reusable rules in testable domain code.
Privacy-safe logging rule
Log enough to diagnose failures without recording credentials or private content.
React component boundary rule
Separate rendering, data access, and reusable domain behavior at clear boundaries.
Safe command execution rule
Inspect targets and explain destructive effects before running commands that remove or overwrite data.
Schema evolution compatibility rule
Use expand, backfill, verify, switch, and contract stages for live data changes.
Write a focused Cursor project rule
Create a scoped .mdc rule with clear file patterns and actionable project conventions.
Write durable Claude Code project memory
Record stable project facts and useful commands without turning memory into a task log.
Write effective Codex AGENTS.md instructions
Use scoped AGENTS.md files to explain repository boundaries and verified workflows.
Write useful Copilot repository instructions
Keep `.github/copilot-instructions.md` concise, accurate, and specific to the codebase.