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.
The workflow
Section titled “The workflow”- Check your branch with
git status --short --branch; if you are onmain, create a feature branch first (see commit style for branch naming). - Make the change, keeping it tied to the issue in front of you.
- Run the quality gates (below) before pushing.
- Open a pull request against
mainand link the issue withCloses #<issue>when one exists.
Quality gates
Section titled “Quality gates”All of these must pass before a PR is mergeable — CI runs the same commands:
pnpm buildpnpm lintpnpm typecheckpnpm testpnpm docs:checkIf 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.
Ground rules
Section titled “Ground rules”- TypeScript strict — no
anywithout 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.
The guides
Section titled “The guides”- Development setup — local environment and per-package commands.
- Adding MCP tools — the end-to-end pattern for a new tool.
- Testing conventions — service level plus wiring level, and the coverage thresholds.
- Commit style — conventional commits and the commitlint rules that enforce them.
- Roadmap — where the project is heading.