Files
synthesis/.cursor/rules/agent-workflow.mdc
Денис Шкабатур c4993e9eee Update workflow: screenshots go to screenshots/ dir
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 12:50:25 +03:00

44 lines
1.6 KiB
Plaintext

---
description: Agent development workflow — TDD, commit discipline, visual feedback
alwaysApply: true
---
# Agent Workflow
## Development Order (STRICT)
For every task, follow this sequence:
1. **Tests first** — write failing tests that define expected behavior
2. **Data structures** — define types, interfaces, JSON schemas
3. **Implementation** — write code to make tests pass
4. **Verify** — `npm run test:run` for logic, Playwright screenshot for visuals
5. **Commit** — `git add -A && git commit` after each successful step
6. **Push** — `git push` after every commit (never accumulate unpushed commits)
## Commit & Push Discipline
- Commit after EVERY successful step (tests green or visual verified)
- Push immediately after every commit — code must always be on remote
- Small, focused commits — one concern per commit
- Never accumulate uncommitted or unpushed work across multiple tasks
- Commit message format: concise "what + why" in English
## Visual Verification
After ANY visual change:
1. Ensure dev server is running (`npm run dev`)
2. Navigate to `http://localhost:5173`
3. Take screenshot to `screenshots/` folder (gitignored)
4. Check browser console for errors
5. Fix issues before committing
## After Completing a Task
1. Verify it works (test or screenshot)
2. Commit immediately
3. Push immediately (`git push`)
4. Update `PROGRESS.md` — mark task complete
5. Check `IMPLEMENTATION-PLAN.md` for what's next
## Code Standards
- TypeScript strict mode — no `any`, no unsafe `as` casts
- Pure functions for ECS systems
- Descriptive variable names (not `x`, `tmp`, `data`)
- Comments explain WHY, not WHAT