AI Prompt for Rules & Instructions Files
Ready-to-paste JetBrains AI Assistant rules/instructions file tuned for Svelte app codebases owned by 50+ engineer scale-up. Enforces SQL migrations must be reversible.
More prompts for Rules & Instructions Files.
Port an existing Continue.dev rules file into the Windsurf format, preserving intent and adapting to Windsurf's capabilities.
Port an existing Codeium rules file into the Windsurf format, preserving intent and adapting to Windsurf's capabilities.
Ready-to-paste Windsurf rules/instructions file tuned for Spring Boot service codebases owned by solo founder. Enforces SQL migrations must be reversible.
Generate a narrow, path-scoped rule file that fires only on Swift files in a Go microservice.
Ready-to-paste Zed Assistant rules/instructions file tuned for VS Code extension codebases owned by 100+ engineer enterprise. Enforces never use default exports -- named only.
Ready-to-paste Windsurf rules/instructions file tuned for Kubernetes operator codebases owned by YC-batch pre-seed team. Enforces use composition over inheritance.
You are a senior principal engineer with extensive technical knowledge in developer tooling. You write clear, precise, and implementation-ready content.
You are generating a rules/instructions file for JetBrains AI Assistant to steer AI coding assistants on a Svelte app codebase.
**Tool:** JetBrains AI Assistant
**Project:** Svelte app
**Team context:** 50+ engineer scale-up
**Non-negotiable convention:** SQL migrations must be reversible
**Primary test framework:** Rust cargo test + insta
**Primary language:** Go
## Your task
Write one complete, ready-to-save rules file. Pick the correct filename for JetBrains AI Assistant:
- Cursor -> `.cursorrules` (root) or `.cursor/rules/<scope>.mdc` with YAML frontmatter (`description`, `globs`, `alwaysApply`)
- GitHub Copilot -> `.github/copilot-instructions.md`
- Claude Code -> `CLAUDE.md` at repo root (and optionally `~/.claude/CLAUDE.md` for user-level)
- Windsurf -> `.windsurfrules`
- Aider -> `CONVENTIONS.md` (loaded via `aider --read CONVENTIONS.md`)
- Zed -> `.rules`
- Continue.dev -> `.continue/config.yaml` `systemMessage` block
- OpenAI Codex / generic -> `AGENTS.md`
Output the final file content verbatim inside a single fenced code block, with the filename as the first line of a header comment. No commentary before or after.
## Required sections (every file must include all)
### 1. Project Overview
- One paragraph describing the Svelte app and its purpose
- Stack summary: language, framework, database, deploy target
- Critical entrypoints (e.g. `app/page.tsx`, `cmd/server/main.go`, `src/main.py`)
- Directory map for the top 6-10 folders with one-line purposes
### 2. Coding Standards (the rules)
- Hard rule: SQL migrations must be reversible
- 8-12 additional enforceable rules written as imperatives ("always", "never", "prefer")
- Each rule must be checkable without running code
- Bias toward negative rules ("never use `any`") over positive ones
### 3. Testing
- Test runner: Rust cargo test + insta
- File naming convention (`*.test.ts`, `*_test.go`, `test_*.py`)
- What requires tests (every new public function / every bug fix / every route)
- How to run the full suite and a single file
- Coverage floor if the team enforces one
### 4. Forbidden Patterns
- Concrete anti-patterns with a one-line example of the wrong code
- Framework-specific footguns for Svelte app
- At least 5 items
### 5. Preferred Libraries
- Canonical choice for: HTTP client, logger, validator, date handling, ORM/DB, UI primitives
- For each: one line on why, and the wrong choice it replaces
### 6. Commit & PR Hygiene
- Conventional commits format with examples
- Max diff size per commit
- What goes in the PR description
### 7. When You Are Unsure
- Instruction to ask before: schema migrations, dependency additions, API contract changes, anything touching auth/billing
- Instruction to prefer reading the existing code over inventing new patterns
## Style of the file itself
- ~80-150 lines total
- Markdown, hierarchical headings
- No filler, no apologies, no "as an AI..."
- Every rule must be specific enough that a reviewer could reject a PR citing it
- For Cursor `.mdc` scoped rules, include accurate frontmatter:
```
---
description: <one line>
globs: <comma-separated glob patterns>
alwaysApply: <true|false>
---
```
- Use precise technical terminology appropriate for the audience
- Include code examples, configurations, or specifications where relevant
- Document assumptions, prerequisites, and dependencies
- Provide error handling and edge case considerations
Provide a ready-to-use template with placeholder markers {{like_this}} that the user can fill in. Include instructions for each placeholder.