Skip to content

Latest commit

 

History

History
52 lines (47 loc) · 2.69 KB

File metadata and controls

52 lines (47 loc) · 2.69 KB

AGENTS.md

Instructions for AI coding agents contributing to this repository.

Repo context

  • Stack: NestJS 11, TypeScript (strict mode), TypeORM + PostgreSQL, @stellar/stellar-sdk (Horizon + Soroban RPC), Jest.
  • Build: npm install then npm run build.
  • Run (dev): npm run start:dev (requires a .env — copy .env.example).
  • Test: npm run test (unit tests, Jest, colocated as *.spec.ts).
  • Lint/format: npm run lint, npm run format.
  • Key directories:
    • src/modules/<domain>/ — one folder per domain (users, wallet, stellar, contracts, whatsapp, health), each with its own module, controller, service, dto/, and entities/.
    • src/config/ — typed, Joi-validated configuration (ConfigModule).
    • src/database/ — TypeORM data source and migrations.
    • src/common/ — global filters/interceptors.
    • docs/PLAN.md — the phased roadmap; issues are derived from it.

Rules for contributions

  • Address each issue in its own commit.
  • The PR description must include Closes #<issue> for every issue the PR addresses.
  • Commit messages must be single-line only (no multi-paragraph bodies).
  • Do not add a Co-authored-by line to commits.
  • Keep the implementation minimal and focused on the issue at hand — do not bundle unrelated fixes or refactors into the same PR.
  • Read the surrounding code in the domain folder you're touching before writing anything; integrate with the existing module/controller/service/DTO structure rather than introducing a new pattern.
  • Avoid over-engineering. Don't build abstractions, config options, or error handling for cases the issue doesn't require, and don't assume unfinished parts of the codebase (e.g. stubbed services that throw NotImplementedException) are stable — check before building on top of them.
  • This project is under active development: expect bugs, missing pieces, and incomplete implementations elsewhere in the codebase. Do not "fix" things outside your issue's scope, even if you spot something wrong — file a new issue instead.
  • The test suite may or may not be reliable at any given time. If tests exist and run, use them to validate your change. If they don't cover your change, don't assume passing behavior — prioritize clean, correct, minimal code either way, and add a test if one is missing for the code you touched.
  • Keep the scope as small as possible while still fully addressing each issue.
  • Do not commit or push any implementation notes, plan files, or scratch markdown (e.g. IMPLEMENTATION.md, NOTES.md, TODO.md, *.plan.md). Keep these local only — they're covered by .gitignore, but double-check before committing.