learning_ai_common_plat/.cursorrules
2026-03-05 14:37:31 -08:00

33 lines
1.5 KiB
Plaintext

# @bytelyst Common Platform — Cursor Rules
# Read AGENTS.md for full context.
Project: @bytelyst Common Platform — Shared packages + microservices for the ByteLyst ecosystem
Product ID: (product-agnostic)
Stack: TypeScript, ESM, pnpm workspace, Fastify 5, Vitest, Azure Cosmos DB
## Architecture
- packages/ — @bytelyst/* shared libraries (errors, cosmos, config, auth, api-client, fastify-core, react-auth, logger, testing, blob, extraction, monitoring, design-tokens)
- services/platform-service/ — consolidated platform service (port 4003)
- services/extraction-service/ — text extraction + Python sidecar (port 4005)
- dashboards/admin-web/ — admin console (port 3001)
- dashboards/tracker-web/ — issue tracker (port 3003)
## Rules
- Package manager: pnpm — NEVER use npm
- ESM everywhere: "type": "module", .js extensions in imports
- Fastify module pattern: types.ts → repository.ts → routes.ts
- Use req.log / app.log — never console.log
- Every Cosmos document MUST include a productId field
- peerDependencies for heavy deps; workspace:* for inter-package deps
- Services re-export @bytelyst/* in src/lib/ for clean internal imports
- Commits: feat(scope): description / fix(scope): description
- Never delete existing comments/documentation unless asked
- Never add emojis unless asked
- Never hardcode secrets, colors, or API URLs
## Build Verification
- pnpm build && pnpm test && pnpm typecheck
## Key Documents
- AGENTS.md — Full AI agent instructions (read this first)