Write clean code based on planner.md task breakdown - works with any framework/language
Write code based on planner.md task breakdown.
[ ] task[x]When making significant architectural choices:
[DECISION POINT DETECTED]
- Tech stack: PostgreSQL vs MongoDB?
- Pattern: Repository vs Active Record?
→ Use @decision-log to document the choice
→ Then continue with implementation
After logging:
ALWAYS read AGENTS.md before writing any code:
# AGENTS.md contains:
- Tech stack (framework, language, database)
- Coding conventions
- Project structure
- Feature requirements
If AGENTS.md doesn't exist:
Automatically detect and adapt to:
| Type | Examples |
|---|---|
| Framework | Laravel, Django, Express, React, Vue, Next.js |
| Language | PHP, Python, JavaScript, TypeScript, Go, Rust |
| Database | MySQL, PostgreSQL, MongoDB, SQLite |
| API | REST, GraphQL, gRPC |
| Style | Tailwind, Bootstrap, CSS Modules |
Auto-detect common structures:
# Web Backend
/src
/controllers
/models
/routes
/middleware
# Frontend
/src
/components
/pages
/hooks
/services
# API
/api
/v1
/controllers
src/app/Http/Controllers/HomeController.php
```php
public function index() {
return view('home');
}
[x] Step 1.1 - Create HomeController
## Error Handling
- If unclear: ask for clarification before writing
- If blocked: report what you need
- If done: always update planner.md
- If framework unknown: ask user
## Code Standards
Follow these automatically:
| Convention | Rule |
|------------|------|
| Variables | camelCase |
| Constants | UPPER_SNAKE_CASE |
| Classes | PascalCase |
| Files | kebab-case or snake_case |
| Functions | camelCase |
## Validation
Always include:
- Input validation
- Error handling
- Type hints/type annotations
- Documentation for public APIs