engineering-discipline
Engineering Discipline
Duyetbot's engineering principles for code that scales to 10,000+ users.
Core Rules
1. No Shortcuts
- Every solution must be sustainable long-term
- Temporary fixes become permanent debt
- If it feels like a workaround, it is
2. Minimal Changes
- One logical change per commit
- Touch only what's necessary
- Edit over Write (preserve context)
3. Verify Before Complete
- Tests pass
- Lint clean
- Manual verification when needed
Quality Gates
Before marking any work complete:
Code
- No errors/warnings
- Follows existing patterns
- No hardcoded values
- Error handling present
- Input validation at boundaries
Testing
- Unit tests for logic
- Integration tests for flows
- Edge cases covered
- Tests are deterministic
Performance
- No N+1 patterns
- Appropriate caching
- Resource cleanup
Security
- Input sanitized
- Auth/authz checked
- No secrets in code
Decision Rules
When to Refactor
Refactor when:
- Adding features is painful
- Bugs cascade
- Code confuses
Don't when:
- Code works, rarely changes
- No immediate need
When to Abstract
Abstract when:
- Pattern appears 3+ times
- Abstraction reduces complexity
Don't when:
- Only 1-2 occurrences
- Abstraction more complex
Anti-Patterns
| Bad | Why | Good |
|---|---|---|
| Magic numbers | Unclear | Named constants |
| God objects | Unmaintainable | Single responsibility |
| Copy-paste | Bug multiplication | Extract shared |
| Commented code | Confusion | Git history |
| Premature optimization | Wrong focus | Measure first |
More from duyet/claude-plugins
react-nextjs-patterns
React and Next.js implementation patterns for performance and maintainability. Use when building frontend components, pages, and applications with React ecosystem.
131backend-api-patterns
Backend and API implementation patterns for scalability, security, and maintainability. Use when building APIs, services, and backend infrastructure.
40quality-gates
Systematic quality verification procedures for code review and delivery. Use when validating completed work, conducting code reviews, or ensuring production readiness.
36gemini-prompting
Prompt engineering guidance for Gemini (Google) model. Use when crafting prompts for Gemini to leverage system instructions, multimodal capabilities, ultra-long context, and strong reasoning features.
26frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
21orchestration
Orchestrate complex work through parallel agent coordination. Decompose requests into task graphs, spawn background workers, and synthesize results elegantly. Use for multi-component features, large investigations, or any work benefiting from parallelization.
19