Part 2: Configuration
With the project scaffolded, you now tell the delivery process where to find your sources and where to write generated docs.
2.1 Create delivery-process.config.ts
Section titled “2.1 Create delivery-process.config.ts”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, },});2.2 Configuration fields explained
Section titled “2.2 Configuration fields explained”| Field | Purpose |
|---|---|
preset | Tag taxonomy preset — determines the tag prefix and available categories |
sources.typescript | Glob patterns for your implementation TypeScript files |
sources.features | Glob patterns for Gherkin .feature files (plan-level specs) |
sources.stubs | Glob patterns for design-level stub TypeScript files |
output.directory | Where generated docs are written. Default: docs/architecture |
output.overwrite | Whether to overwrite existing files. Default: false |
2.3 Available presets
Section titled “2.3 Available presets”| Preset | Tag Prefix | File Opt-In | Categories |
|---|---|---|---|
generic | @docs- | @docs | 3: core, api, infra |
libar-generic | @libar-docs- | @libar-docs | 3: core, api, infra |
ddd-es-cqrs | @libar-docs- | @libar-docs | 21: full DDD taxonomy |
This tutorial uses libar-generic throughout. It provides three categories (core, api, infra) with the @libar-docs- tag prefix.
2.4 Add npm scripts
Section titled “2.4 Add npm scripts”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/.
2.5 Your first Process Data API call
Section titled “2.5 Your first Process Data API call”Even with no source files yet, you can run:
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.
Checkpoint: Part 2
Section titled “Checkpoint: Part 2”delivery-process.config.tsexists withdefineConfig()package.jsonhas allprocess:*anddocs:*scriptsnpm run process:overviewruns without errors