This is a TypeScript monorepo for @versatly/workgraph (published package + CLI
surface) and package-first agent-native coordination components. There are no
required external services or databases; Docker is optional for local containerized runs.
- Package manager (dev/contributor): pnpm
- Install dependencies:
pnpm install - Build (publish surface):
pnpm run build(usestsup, outputs todist/) - Build workspace packages:
pnpm -r --if-present run build - Typecheck:
pnpm run typecheck(runstsc --noEmit) - Test:
pnpm run test(hardened wrapper viascripts/run-tests.mjs); usepnpm run test:vitestfor raw Vitest debugging - Full CI:
pnpm run ci(typecheck + package typecheck + test + build, in sequence) - CLI entry:
node bin/workgraph.js(requiresdist/from a prior build)
- The CLI (
bin/workgraph.js) imports fromdist/cli.js, so you must runpnpm run buildbefore using the CLI directly. - All tests are self-contained and create/clean up temp directories — they can run in parallel safely.
pnpm run testis the preferred reliability path in this repo; usepnpm run test:vitestonly when you specifically need raw Vitest behavior.- The
--workspace(or-w) flag is used to point CLI commands at a workgraph workspace directory. There is no--rootflag. - The
thread donecommand uses--output(not--summary) for the result text. - The optional shared-vault / Tailscale skill feature requires
WORKGRAPH_SHARED_VAULTenv var but is not needed for core development or testing.
packages/kernel: core primitive/ledger/thread/workspace domain logic, dispatch orchestration, triggers, and policy-governed autonomy behavior.packages/cli: command definitions and CLI orchestration only.packages/sdk: stable developer-facing SDK exports.packages/control-api,packages/runtime-adapter-core,packages/adapter-*,packages/mcp-server: runtime/control/transport boundaries.packages/runtime-adapter-core: shared dispatch contracts, cancellation/heartbeat lifecycle hooks, and generic transports.packages/policy,packages/search-qmd-adapter,packages/obsidian-integration,packages/skills,packages/testkit: policy/search/integration/skills/test support concerns.- Treat
packages/policyas an internal support concern unless it becomes a truly clean standalone boundary.
- Prefer new production logic in an owning package under
packages/<name>/src. - Add tests next to the behavior they cover (for example
packages/<name>/src/**/*.test.ts). - Use root-level integration tests under
tests/for cross-package and published-surface regression coverage.
- Keep package internals private; import across packages via declared package entrypoints.
- Keep CLI package thin: orchestration and UX only, with business rules in owned domain packages.
- Keep adapters/transport packages free of core domain policy logic unless explicitly owned there.
- Prefer real package boundaries over facades or compatibility wrappers; collapse false boundaries instead of preserving them.
- On migration or architecture cleanup work, complete the package/boundary cleanup first and use tests as verification gates rather than letting test churn become the main task.