Skip to content

Contributing

Engram is a TypeScript monorepo (pnpm workspaces + Turborepo) with a NestJS MCP server as its main runtime. Contributions follow a short loop: branch, change, run the quality gates, open a pull request against main.

  1. Check your branch with git status --short --branch; if you are on main, create a feature branch first (see commit style for branch naming).
  2. Make the change, keeping it tied to the issue in front of you.
  3. Run the quality gates (below) before pushing.
  4. Open a pull request against main and link the issue with Closes #<issue> when one exists.

All of these must pass before a PR is mergeable — CI runs the same commands:

Terminal window
pnpm build
pnpm lint
pnpm typecheck
pnpm test
pnpm docs:check

If pnpm is not on your PATH, replace the leading pnpm with npm exec --yes pnpm@11.5.0 --.

Never bypass a failing hook or gate (no git commit --no-verify); fix the gate instead.

  • TypeScript strict — no any without justification.
  • Zod for validation — all MCP tool inputs and DTO boundaries use Zod .strict() schemas.
  • NestJS dependency injection throughout — services are injected, not imported as singletons.
  • Shared behavior lives in packages/* — do not duplicate cross-cutting logic inside an app.
  • Postgres is the source of truth — the vector store is a derived index that must always be rebuildable.
  • Prefer framework CLIs (nest g …, prisma …) over hand-rolled boilerplate when a generator exists.