Skip to main content
Ganesh Joshi

AI Rules

Project rules you can copy into Cursor, Windsurf, Codeium, or any AI-assisted editor. One rule set per card.

conventions

Project conventions

Generic project conventions for AI: coding standards, naming, and structure. Use in Cursor, Windsurf, Codeium, or any AI-assisted editor.

scope

No unnecessary documentation or example files

Restrict the AI from creating docs, examples, or extra files unless the user explicitly asks. Use in Cursor, Windsurf, Codeium, or any AI-assisted editor.

scope

Small, focused changes

Make minimal, targeted edits; avoid refactoring or touching unrelated code unless the user asks. Use in any AI-assisted editor.

scope

Preserve existing behavior

Do not change behavior or add "improvements" unless explicitly requested; avoid altering semantics of existing code. Use in any AI-assisted editor.

security

No secrets in code

Never hardcode API keys, tokens, passwords, or credentials; use environment variables or secret managers. Use in any AI-assisted editor.

quality

Handle errors and edge cases

Consider empty state, loading, and error handling when implementing features; don't assume happy path only. Use in any AI-assisted editor.

dependencies

Minimal dependencies

Prefer existing packages; avoid adding dependencies unless necessary; pin versions and document why new deps are needed. Use in any AI-assisted editor.

safety

Confirm destructive actions

Ask before deleting files, dropping data, or making breaking changes; suggest backups or reversible steps. Use in any AI-assisted editor.

conventions

Match existing style

Preserve indentation, quotes, semicolons, and formatting of the file; don't reformat unrelated lines. Use in any AI-assisted editor.

conventions

Use existing patterns

Follow project APIs, patterns, and structure; don't invent new conventions or duplicate utilities that already exist. Use in any AI-assisted editor.

quality

Explicit types and names

Prefer clear names and explicit types; avoid `any` and ambiguous abbreviations; document non-obvious parameters. Use in any AI-assisted editor.

quality

Read before editing

Read the file or relevant section before making changes; don't assume structure, names, or content. Use in any AI-assisted editor.

scope

Ask when requirements are ambiguous

When the request is vague or has multiple interpretations, ask for clarification before implementing. Use in any AI-assisted editor.

quality

Test after changes

Run or suggest running relevant tests after code changes; don't break existing tests. Use in any AI-assisted editor.

conventions

One concern per commit

When suggesting git commits, group changes into one logical concern per commit; keep messages clear and scoped. Use in any AI-assisted editor.

AI Rules | GJ Dev Tools