- Never start implementation without explicit user approval for features, APIs, behavior, or architecture. If a user asks a question, answer only that question and stop.
- Finish discussions before coding: confirm the plan, get sign-off, then implement. Halt and escalate if you uncover structural parser or architecture issues.
- Manual edits only—do not use MultiEdit, scripted replacements,
sed,awk, or ad-hoc automation for fixes.
- Re-read
README.md,CODING-STANDARDS.md,ARCHITECTURE.md, and this file at the beginning of every session and after long breaks. - Inspect
.todos/for active work. CreateYYYY-MM-DD-task-name.mdwith context, decisions, affected files, and next steps for any effort that spans sessions; update or mark complete as you progress.
- Follow the lint-first rule: run
./scripts/lint-all.shbefore./scripts/build.sh; rerun lint after code changes that follow a failing build. - Use workspace scripts for all tooling. Never rely on global binaries or
npx. - Keep temporary analysis outputs in
.analysis/and long test logs in.tests/usingnpm test | tee .tests/run-<timestamp>.txt.
- Core query builder:
packages/tinqer/srcwith builds inpackages/tinqer/dist; PostgreSQL adapter and integration harness live in their respectivepackages/subdirectories. - TypeScript is
strict; avoidany, use ESM with explicit.jsextensions, static imports, two-space indentation, and Prettier defaults. Naming: files kebab-case, functions camelCase, types PascalCase, constants UPPER_SNAKE_CASE. Reserve comments for complex intent.
npm run build/build:quickcompile all workspaces;npm run testruns the full Mocha suite; target packages vianpm run test:tinqerornpm run dev --workspace @tinqerjs/tinqer.- Enforce quality with
npm run lint,lint:fix,format:check, andtypecheck. Test files end with*.test.ts, colocate helpers intests/test-utils/, and assert on generated SQL plus bound parameters.
- Confirm approvals, update
.todos/, and ensure build, test, and lint succeed before review. - Use Conventional Commit messages (
feat:,fix:,test:). PRs must describe the problem, solution, verification commands, linked issues, and supply screenshots or SQL diffs for behavioral changes.