Prompt 0 — Project Infrastructure
This is the infrastructure pass. Emit infrastructure files only. Do NOT emit any route, service, repository, or application logic yet.
A file not emitted as a fenced code block in this response does not exist. There is no later opportunity to create these files — if they are absent, the project fails §6 and §7 of the Verification Protocol.
Files to emit (all required)
Emit each as a fenced code block with the file path as the first comment line.
package.json— complete, including all runtime and dev dependencies, scripts (build,test,lint,prepare), and thepreparehusky hooktsconfig.json— TypeScript config withstrict: true,esModuleInterop: true,target: ES2022.husky/pre-commit— exact content from CLAUDE.md § Commit Hooks: tsc + lint + npm audit + test gate.husky/commit-msg— commitlint gatecommitlint.config.js— conventional commits config.github/workflows/ci.yml— full CI pipeline from CLAUDE.md § CI Pipeline: includesnpm audit --audit-level=high, tsc, lint, prisma migrate, jest coverage, and the Stryker mutation gate stepCHANGELOG.md— initial file with## Unreleasedsection and a first entry noting initial project setupdocs/adrs/ADR-0001-stack.md— full ADR (not a stub): Context, Decision, Alternatives Considered, Consequences. Document: TypeScript 5 + Node 20 + Express 4 + Prisma 5 + PostgreSQL 16. Minimum 200 words.docs/adrs/ADR-0002-auth.md— full ADR: JWT for stateless auth, argon2 for password hashing. Include why bcrypt was rejected (CVE chain via node-pre-gyp). Minimum 150 words.docs/approved-packages.md— approved package registry from CLAUDE.md § Dependency Registry (seed defaults table, one row per approved package)src/repositories/IUserRepository.ts— interface with typed method signaturessrc/repositories/IArticleRepository.ts— interface with typed method signaturessrc/repositories/ICommentRepository.ts— interface with typed method signaturessrc/repositories/IProfileRepository.ts— interface with typed method signaturessrc/repositories/ITagRepository.ts— interface with typed method signaturessrc/errors/AppError.ts— base error class hierarchy (AppError, NotFoundError, UnauthorizedError, ForbiddenError, ValidationError, ConflictError)jest.config.js— jest configuration with coverage thresholds (80% minimum)jest.setup.ts— global test setup (prisma disconnect afterAll).env.example— required environment variables with descriptions
After emitting all 19 files, emit:
Infrastructure complete. 20/20 files emitted. Ready for feature implementation.
Verification Protocol — check §6, §7, §9, and §11 before confirming complete. §6 Defended (updated): .husky/pre-commit and .github/workflows/ci.yml emitted with actual content. §7 Auditable: docs/adrs/ADR-0001-stack.md and docs/adrs/ADR-0002-auth.md emitted with full content. CHANGELOG.md emitted.
§9 Interface Completeness: all 5 repository interface files (IUserRepository.ts, IArticleRepository.ts, ICommentRepository.ts, IProfileRepository.ts, ITagRepository.ts) emitted with complete method signatures.
§11 ESM-Safe Imports: no named imports from jsonwebtoken. Pattern: import pkg from 'jsonwebtoken'; const { sign } = pkg; in AuthService.ts; const { verify } = pkg; in auth.ts. Confirm compiled server starts (node dist/server.js reaches “listening” line) before declaring P0 complete.