Skip to content

Part 2: Configuration

With the project scaffolded, you now tell the delivery process where to find your sources and where to write generated docs.

import { defineConfig } from "@libar-dev/delivery-process/config";
export default defineConfig({
preset: "libar-generic",
sources: {
typescript: ["src/sample-sources/**/*.ts"],
features: ["src/specs/**/*.feature"],
stubs: ["src/stubs/**/*.ts"],
},
output: {
directory: "docs-generated",
overwrite: true,
},
});
FieldPurpose
presetTag taxonomy preset — determines the tag prefix and available categories
sources.typescriptGlob patterns for your implementation TypeScript files
sources.featuresGlob patterns for Gherkin .feature files (plan-level specs)
sources.stubsGlob patterns for design-level stub TypeScript files
output.directoryWhere generated docs are written. Default: docs/architecture
output.overwriteWhether to overwrite existing files. Default: false
PresetTag PrefixFile Opt-InCategories
generic@docs-@docs3: core, api, infra
libar-generic@libar-docs-@libar-docs3: core, api, infra
ddd-es-cqrs@libar-docs-@libar-docs21: full DDD taxonomy

This tutorial uses libar-generic throughout. It provides three categories (core, api, infra) with the @libar-docs- tag prefix.

Add the following to your package.json scripts:

{
"scripts": {
"process:query": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js",
"process:overview": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js overview",
"process:status": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js status",
"process:list": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js list",
"process:tags": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js tags",
"process:sources": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js sources",
"process:rules": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js rules",
"process:stubs": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/process-api.js stubs",
"docs:patterns": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g patterns -f",
"docs:roadmap": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g roadmap -f",
"docs:reference": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g reference-docs -f",
"docs:overview": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g overview-rdm -f",
"docs:architecture": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g architecture -f",
"docs:business-rules": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g business-rules -f",
"docs:taxonomy": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g taxonomy -f",
"docs:all": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js -g patterns,roadmap,reference-docs,overview-rdm,architecture,business-rules,taxonomy -f",
"docs:list": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/generate-docs.js --list-generators",
"lint:patterns": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/lint-patterns.js -i \"src/sample-sources/**/*.ts\"",
"lint:validate": "tsx ./node_modules/@libar-dev/delivery-process/dist/cli/validate-patterns.js -i \"src/sample-sources/**/*.ts\" --features \"src/specs/**/*.feature\""
}
}

There are two categories of scripts:

process:* — Query the Process Data API. These scan your sources and return structured data (JSON or formatted text) about your patterns, status, relationships, and business rules. They never write files.

docs:* — Run doc generators. These scan your sources and write markdown files to docs-generated/.

Even with no source files yet, you can run:

Terminal window
npm run process:overview
=== PROGRESS ===
0 patterns (0 completed, 0 active, 0 planned) = 0%

Note: The actual output also includes a === DATA API === help reference section listing available subcommands. This section is omitted from the article outputs for brevity. See the Issues & Improvements section for details.

The Process Data API is your window into the delivery process state. We will use it after every change to see what the system detects.

  • delivery-process.config.ts exists with defineConfig()
  • package.json has all process:* and docs:* scripts
  • npm run process:overview runs without errors