From ac874844f03548a1f9a49674ca5d6364319ae625 Mon Sep 17 00:00:00 2001 From: oliviacraft Date: Sun, 31 May 2026 03:55:12 -0400 Subject: [PATCH 1/5] Add rules/react-nextjs-production/.cursorrules --- rules/react-nextjs-production/.cursorrules | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 rules/react-nextjs-production/.cursorrules diff --git a/rules/react-nextjs-production/.cursorrules b/rules/react-nextjs-production/.cursorrules new file mode 100644 index 00000000..35840c48 --- /dev/null +++ b/rules/react-nextjs-production/.cursorrules @@ -0,0 +1,9 @@ +.cursorrules — React + Next.js App Router + +- Default to Server Components. Add "use client" only for hooks/browser APIs/event handlers. +- Fetch data in Server Components. Never fetch in useEffect. +- Use server actions for mutations, not client-side API route calls. +- One component per file. File name = component name (PascalCase). +- Define explicit interface Props. Never use any as prop type. +- Every async route needs a sibling loading.tsx and error.tsx. +- Use next/image instead of img. Use next/font instead of Google Fonts link tags. From f1cf9d28ca090d96dbaa0fd360f1a9ec79167ccb Mon Sep 17 00:00:00 2001 From: oliviacraft Date: Sun, 31 May 2026 03:55:13 -0400 Subject: [PATCH 2/5] Add rules/typescript-strict-production/.cursorrules --- rules/typescript-strict-production/.cursorrules | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 rules/typescript-strict-production/.cursorrules diff --git a/rules/typescript-strict-production/.cursorrules b/rules/typescript-strict-production/.cursorrules new file mode 100644 index 00000000..543df2fd --- /dev/null +++ b/rules/typescript-strict-production/.cursorrules @@ -0,0 +1,9 @@ +.cursorrules — TypeScript Strict Mode + +- tsconfig.json must have "strict": true. Never disable strict checks. +- No any. Use unknown + type guards, or as Type only at I/O boundaries. +- Every exported function needs explicit return type including async (Promise). +- Model state as discriminated unions: { status: "loading" } | { status: "success"; data: T }. +- Readonly for immutable data. as const for config objects. +- Validate env vars at startup. Never process.env.FOO in business logic. +- No TypeScript enum. Use const object + typeof union. From 52cdadd899b0d423a13fe82dc1147ebc88a9465a Mon Sep 17 00:00:00 2001 From: oliviacraft Date: Sun, 31 May 2026 03:55:14 -0400 Subject: [PATCH 3/5] Add rules/python-fastapi-production/.cursorrules --- rules/python-fastapi-production/.cursorrules | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 rules/python-fastapi-production/.cursorrules diff --git a/rules/python-fastapi-production/.cursorrules b/rules/python-fastapi-production/.cursorrules new file mode 100644 index 00000000..dc36b3da --- /dev/null +++ b/rules/python-fastapi-production/.cursorrules @@ -0,0 +1,9 @@ +.cursorrules — Python Production + +- Every function signature must include type hints. +- Never bare except: — catch specific exceptions or re-raise. +- Pydantic BaseModel for API boundary data. @dataclass for internal structures. +- Pass dependencies as parameters. No global variables in business logic. +- Always pathlib.Path. / operator for path joining. +- Never time.sleep() in async. Use asyncio.sleep(). +- Validate env vars at startup. No os.environ.get() silent defaults. From ae4cd0094d285637643c3bac13dd81ee8554e770 Mon Sep 17 00:00:00 2001 From: oliviacraft Date: Sun, 31 May 2026 03:55:16 -0400 Subject: [PATCH 4/5] Add rules/go-production/.cursorrules --- rules/go-production/.cursorrules | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 rules/go-production/.cursorrules diff --git a/rules/go-production/.cursorrules b/rules/go-production/.cursorrules new file mode 100644 index 00000000..c2427ef4 --- /dev/null +++ b/rules/go-production/.cursorrules @@ -0,0 +1,9 @@ +.cursorrules — Go Production + +- Never ignore returned error with _. Handle or return every error. +- Wrap with context: fmt.Errorf("functionName: %w", err). +- Define interfaces at the consumer package. Keep interfaces to 1-2 methods. +- ctx context.Context as first parameter in every I/O function. +- Every goroutine has a clear owner and shutdown path. Use errgroup. +- Always name struct fields. No positional initialization. +- Table-driven tests with t.Run(tt.name, ...). From 8d8fef018d4337e8b20d6736a1acb5db149a1154 Mon Sep 17 00:00:00 2001 From: oliviacraft Date: Wed, 3 Jun 2026 12:12:46 -0400 Subject: [PATCH 5/5] fix: update Python title to Python FastAPI Production --- rules/python-fastapi-production/.cursorrules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/python-fastapi-production/.cursorrules b/rules/python-fastapi-production/.cursorrules index dc36b3da..6a5f543f 100644 --- a/rules/python-fastapi-production/.cursorrules +++ b/rules/python-fastapi-production/.cursorrules @@ -1,4 +1,4 @@ -.cursorrules — Python Production +.cursorrules — Python FastAPI Production - Every function signature must include type hints. - Never bare except: — catch specific exceptions or re-raise. @@ -6,4 +6,4 @@ - Pass dependencies as parameters. No global variables in business logic. - Always pathlib.Path. / operator for path joining. - Never time.sleep() in async. Use asyncio.sleep(). -- Validate env vars at startup. No os.environ.get() silent defaults. +- Validate env vars at startup. No os.environ.get() silent defaults. \ No newline at end of file