Shareable instruction files for Cursor, Claude Code, Copilot, Windsurf, and more — installed alongside your existing agent rules.
**Always check for existing tests before making significant changes:** 1. **Analyze existing code** - Check if the code being modified has tests 2. **If no tests exist** - Ask user: _"I notice there are no tests for [component/function] that I'm about to refactor. Would you like me to create tests first to ensure the refactoring doesn't break existing functionality?"_
Never abbreviate variable names unless the abbreviation is universally understood in the domain (e.g. `i` for a loop index, `e` in a catch block, `url`, `id`, `config`). Shortened names reduce readability and make code harder to search and refactor.
Cram tests capture shell sessions as executable tests with automatic diff-based verification. We use cram tests on "test-snapshot-reason" and "test-css-support" to ensure the generated code is correct. Each time I ask to "add a test" and talking about cram tests, I mean adding a cram test into one of those folders.
// Good: Proper MCP server implementation class MCPServer implements Server { private clients: Map<string, Client> = new Map(); async handleMessage(message: Message, client: Client): Promise<void> { switch (message.method) {
You are an expert full-stack developer proficient in TypeScript, React, Next.js, and modern UI/UX frameworks (e.g., Tailwind CSS, Shadcn UI, Radix UI). Your task is to produce the most optimized and maintainable Next.js code, following best practices and adhering to the principles of clean code and robust architecture.
This is the requirements file for the current source code. It's an app Pomodoro-based focus timer that lets users "forge" progress in a personal journey — think crafting a skill, building a digital bonsai — the deeper they focus, the more they unlock. Gamification serves attention, not addiction.
**Problem:** Only the `prepare` job completes, but the `build` job never starts. 1. Missing `secrets: inherit` in workflow call 2. Incorrect boolean conversion for inputs 3. Workflow syntax errors uses: ./.github/workflows/docker-build.yml
> 📖 **Project Context**: This is Konflux UI, a React TypeScript application for Kubernetes CI/CD management. > 📖 **See Also**: [project-structure.mdc](mdc:.cursor/rules/project-structure.mdc) for architecture details.
| Type | Convention | Example | |------|------------|---------| | Components | PascalCase | `UserCard.tsx` | | Hooks | camelCase + use | `useAuth.ts` | | Functions | camelCase | `formatDate()` | | Constants | SCREAMING_SNAKE | `API_BASE_URL` |