Merged in feature/ai-instructions (pull request #3293)

chore: add ai instruction files

* chore: add ai instruction files

* let the instruction file apply to all files, not only ts files


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-12-08 12:23:22 +00:00
parent 5236b1dc71
commit 177c2e7176
2 changed files with 61 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
---
applyTo: "apps/redis-api/**/*.ts"
---
# ⚙️ Redis API Specific Instructions
**CONTEXT:** This is a dedicated, Bun HTTP API, deployed as a container app in Azure. It acts as an HTTP proxy/cache layer for a Redis instance.
**INSTRUCTIONS FOR GENERATION:**
1. **Framework:** This code uses **Elysia**. **DO NOT** generate React, Next.js, or browser-side code.
2. **Language:** Always use pure **TypeScript**. Do not use `.tsx` files.
3. **Data Models:** Always use **t** from **Elysia** i.e. `import { t } from "elysia";` for schema definition and runtime validation of incoming request bodies and query parameters.
4. **Security:** Ensure all generated endpoints follow RESTful conventions and include necessary request validation and authorization checks.
5. **Redis:** Code must use the official `ioredis` library for interaction.
6. **Logging:** Use **loggerModule** or **baseLogger** for all informational, warning, and error messages.