This repo is a TypeScript monorepo using pnpm workspaces. Apps live in
apps/* and shared code lives in packages/*. Task orchestration is done
directly with pnpm (no Turbo).
- Package manager: pnpm (
packageManagerinpackage.json) - Node: >= v18.17.1
- Workspaces:
apps/*,packages/*,packages/{config,integrations,schemas,functions}/* - Primary language: TypeScript
- Lint/format: Biome (
biome.json) - Tests: Jest in selected packages
- Workflow orchestration: Temporal
Run from repo root. These scripts are recursive and use --if-present.
- Install:
pnpm install(CI:pnpm install --frozen-lockfile) - Build all:
pnpm run build - Dev all:
pnpm run dev - Lint all:
pnpm run lint - Lint fix all:
pnpm run lint:fix - Format all:
pnpm run format - Type-check all:
pnpm run type-check - Test all:
pnpm run test - Clean node_modules:
pnpm run clean - Clean workspaces:
pnpm run clean:workspaces - DB generate:
pnpm run db:generate
Prefer pnpm --filter for a single package or app.
pnpm --filter @dxta/transform-functions lintpnpm --filter @dxta/extract-functions testpnpm --filter @dxta/worker-extract devpnpm --filter ./packages/schemas/transform type-check
Jest runs at the package level. Use --runTestsByPath or -t.
- By file:
pnpm --filter @dxta/transform-functions test -- --runTestsByPath src/parse-hunks.test.ts
- By name:
pnpm --filter @dxta/transform-functions test -- -t "parse hunks"
- Another package:
pnpm --filter @dxta/source-control test -- --runTestsByPath src/github/client.test.ts
Biome is the formatter and linter.
- Format:
pnpm run format(usesbiome format --write .) - Lint:
pnpm run lint(usesbiome lint .) - Lint fix:
pnpm run lint:fix(usesbiome check --write .)
Biome defaults from biome.json:
- Indent: 2 spaces
- Line width: 80
- Quotes: double
- Semicolons: always
- Trailing commas: all
- Imports: organized automatically (
organizeImportsenabled)
- Let Biome handle import ordering and formatting.
- Use
import typefor type-only imports when it improves clarity. - Prefer explicit relative paths over deep index re-exports unless a package already exposes a stable public API.
Global TS settings are strict (tsconfig.json). Notable options:
strict: truenoUncheckedIndexedAccess: truenoEmit: truecheckJs: trueandallowJs: trueisolatedModules: true
Guidelines:
- Type public APIs and exported functions explicitly.
- Avoid
any; preferunknownwith narrowing. - Use
as constfor literal-heavy config objects. - Keep nullability explicit in return types.
- Files:
kebab-case(e.g.merge-request-diffs.ts) - Functions/variables:
camelCase - Types/interfaces/enums:
PascalCase - Constants:
camelCasefor values,UPPER_SNAKE_CASEfor env keys
- Throw explicit errors with context (ids, URLs, provider name).
- Avoid swallowing errors unless a retry/backoff is handled nearby.
- For external API calls, include rate-limit or retry metadata if available.
- Schemas:
packages/schemas/* - Shared functions:
packages/functions/* - Integrations:
packages/integrations/* - Apps:
apps/*(Temporal workers, workflows, orchestrator)
- Jest configs live per package (
jest.config.*). - Co-locate tests as
*.test.tsnext to modules. - Keep tests deterministic and avoid network calls unless mocked.
- Run
pnpm run lintandpnpm run formatbefore changes land. - Use
pnpm run lint:fixfor autofixes. - If CI is missing, ensure local checks cover lint, type-check, and tests.
- No
.cursor/rules,.cursorrules, or.github/copilot-instructions.mdwere found.
- Do not modify generated files unless the task requires it.
- Keep changes scoped to the requested packages.
- Prefer workspace-level commands over ad-hoc scripts.
- Avoid adding comments unless they explain non-obvious logic.