schema: spec-driven context: | Project: rag-service (RAG knowledge service for enterprise AI tooling) Tech stack: Node.js 22 (ESM), TypeScript 5.8 strict, Express 4, tsx runner Architecture: modular service — src/modules/{ingest,process,parsers,retrieve,answer,catalog,embeddings,vectorstore,logs}, src/api (OpenAPI), src/shared Data stores: PostgreSQL (pg) + Qdrant (@qdrant/js-client-rest) + OpenAI embeddings Testing: node:test + node:assert/strict executed via `npm test` (NODE_ENV=test tsx --test tests/**/*.test.ts) Quality: `npm run check` (tsc --noEmit, strict), `npm run build` (tsc emit to dist/) Deploy: Docker + EasyPanel; migrations are manual scripts (migrate:lifecycle, migrate:legacy:lifecycle) No linter, formatter, or coverage tooling is configured. strict_tdd: true testing: projects: - path: ./ stack: Node.js 22 + TypeScript 5.8 (ESM) test_command: npm test test_framework: node:test (node --test via tsx) layers: unit: true integration: true e2e: false coverage: available: false command: "" quality: linter: false type_checker: true type_checker_command: npm run check formatter: false rules: proposal: - Include rollback plan for risky changes (migrations and Qdrant/PostgreSQL data operations) - Reference existing module boundaries under src/modules/ specs: - Use Given/When/Then for scenarios - Use RFC 2119 keywords (MUST, SHALL, SHOULD, MAY) design: - Document architecture decisions with rationale - Keep module boundaries; parsers/ingest extensions must follow the parser-registry pattern tasks: - Group by phase, use hierarchical numbering - Keep tasks completable in one session - Respect review_budget_lines: 400 (auto-chain delivery when exceeded) apply: guidelines: - Follow existing code patterns (ESM imports with .js extensions, strict types) - Never read or expose .env* files, llaves, or backups/ contents tdd: true test_command: npm test verify: test_command: npm test build_command: npm run build coverage_threshold: 0 archive: - Warn before merging destructive deltas