Split work by TOPIC, not by file.
Each topic requires:
- One dedicated branch
- Multiple atomic commits
- Exactly one Pull Request
Direct commits to main are FORBIDDEN.
<category>/<topic-description>
Examples:
rules/python-priority- Python-first implementation rulesworkflow/atomic-commits- Commit discipline workflowtooling/dev-experience- Developer experience improvementssecurity/input-validation- Security validation layerrefactor/preview-model- Preview model enhancement
- rules/ - Project rules and conventions
- workflow/ - Development workflow improvements
- tooling/ - Development tools and automation
- security/ - Security enhancements
- refactor/ - Code refactoring
- feature/ - New features
- bugfix/ - Bug fixes
- docs/ - Documentation updates
One branch = one concern
One concern = one PR
Do NOT combine:
- ❌ Multiple unrelated features
- ❌ Refactoring + new features
- ❌ Bug fixes + enhancements
- ❌ Multiple domains/modules
DO keep focused:
- ✅ Single responsibility
- ✅ Clear scope
- ✅ Related changes only
- ✅ Logical grouping
Each commit MUST represent:
- One change
- One responsibility
- One logical unit
- ✅ One function change
- ✅ One guard addition
- ✅ One validation
- ✅ One refactor step
- ✅ One bug fix
- ❌ Multiple functions
- ❌ Refactor + behavior change
- ❌ Cleanup + feature
- ❌ "misc", "minor fixes", "cleanup" messages
- ❌ Batch changes
- ❌ Squashed logic
CHANGE → COMMIT → CHANGE → COMMIT
No batching. No squashing. No postponing commits.
<type>: <short description>
<optional detailed explanation>
<optional technical details>
<optional breaking changes>
feat:- New featurefix:- Bug fixrefactor:- Code refactoring (no behavior change)security:- Security improvementperf:- Performance improvementdocs:- Documentation onlytest:- Adding or updating testsbuild:- Build system or dependenciesci:- CI/CD configurationstyle:- Code style (formatting, naming)chore:- Maintenance tasks
Good:
refactor: extract language decision into isolated helper
Move language selection logic to dedicated function
for better testability and maintenance.
security: add input validation for video IDs
Validate video ID format before processing
to prevent injection attacks.
feat: add Gaussian variance to confidence calculation
Replace linear random variance with Gaussian distribution
to produce more realistic confidence scores.
Bad:
misc: various improvements
update files
cleanup
Python is the primary language for:
- Logic implementation
- Tooling and automation
- Glue code
- Validation layers
- Backend services
You may ONLY use another language if:
- Python is technically insufficient
- Performance constraints are proven
- System-level bindings are unavoidable
- Frontend UI requirements (TypeScript/React)
If choosing non-Python for backend logic, you MUST document:
- Why Python cannot solve the problem
- What specific limitation prevents Python usage
- Performance benchmarks if applicable
- Technical constraints that block Python
- Prefer clarity over cleverness
- Optimize for reviewers, not authors
- Optimize for future maintainers
- Assume 6-12 months forward maintenance
- Rename files, folders, symbols
- Reorganize structure
- Add missing layers:
- Configuration separation
- Validation
- Logging
- Error handling
- Tooling and standards
Core functional purpose must NOT change without explicit requirement.
Each PR MUST include:
-
Clear scope definition
- What is being changed
- Why it's being changed
-
Rationale
- Why the change is necessary
- What was missing or flawed
-
Non-changes
- What is intentionally NOT changed
- What is out of scope
-
Safety assurance
- How isolation is maintained
- How backward compatibility is preserved
- Testing strategy
-
Review guidance
- Key files to review
- Areas needing careful attention
- Known tradeoffs
Every detected issue MUST be classified as one of:
- Architecture violation - Breaks architectural principles
- Responsibility leakage - Concerns mixing across boundaries
- Maintainability risk - Hard to understand or change
- Scalability risk - Won't scale with growth
- Safety/robustness gap - Missing error handling or validation
- Developer experience deficiency - Poor tooling or workflow
- Tooling/standards omission - Missing industry-standard components
Unclassified issues must NOT be fixed.
- ✅ All commits are atomic
- ✅ Commit messages follow format
- ✅ Branch naming is correct
- ✅ PR description is complete
- ✅ Tests pass locally
- ✅ No direct commits to main
- Review each commit independently
- Verify commit messages make sense
- Check for mixed concerns
- Validate Python-first approach
- Confirm issue classification
- Address feedback commit-by-commit
- No squash until approval
- Rebase if requested
- Merge only when approved
You will NEVER:
- ❌ Run the code in production
- ❌ Execute tests in production
- ❌ Assume runtime behavior
All changes must be:
- ✅ Reasoned about logically
- ✅ Defensive in nature
- ✅ Statistically low-risk
- ✅ Independently reviewable
If safety cannot be reasoned about, the change must be split further.
Before editing ANY file, you MUST:
- Read every file in scope fully
- Understand responsibility boundaries
- Identify data flow and coupling
- Infer original author intent
- Detect missing industry-standard components
No edits before comprehension.
No assumptions without evidence.
Act as if:
- The upstream author will read every line
- Your name is on the PR
- Quality matters more than speed
If finished correctly, the maintainer should think:
"This person didn't just use my project — they respected it."
You may add subtle attribution (e.g. @Rtur2003) ONLY in:
- Tooling
- Helpers
- Non-business logic
- Debug or guard comments
Never:
- ❌ Intrusive
- ❌ Branding
- ❌ Ego-driven