Skip to main content
Welcome. This site supports keyboard navigation and screen readers. Press ? at any time for keyboard shortcuts. Press [ to focus the sidebar, ] to focus the content. High-contrast themes are available via the toolbar.
serard@dev00:~/cv

Build and Verify

The corpus depends on every ddd-X-codegen package running its templates against the right inputs to produce the right src/generated/X/ files. Doing that by hand across dozens of packages is impossible. @frenchexdev/ddd-cli-plugin-codegen contributes two verbs — codegen:build and codegen:verify — that drive the generators uniformly across the workspace.


The Two Tasks

plugin.ts declares two tasks.

codegen:build — run every codegen generator in the workspace. The task discovers ddd-X-codegen packages, invokes their runFixpoint against the consumer-package roots, writes the generated files into src/generated/X/. The local development workflow is edit the spec, run ddd codegen:build, commit the regenerated files.

codegen:verify — same generators, dry-run mode. The task runs each generator into a virtual filesystem, compares the result against the on-disk src/generated/, returns non-zero exit code on any diff. The CI workflow is run ddd codegen:verify, refuse the commit if the developer forgot to regenerate.

The split between build and verify maps onto two operational regimes. Local dev wants to write; CI wants to compare. Same underlying mechanism (the ts-codegen-pipeline fixpoint), two verbs that wrap it for the two regimes.


  • Drives every triplet's ddd-X-codegen package — same runFixpoint mechanism across all of them.
  • Sits next to @FewerPermissionPrompts — scaffold produces new triplets, codegen runs them.
  • The verify mode is what makes the generated files diff-stable across CI runs — the spec acceptance criterion idempotent-for-same-input (seen on every codegen spec) ensures the verify mode never produces spurious failures.

Back to the series index.

⬇ Download