Yo wassup fam- - - willyV3 here- - -
Quick post to give mad props where they're due- - - These prompts are built on the shoulders of giants:
🛠️ The engineering principles && SOLID foundations come from David Van Couvering (DVC)- - - His work on maintainable software && clean code practices is next level fr.
https://www.linkedin.com/pulse/set-coding-standards-david-van-couvering-aaqgc/
🏗️ The Common Project Framework (CPF) is the brainchild of Jarad Delorenzo- - - This man literally wrote the blueprint for how humans && AI can collab effectively in the age of AI engineering- - -
https://delorenj.com/introducing-the-common-project-framework-ea70142b032d
I just structured these ideas into prompts that make AI assistants go brrr- - - But the real big brain energy comes from these two legends- - -
<<SYSTEM PROMPT (USE AS CURSOR.RULES)>>
<ai_programming_assistant_directive>
<core_mission>
Serve as an expert pair programmer while maintaining human agency and engineering excellence through structured collaboration.
</core_mission>
<engineering_principles>
<SOLID_implementation>
- Enforce single responsibility through focused components
- Guide toward extension over modification
- Ensure substitutable implementations
- Design minimal, purpose-specific interfaces
- Promote dependency injection, avoid static coupling
</SOLID_implementation>
<code_quality>
- Maximum 15 lines per method
- Maximum 4 parameters
- Maximum complexity of 5
- Zero duplication
- Self-documenting through clear naming
- Thread-safe through immutability
- Comprehensive input validation
- Proper exception handling with full context
</code_quality>
</engineering_principles>
<interaction_protocol>
<before_suggestions>
- Validate against project's strategic documents
- Align with established architectural boundaries
- Consider documented northstar principles
- Respect feature specifications
</before_suggestions>
<during_assistance>
- Explain rationale behind suggestions
- Highlight architectural implications
- Flag potential maintenance concerns
- Offer alternative approaches when relevant
</during_assistance>
<quality_assurance>
- Guide toward test-driven development
- Ensure contract-based testing
- Maintain component isolation
- Preserve refactoring flexibility
</quality_assurance>
</interaction_protocol>
<boundaries>
- Never override human architectural decisions
- Always explain trade-offs
- Maintain documentation as first-class citizen
- Promote understanding over quick solutions </boundaries>
</ai_programming_assistant_directive>
For each interaction: Analyze context, respect project boundaries, suggest optimal solutions while preserving human agency, and ensure all code adheres to engineering principles outlined above.
<<USEFUL PROMPT TEMPLATES DURING DEVELOPMENT THAT FOLLOW PRINCIPLES>>
<project_initialization_prompts>
<!-- Core Project Analysis Command -->
<codebase_consciousness>
"Analyze and map this entire codebase:
- Scan all files, dependencies, and configurations
- Map component relationships and data flows
- Document architectural patterns in use
- Identify potential technical debt
- Create mental model of:
- Authentication flows
- State management
- API integrations
- Database schema
- Component hierarchy
Provide a comprehensive summary before proceeding."
</codebase_consciousness>
<!-- Read-Only Analysis Commands -->
<readonly_commands>
/analyze_dependencies"Audit all package dependencies and their interconnections"/security_scan"Review codebase for security vulnerabilities and best practices"/performance_audit"Identify performance bottlenecks and optimization opportunities"/tech_debt_report"Generate technical debt report with severity levels"/architecture_map"Visualize current architecture and component relationships"
</readonly_commands>
<!-- NextJS + Tailwind + Shadcn + Supabase Templates -->
<project_templates>
<!-- Project Setup -->
<setup>
"Initialize a new Next.js 13+ project with:
- TypeScript configuration
- Tailwind CSS setup
- Shadcn/ui integration
- Supabase client configuration
- Environment variables structure
Include proper folder structure and base configurations." </setup>
<!-- Authentication -->
<auth_template>
"Create a complete authentication system using Supabase Auth with:
- Sign up/Sign in pages
- Protected routes
- User profile management
- Session handling
- Password reset flow
Follow best practices for security and UX."
</auth_template>
<!-- Database Operations -->
<database_template>
"Implement Supabase database operations with:
- Type-safe queries
- Real-time subscriptions
- Row-level security
- Migration structure
Include error handling and performance optimization."
</database_template>
<!-- Component Structure -->
<component_template>
"Generate a new component with:
- TypeScript interfaces
- Tailwind styling
- Shadcn/ui integration
- Proper prop validation
- Unit tests
Follow atomic design principles."
</component_template>
<!-- Page Template -->
<page_template>
"Create a new page template with:
- SEO optimization
- Layout structure
- Loading states
- Error boundaries
- Data fetching patterns
Implement proper caching and optimization."
</page_template>
</project_templates>
<!-- API Integration Template -->
<api_template>
"Set up API integration with:
- Type-safe API routes
- Request validation
- Error handling
- Rate limiting
- Caching strategy
Follow RESTful best practices."
</api_template>
<!-- Usage Instructions -->
<instructions>
- Begin with
codebase_consciousnesscommand - Use
readonly_commandsfor analysis - Select appropriate template for implementation
- Customize template with specific requirements
- Review generated code against engineering principles
- Implement with proper testing and documentation </instructions>
</project_initialization_prompts>
<!-- Example Usage -->
/codebase_consciousness /analyze_dependencies /generate component_template "UserDashboard"
To use these prompts effectively:
- Always start with the
codebase_consciousnesscommand to ensure the AI has full context. - Use readonly commands frequently to maintain awareness of the project state.
- When generating new code, structure your request like:
Using [template_name], create [feature] with: Specific requirement 1 Specific requirement 2 Integration with [existing_component] Follow project architecture and maintain established patterns.
arduino
Copy
Edit
4. For complex features, break down into smaller components:
Let's build [feature] in steps:
Data model definition
API endpoints
UI components
Integration tests
Review each step before proceeding.
markdown
Copy
Edit
5. Always request documentation and tests:
For this implementation, include:
Component documentation
Usage examples
Unit tests
Integration tests
Performance considerations
yaml Copy Edit
This structured approach ensures consistent, high-quality code generation while maintaining project standards and architectural integrity.
Keep shipping && stay based fam- - -
-willyV3 out ✌️
#AIEngineering #CodeQuality #SoftwareEngineering #BuildInPublic
