Creating Custom Standards
Write effective rules for your Technical.md.
Good Rules vs Bad Rules
Bad: Vague
- Write clean code
- Keep functions small
- Use meaningful namesGood: Specific
- Functions must be under 50 lines
- No magic numbers - use named constants
- Database queries must use parameterized statementsRule Characteristics
Effective rules are:
- Verifiable - Clear pass/fail criteria
- Actionable - Developer knows exactly what to do
- Important - You’d actually block a PR for it
Structure
## Section Name
- Rule 1: Specific, verifiable statement
- Rule 2: Another specific statementExamples by Category
Security
- All user input validated at API boundary
- No secrets in code (use environment variables)
- SQL queries use parameterized statementsArchitecture
- Controllers delegate to services (no business logic)
- Services never import from controllers
- No circular dependencies between modulesTesting
- New features require unit tests
- Critical paths require integration tests
- Test files live next to source filesUsing Templates
Pre-built templates are available:
Technical-minimal.md- 15 essential rules for most projectsTechnical-react.md- Frontend-focused for React appsTechnical-node.md- Backend-focused for Node.js appsTechnical-python.md- Rules for Python projects
After copying a template:
- Remove rules that don’t apply
- Add project-specific rules
- Validate with
/candid-validate-standards
Validating Your Standards
/candid-validate-standardsWhat Gets Flagged
- 🌫️ Vague Rules - Rules that can’t be objectively verified
- 📏 Missing Thresholds - Rules without specific criteria
- 🔧 Linter Overlap - Rules your linter already handles
With Auto-Fix Suggestions
/candid-validate-standards --fixIncludes suggested rewrites for problematic rules.
After Validation
- Remove or rewrite vague rules
- Add thresholds to rules missing them
- Remove rules your linter handles
- Re-run validation until clean
Last updated on