learning_ai_common_plat/.github/copilot-instructions.md
saravanakumardb1 90b9cf93d8 fix(common): configure ESLint 9 and fix lint issues
- Added @eslint/js dependency
- Updated eslint.config.js for ESLint 9 compatibility
- Added required globals (crypto, localStorage, React, etc.)
- Fixed unused imports and variables
- Disabled sort-imports temporarily
- Formatted all files with Prettier
2026-02-12 16:37:30 -08:00

2.0 KiB

GitHub Copilot Instructions — @bytelyst Common Platform

For full agent instructions, read AGENTS.md at the repo root.

Project Context

Shared @bytelyst/* packages and @lysnrai/* microservices for the ByteLyst ecosystem. Product-agnostic — consumed by LysnrAI and MindLyst.

Code Generation Rules

Always

  • Import PRODUCT_ID from @bytelyst/config (loadProductIdentity()) — never hardcode "lysnrai"
  • Include productId field in every Cosmos DB document
  • Validate inputs with Zod schemas
  • Use req.log / app.log for Fastify logging
  • Use ESM imports (import ... from "./file.js" with .js extension)
  • Follow the module pattern: types.tsrepository.tsroutes.ts
  • Propagate x-request-id headers in service-to-service calls
  • Use peerDependencies for heavy deps in packages
  • Use workspace:* for inter-package dependencies

Never

  • console.log in production code
  • any type in TypeScript
  • Math.random() for IDs in loops without an index suffix
  • Hardcoded secrets or API keys
  • npm commands (use pnpm)
  • Edit generated token files directly (edit bytelyst.tokens.json instead)

Suggestions Context

When suggesting code in these directories, follow these patterns:

Directory Framework Key Pattern
packages/*/src/ TypeScript library Export from index.ts, peerDependencies for heavy deps
services/*/src/modules/ Fastify 5 + Zod types.tsrepository.tsroutes.ts
services/*/src/lib/ Re-exports Re-export from @bytelyst/* packages
packages/design-tokens/ Token generator Edit bytelyst.tokens.json, run generate.ts

Commit Messages

Format: type(scope): description

Types: feat, fix, docs, refactor, test, chore