How the wolfcola-devtools monorepo is organized

Repository Structure

The wolfcola-devtools repository is a pnpm workspace monorepo. All publishable packages live under the packages/ directory, and shared tooling lives at the repository root.

Package Map

PackageDirectoryDescription
@wolfcola/treeshake-checkpackages/treeshake-checkCLI and library to verify tree-shaking support via Rollup
@wolfcola/eslint-plugin-treeshakepackages/eslint-plugin-treeshakeESLint plugin that flags patterns breaking tree-shaking
@wolfcola/devtools-bridgepackages/devtools-bridgeSDK adapter for emitting AuthEvent objects to DevTools
@wolfcola/devtools-typespackages/devtools-typesEffect Schema definitions for AuthEvent and FlowState
@wolfcola/devtools-corepackages/devtools-coreShared annotators, diagnosis engine, event store
@wolfcola/devtools-uipackages/devtools-uiElm UI components for Timeline, Flow, and Learn views
@wolfcola/devtools-extensionpackages/devtools-extensionBrowser extension for Chrome and Firefox
@wolfcola/devtools-standalonepackages/devtools-standaloneStandalone Electron debugger with WebSocket and MCP
oidc-devtoolspackages/vscode-extensionVS Code extension with CDP connection
@wolfcola/dead-export-finderpackages/dead-export-finderCLI to find unused exports across monorepo boundaries
@wolfcola/changeset-sync-manifestpackages/changeset-sync-manifestSyncs package version from changesets to manifest files
@wolfcola/docs-siteapps/docsThis documentation site (elm-pages)

Root Files

FilePurpose
flake.nixNix flake providing the development shell
pnpm-workspace.yamlDefines the workspace packages
package.jsonRoot scripts for build, test, and lint
tsconfig.jsonBase TypeScript configuration extended by packages
.changeset/Changeset configuration and pending changesets
CLAUDE.mdAgent instructions for Claude Code
CONTEXT.mdDomain context for AI assistants
docs/adr/Architecture Decision Records

Build System

The monorepo uses the following tools:

  • pnpm — Package manager with workspace support. All packages share a single lockfile.
  • TypeScript — Used by all packages except the docs site. Each package has its own tsconfig.json that extends the root config.
  • Vitest — Test runner for all TypeScript packages. Tests use @effect/vitest helpers.
  • Elm — Used by the docs site. Compiled by elm-pages during the site build.
  • Nix — Optional but recommended. The flake.nix provides Node.js, pnpm, Elm, and lefthook.
  • Lefthook — Git hooks for pre-commit linting and pre-push testing.
  • Changesets — Versioning and changelog generation for all publishable packages.

Dependency Graph

The packages have the following dependency relationships:

devtools-extension
  ├── devtools-core
  ├── devtools-ui (Elm)
  └── devtools-types

devtools-standalone
  ├── devtools-core
  ├── devtools-ui (Elm)
  └── devtools-types

devtools-bridge
  └── devtools-types

vscode-extension
  └── devtools-types

devtools-core
  └── devtools-types

treeshake-check
  (standalone)

eslint-plugin-treeshake
  (standalone, optional dep on treeshake-check)

dead-export-finder
  (standalone)

changeset-sync-manifest
  (standalone)

The devtools-types package is the shared foundation. It defines the AuthEvent and FlowState schemas that the bridge, browser extension, and VS Code extension all depend on.

Adding a New Package

  1. Create a directory under packages/
  2. Add a package.json with the @wolfcola scope
  3. Add the package to pnpm-workspace.yaml if not using a glob pattern
  4. Add a tsconfig.json extending the root config
  5. Add the package to the sidebar in apps/docs/app/Shared.elm
  6. Create a content page in apps/docs/content/packages/
  7. Create a content page in apps/docs/content/docs/ for integration guides