For AI coding agents working on The Bridge codebase.
A declarative dataflow language (.bridge files) and pull-based execution engine for API orchestration. Developers describe what data they need and where it comes from; the engine builds a dependency graph and executes it automatically.
pnpm monorepo — packages under packages/, examples under examples/.
- Node.js ≥ 24, pnpm ≥ 10
nvm use 24or similar in case correct node is not already installedpnpm installto set up
pnpm build # type-check (0 errors required)
pnpm lint # coding standards (0 errors required)
pnpm test # all unit tests (0 failures baseline)
pnpm e2e # end-to-end testsIf tests fail before your changes, fix them first.
- Bug fixes: write a failing test first, then fix
- New features: every new feature, syntax addition, or behavioral change needs test coverage
- Tests use
node:test+node:assert— no Jest or Vitest
Run pnpm changeset for every user-facing change. Skip for test-only, docs, or CI changes.
For every language change, also review and adjust the playground and VS Code extension (syntax highlighting, autocomplete).
bridge-types/ Shared type definitions
bridge-stdlib/ Standard library tools (httpCall, strings, arrays, audit, assert)
bridge-core/ Execution engine (ExecutionTree), core types (Wire, Bridge, NodeRef)
bridge-parser/ Parser (Chevrotain), serializer, linter, language service
bridge-compiler/ AOT compiler (bridge → optimised JS)
bridge-graphql/ GraphQL schema adapter (bridgeTransform)
bridge/ Umbrella — re-exports everything as @stackables/bridge
bridge-syntax-highlight/ VS Code extension (TextMate grammar, language server)
docs-site/ Documentation website (Astro + Starlight)
playground/ Browser playground (Vite + React)
Dependency flow (no cycles): bridge-types → bridge-stdlib → bridge-core → bridge-parser → bridge-compiler → bridge-graphql → bridge
Run a single test file:
node --experimental-transform-types --test test/<filename>.test.tsTests are co-located with each package. The main test suites:
packages/bridge/test/— language behavior, execution engine, expressions, control flow, resilience, scheduling, etc.packages/bridge-graphql/test/— GraphQL driver: per-field errors, tracing via extensions, logging, mutations, field fallthrough.packages/bridge-core/test/,packages/bridge-stdlib/test/,packages/bridge-parser/test/— package-level unit tests.examples/*/e2e.test.ts— end-to-end tests spinning up real servers.
- ESM (
"type": "module") with.tsimport extensions (handled byrewriteRelativeImportExtensions) - Strict mode —
noUnusedLocals,noUnusedParameters,noImplicitReturns,noFallthroughCasesInSwitch - Dev running:
--experimental-transform-types - Path mappings:
tsconfig.base.jsonmaps@stackables/*for cross-package imports
For architecture details, internal types, Wire semantics, parser pipeline, and design decisions, see:
docs/developer.md— architecture deep-divedocs/llm-notes.md— detailed internal notes for LLMspackages/docs-site/src/content/docs/— end-user language reference